From a8e00aaa9b3922b324fa3eff95d6f29f28d7fb4b Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Wed, 18 Dec 2024 16:42:45 +0100 Subject: [PATCH 1/7] update contribution guide --- .gitattributes | 20 + CONTRIBUTING.md | 9 +- .../products/library/resource_library.go | 2 +- .../resource_quality_monitor.go | 4 +- .../products/sharing/resource_share.go | 20 +- internal/service/apps_tf/legacy_model.go | 2233 ++ internal/service/billing_tf/legacy_model.go | 2715 +++ internal/service/billing_tf/model.go | 226 +- internal/service/catalog_tf/legacy_model.go | 18871 ++++++++++++++++ internal/service/catalog_tf/model.go | 2320 +- .../service/cleanrooms_tf/legacy_model.go | 2677 +++ internal/service/cleanrooms_tf/model.go | 356 +- internal/service/compute_tf/legacy_model.go | 16258 +++++++++++++ internal/service/compute_tf/model.go | 1700 +- .../service/dashboards_tf/legacy_model.go | 3194 +++ internal/service/dashboards_tf/model.go | 308 +- internal/service/files_tf/legacy_model.go | 1675 ++ internal/service/iam_tf/legacy_model.go | 4850 ++++ internal/service/iam_tf/model.go | 68 +- internal/service/jobs_tf/legacy_model.go | 16353 +++++++++++++ internal/service/jobs_tf/model.go | 2490 +- .../service/marketplace_tf/legacy_model.go | 7898 +++++++ internal/service/marketplace_tf/model.go | 776 +- internal/service/ml_tf/legacy_model.go | 10435 +++++++++ internal/service/ml_tf/model.go | 442 +- internal/service/oauth2_tf/legacy_model.go | 2064 ++ internal/service/oauth2_tf/model.go | 110 +- internal/service/pipelines_tf/legacy_model.go | 6059 +++++ internal/service/pipelines_tf/model.go | 756 +- .../service/provisioning_tf/legacy_model.go | 4161 ++++ internal/service/provisioning_tf/model.go | 494 +- internal/service/serving_tf/legacy_model.go | 7057 ++++++ internal/service/serving_tf/model.go | 832 +- internal/service/settings_tf/legacy_model.go | 10080 +++++++++ internal/service/settings_tf/model.go | 890 +- internal/service/sharing_tf/legacy_model.go | 3217 +++ internal/service/sharing_tf/model.go | 166 +- internal/service/sql_tf/legacy_model.go | 12467 ++++++++++ internal/service/sql_tf/model.go | 1332 +- .../service/vectorsearch_tf/legacy_model.go | 3164 +++ internal/service/vectorsearch_tf/model.go | 250 +- internal/service/workspace_tf/legacy_model.go | 4435 ++++ internal/service/workspace_tf/model.go | 164 +- 43 files changed, 146742 insertions(+), 6856 deletions(-) create mode 100755 internal/service/apps_tf/legacy_model.go create mode 100755 internal/service/billing_tf/legacy_model.go create mode 100755 internal/service/catalog_tf/legacy_model.go create mode 100755 internal/service/cleanrooms_tf/legacy_model.go create mode 100755 internal/service/compute_tf/legacy_model.go create mode 100755 internal/service/dashboards_tf/legacy_model.go create mode 100755 internal/service/files_tf/legacy_model.go create mode 100755 internal/service/iam_tf/legacy_model.go create mode 100755 internal/service/jobs_tf/legacy_model.go create mode 100755 internal/service/marketplace_tf/legacy_model.go create mode 100755 internal/service/ml_tf/legacy_model.go create mode 100755 internal/service/oauth2_tf/legacy_model.go create mode 100755 internal/service/pipelines_tf/legacy_model.go create mode 100755 internal/service/provisioning_tf/legacy_model.go create mode 100755 internal/service/serving_tf/legacy_model.go create mode 100755 internal/service/settings_tf/legacy_model.go create mode 100755 internal/service/sharing_tf/legacy_model.go create mode 100755 internal/service/sql_tf/legacy_model.go create mode 100755 internal/service/vectorsearch_tf/legacy_model.go create mode 100755 internal/service/workspace_tf/legacy_model.go diff --git a/.gitattributes b/.gitattributes index 576702427..40213a692 100755 --- a/.gitattributes +++ b/.gitattributes @@ -1,20 +1,40 @@ +internal/service/apps_tf/legacy_model.go linguist-generated=true internal/service/apps_tf/model.go linguist-generated=true +internal/service/billing_tf/legacy_model.go linguist-generated=true internal/service/billing_tf/model.go linguist-generated=true +internal/service/catalog_tf/legacy_model.go linguist-generated=true internal/service/catalog_tf/model.go linguist-generated=true +internal/service/cleanrooms_tf/legacy_model.go linguist-generated=true internal/service/cleanrooms_tf/model.go linguist-generated=true +internal/service/compute_tf/legacy_model.go linguist-generated=true internal/service/compute_tf/model.go linguist-generated=true +internal/service/dashboards_tf/legacy_model.go linguist-generated=true internal/service/dashboards_tf/model.go linguist-generated=true +internal/service/files_tf/legacy_model.go linguist-generated=true internal/service/files_tf/model.go linguist-generated=true +internal/service/iam_tf/legacy_model.go linguist-generated=true internal/service/iam_tf/model.go linguist-generated=true +internal/service/jobs_tf/legacy_model.go linguist-generated=true internal/service/jobs_tf/model.go linguist-generated=true +internal/service/marketplace_tf/legacy_model.go linguist-generated=true internal/service/marketplace_tf/model.go linguist-generated=true +internal/service/ml_tf/legacy_model.go linguist-generated=true internal/service/ml_tf/model.go linguist-generated=true +internal/service/oauth2_tf/legacy_model.go linguist-generated=true internal/service/oauth2_tf/model.go linguist-generated=true +internal/service/pipelines_tf/legacy_model.go linguist-generated=true internal/service/pipelines_tf/model.go linguist-generated=true +internal/service/provisioning_tf/legacy_model.go linguist-generated=true internal/service/provisioning_tf/model.go linguist-generated=true +internal/service/serving_tf/legacy_model.go linguist-generated=true internal/service/serving_tf/model.go linguist-generated=true +internal/service/settings_tf/legacy_model.go linguist-generated=true internal/service/settings_tf/model.go linguist-generated=true +internal/service/sharing_tf/legacy_model.go linguist-generated=true internal/service/sharing_tf/model.go linguist-generated=true +internal/service/sql_tf/legacy_model.go linguist-generated=true internal/service/sql_tf/model.go linguist-generated=true +internal/service/vectorsearch_tf/legacy_model.go linguist-generated=true internal/service/vectorsearch_tf/model.go linguist-generated=true +internal/service/workspace_tf/legacy_model.go linguist-generated=true internal/service/workspace_tf/model.go linguist-generated=true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54f584a1e..f45fd0571 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -120,7 +120,10 @@ We are migrating the resource from SDKv2 to Plugin Framework provider and hence ### Adding a new resource 1. Check if the directory for this particular resource exists under `internal/providers/pluginfw/products`, if not create the directory eg: `cluster`, `volume` etc... Please note: Resources and Data sources are organized under the same package for that service. -2. Create a file with resource_resource-name.go and write the CRUD methods, schema for that resource. For reference, please take a look at existing resources eg: `resource_quality_monitor.go`. Make sure to set the user agent in all the CRUD methods. In the `Metadata()`, if the resource is to be used as default, use the method `GetDatabricksProductionName()` else use `GetDatabricksStagingName()` which suffixes the name with `_pluginframework`. +2. Create a file with resource_resource-name.go and write the CRUD methods, schema for that resource. For reference, please take a look at existing resources eg: `resource_app.go`. + - Make sure to set the user agent in all the CRUD methods. + - In the `Metadata()`, use the method `GetDatabricksProductionName()`. + - In the `Schema()` method, import the appropriate struct from the `internal/service/{package}_tf` package and use the `ResourceStructToSchema` method to convert the struct to schema. Use the struct that does not have the `_SdkV2` suffix. 3. Create a file with `resource_resource-name_acc_test.go` and add integration tests here. 4. Create a file with `resource_resource-name_test.go` and add unit tests here. Note: Please make sure to abstract specific method of the resource so they are unit test friendly and not testing internal part of terraform plugin framework library. You can compare the diagnostics, for example: please take a look at: `data_cluster_test.go` 5. Add the resource under `internal/providers/pluginfw/pluginfw.go` in `Resources()` method. Please update the list so that it stays in alphabetically sorted order. @@ -139,9 +142,9 @@ There must not be any behaviour change or schema change when migrating a resourc - Please make sure there are no breaking differences due to changes in schema by running: `make diff-schema`. - Integration tests shouldn't require any major changes. -By default, `ResourceStructToSchema` will convert a `types.List` field to a `ListAttribute` or `ListNestedAttribute`. For resources or data sources migrated from the SDKv2, `ListNestedBlock` must be used for such fields. To do this, call `cs.ConfigureAsSdkV2Compatible()` in the `ResourceStructToSchema` callback: +By default, `ResourceStructToSchema` will convert a `types.List` field to a `ListAttribute` or `ListNestedAttribute`. For resources or data sources migrated from the SDKv2, `ListNestedBlock` must be used for such fields. To do this, use the `_SdkV2` variant from the `internal/service/{package}_tf` package when defining the resource schema and when interacting with the plan, config and state. Additionally, in the `Schema()` method, call `cs.ConfigureAsSdkV2Compatible()` in the `ResourceStructToSchema` callback: ```go -resp.Schema = tfschema.ResourceStructToSchema(ctx, Resource{}, func(c tfschema.CustomizableSchema) tfschema.CustomizableSchema { +resp.Schema = tfschema.ResourceStructToSchema(ctx, Resource_SdkV2{}, func(c tfschema.CustomizableSchema) tfschema.CustomizableSchema { cs.ConfigureAsSdkV2Compatible() // Add any additional configuration here return cs diff --git a/internal/providers/pluginfw/products/library/resource_library.go b/internal/providers/pluginfw/products/library/resource_library.go index f7b3854a5..856ee32f9 100644 --- a/internal/providers/pluginfw/products/library/resource_library.go +++ b/internal/providers/pluginfw/products/library/resource_library.go @@ -73,7 +73,7 @@ func readLibrary(ctx context.Context, w *databricks.WorkspaceClient, waitParams } type LibraryExtended struct { - compute_tf.Library + compute_tf.Library_SdkV2 ClusterId types.String `tfsdk:"cluster_id"` ID types.String `tfsdk:"id" tf:"optional,computed"` // Adding ID field to stay compatible with SDKv2 } diff --git a/internal/providers/pluginfw/products/qualitymonitor/resource_quality_monitor.go b/internal/providers/pluginfw/products/qualitymonitor/resource_quality_monitor.go index 574bb72e3..8c42c0983 100644 --- a/internal/providers/pluginfw/products/qualitymonitor/resource_quality_monitor.go +++ b/internal/providers/pluginfw/products/qualitymonitor/resource_quality_monitor.go @@ -56,7 +56,7 @@ func waitForMonitor(ctx context.Context, w *databricks.WorkspaceClient, monitor } type MonitorInfoExtended struct { - catalog_tf.MonitorInfo + catalog_tf.MonitorInfo_SdkV2 WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:"optional"` ID types.String `tfsdk:"id" tf:"optional,computed"` // Adding ID field to stay compatible with SDKv2 @@ -65,7 +65,7 @@ type MonitorInfoExtended struct { var _ pluginfwcommon.ComplexFieldTypeProvider = MonitorInfoExtended{} func (m MonitorInfoExtended) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return m.MonitorInfo.GetComplexFieldTypes(ctx) + return m.MonitorInfo_SdkV2.GetComplexFieldTypes(ctx) } type QualityMonitorResource struct { diff --git a/internal/providers/pluginfw/products/sharing/resource_share.go b/internal/providers/pluginfw/products/sharing/resource_share.go index 17c10137a..c316f85e2 100644 --- a/internal/providers/pluginfw/products/sharing/resource_share.go +++ b/internal/providers/pluginfw/products/sharing/resource_share.go @@ -30,13 +30,13 @@ func ResourceShare() resource.Resource { } type ShareInfoExtended struct { - sharing_tf.ShareInfo + sharing_tf.ShareInfo_SdkV2 } var _ pluginfwcommon.ComplexFieldTypeProvider = ShareInfoExtended{} func (s ShareInfoExtended) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return s.ShareInfo.GetComplexFieldTypes(ctx) + return s.ShareInfo_SdkV2.GetComplexFieldTypes(ctx) } func matchOrder[T any, K comparable](target, reference []T, keyFunc func(T) K) { @@ -408,36 +408,36 @@ func (r *ShareResource) Delete(ctx context.Context, req resource.DeleteRequest, } type effectiveFieldsAction interface { - resourceLevel(*ShareInfoExtended, sharing_tf.ShareInfo) - objectLevel(*sharing_tf.SharedDataObject, sharing_tf.SharedDataObject) + resourceLevel(*ShareInfoExtended, sharing_tf.ShareInfo_SdkV2) + objectLevel(*sharing_tf.SharedDataObject_SdkV2, sharing_tf.SharedDataObject_SdkV2) } type effectiveFieldsActionCreateOrUpdate struct{} -func (effectiveFieldsActionCreateOrUpdate) resourceLevel(state *ShareInfoExtended, plan sharing_tf.ShareInfo) { +func (effectiveFieldsActionCreateOrUpdate) resourceLevel(state *ShareInfoExtended, plan sharing_tf.ShareInfo_SdkV2) { state.SyncEffectiveFieldsDuringCreateOrUpdate(plan) } -func (effectiveFieldsActionCreateOrUpdate) objectLevel(state *sharing_tf.SharedDataObject, plan sharing_tf.SharedDataObject) { +func (effectiveFieldsActionCreateOrUpdate) objectLevel(state *sharing_tf.SharedDataObject_SdkV2, plan sharing_tf.SharedDataObject_SdkV2) { state.SyncEffectiveFieldsDuringCreateOrUpdate(plan) } type effectiveFieldsActionRead struct{} -func (effectiveFieldsActionRead) resourceLevel(state *ShareInfoExtended, plan sharing_tf.ShareInfo) { +func (effectiveFieldsActionRead) resourceLevel(state *ShareInfoExtended, plan sharing_tf.ShareInfo_SdkV2) { state.SyncEffectiveFieldsDuringRead(plan) } -func (effectiveFieldsActionRead) objectLevel(state *sharing_tf.SharedDataObject, plan sharing_tf.SharedDataObject) { +func (effectiveFieldsActionRead) objectLevel(state *sharing_tf.SharedDataObject_SdkV2, plan sharing_tf.SharedDataObject_SdkV2) { state.SyncEffectiveFieldsDuringRead(plan) } func (r *ShareResource) syncEffectiveFields(ctx context.Context, plan, state ShareInfoExtended, mode effectiveFieldsAction) (ShareInfoExtended, diag.Diagnostics) { var d diag.Diagnostics - mode.resourceLevel(&state, plan.ShareInfo) + mode.resourceLevel(&state, plan.ShareInfo_SdkV2) planObjects, _ := plan.GetObjects(ctx) stateObjects, _ := state.GetObjects(ctx) - finalObjects := []sharing_tf.SharedDataObject{} + finalObjects := []sharing_tf.SharedDataObject_SdkV2{} for i := range stateObjects { mode.objectLevel(&stateObjects[i], planObjects[i]) finalObjects = append(finalObjects, stateObjects[i]) diff --git a/internal/service/apps_tf/legacy_model.go b/internal/service/apps_tf/legacy_model.go new file mode 100755 index 000000000..33bb86961 --- /dev/null +++ b/internal/service/apps_tf/legacy_model.go @@ -0,0 +1,2233 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package apps_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type App_SdkV2 struct { + // The active deployment of the app. A deployment is considered active when + // it has been deployed to the app compute. + ActiveDeployment types.List `tfsdk:"active_deployment" tf:"computed,object"` + + AppStatus types.List `tfsdk:"app_status" tf:"computed,object"` + + ComputeStatus types.List `tfsdk:"compute_status" tf:"computed,object"` + // The creation time of the app. Formatted timestamp in ISO 6801. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // The email of the user that created the app. + Creator types.String `tfsdk:"creator" tf:"computed"` + // The default workspace file system path of the source code from which app + // deployment are created. This field tracks the workspace source code path + // of the last active deployment. + DefaultSourceCodePath types.String `tfsdk:"default_source_code_path" tf:"computed"` + // The description of the app. + Description types.String `tfsdk:"description" tf:"optional"` + // The name of the app. The name must contain only lowercase alphanumeric + // characters and hyphens. It must be unique within the workspace. + Name types.String `tfsdk:"name" tf:""` + // The pending deployment of the app. A deployment is considered pending + // when it is being prepared for deployment to the app compute. + PendingDeployment types.List `tfsdk:"pending_deployment" tf:"computed,object"` + // Resources for the app. + Resources types.List `tfsdk:"resources" tf:"optional"` + + ServicePrincipalClientId types.String `tfsdk:"service_principal_client_id" tf:"computed"` + + ServicePrincipalId types.Int64 `tfsdk:"service_principal_id" tf:"computed"` + + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"computed"` + // The update time of the app. Formatted timestamp in ISO 6801. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + // The email of the user that last updated the app. + Updater types.String `tfsdk:"updater" tf:"computed"` + // The URL of the app once it is deployed. + Url types.String `tfsdk:"url" tf:"computed"` +} + +func (newState *App_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan App_SdkV2) { +} + +func (newState *App_SdkV2) SyncEffectiveFieldsDuringRead(existingState App_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in App. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a App_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "active_deployment": reflect.TypeOf(AppDeployment_SdkV2{}), + "app_status": reflect.TypeOf(ApplicationStatus_SdkV2{}), + "compute_status": reflect.TypeOf(ComputeStatus_SdkV2{}), + "pending_deployment": reflect.TypeOf(AppDeployment_SdkV2{}), + "resources": reflect.TypeOf(AppResource_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, App_SdkV2 +// only implements ToObjectValue() and Type(). +func (o App_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "active_deployment": o.ActiveDeployment, + "app_status": o.AppStatus, + "compute_status": o.ComputeStatus, + "create_time": o.CreateTime, + "creator": o.Creator, + "default_source_code_path": o.DefaultSourceCodePath, + "description": o.Description, + "name": o.Name, + "pending_deployment": o.PendingDeployment, + "resources": o.Resources, + "service_principal_client_id": o.ServicePrincipalClientId, + "service_principal_id": o.ServicePrincipalId, + "service_principal_name": o.ServicePrincipalName, + "update_time": o.UpdateTime, + "updater": o.Updater, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o App_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "active_deployment": basetypes.ListType{ + ElemType: AppDeployment{}.Type(ctx), + }, + "app_status": basetypes.ListType{ + ElemType: ApplicationStatus{}.Type(ctx), + }, + "compute_status": basetypes.ListType{ + ElemType: ComputeStatus{}.Type(ctx), + }, + "create_time": types.StringType, + "creator": types.StringType, + "default_source_code_path": types.StringType, + "description": types.StringType, + "name": types.StringType, + "pending_deployment": basetypes.ListType{ + ElemType: AppDeployment{}.Type(ctx), + }, + "resources": basetypes.ListType{ + ElemType: AppResource{}.Type(ctx), + }, + "service_principal_client_id": types.StringType, + "service_principal_id": types.Int64Type, + "service_principal_name": types.StringType, + "update_time": types.StringType, + "updater": types.StringType, + "url": types.StringType, + }, + } +} + +// GetActiveDeployment returns the value of the ActiveDeployment field in App_SdkV2 as +// a AppDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *App_SdkV2) GetActiveDeployment(ctx context.Context) (AppDeployment_SdkV2, bool) { + var e AppDeployment_SdkV2 + if o.ActiveDeployment.IsNull() || o.ActiveDeployment.IsUnknown() { + return e, false + } + var v []AppDeployment_SdkV2 + d := o.ActiveDeployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetActiveDeployment sets the value of the ActiveDeployment field in App_SdkV2. +func (o *App_SdkV2) SetActiveDeployment(ctx context.Context, v AppDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["active_deployment"] + o.ActiveDeployment = types.ListValueMust(t, vs) +} + +// GetAppStatus returns the value of the AppStatus field in App_SdkV2 as +// a ApplicationStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *App_SdkV2) GetAppStatus(ctx context.Context) (ApplicationStatus_SdkV2, bool) { + var e ApplicationStatus_SdkV2 + if o.AppStatus.IsNull() || o.AppStatus.IsUnknown() { + return e, false + } + var v []ApplicationStatus_SdkV2 + d := o.AppStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAppStatus sets the value of the AppStatus field in App_SdkV2. +func (o *App_SdkV2) SetAppStatus(ctx context.Context, v ApplicationStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["app_status"] + o.AppStatus = types.ListValueMust(t, vs) +} + +// GetComputeStatus returns the value of the ComputeStatus field in App_SdkV2 as +// a ComputeStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *App_SdkV2) GetComputeStatus(ctx context.Context) (ComputeStatus_SdkV2, bool) { + var e ComputeStatus_SdkV2 + if o.ComputeStatus.IsNull() || o.ComputeStatus.IsUnknown() { + return e, false + } + var v []ComputeStatus_SdkV2 + d := o.ComputeStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetComputeStatus sets the value of the ComputeStatus field in App_SdkV2. +func (o *App_SdkV2) SetComputeStatus(ctx context.Context, v ComputeStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["compute_status"] + o.ComputeStatus = types.ListValueMust(t, vs) +} + +// GetPendingDeployment returns the value of the PendingDeployment field in App_SdkV2 as +// a AppDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *App_SdkV2) GetPendingDeployment(ctx context.Context) (AppDeployment_SdkV2, bool) { + var e AppDeployment_SdkV2 + if o.PendingDeployment.IsNull() || o.PendingDeployment.IsUnknown() { + return e, false + } + var v []AppDeployment_SdkV2 + d := o.PendingDeployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPendingDeployment sets the value of the PendingDeployment field in App_SdkV2. +func (o *App_SdkV2) SetPendingDeployment(ctx context.Context, v AppDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pending_deployment"] + o.PendingDeployment = types.ListValueMust(t, vs) +} + +// GetResources returns the value of the Resources field in App_SdkV2 as +// a slice of AppResource_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *App_SdkV2) GetResources(ctx context.Context) ([]AppResource_SdkV2, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []AppResource_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 App_SdkV2. +func (o *App_SdkV2) SetResources(ctx context.Context, v []AppResource_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 AppAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *AppAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlRequest_SdkV2) { +} + +func (newState *AppAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppAccessControlRequest_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, AppAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type AppAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *AppAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppAccessControlResponse_SdkV2) { +} + +func (newState *AppAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(AppPermission_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, AppAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: AppPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in AppAccessControlResponse_SdkV2 as +// a slice of AppPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AppAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]AppPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []AppPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in AppAccessControlResponse_SdkV2. +func (o *AppAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []AppPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type AppDeployment_SdkV2 struct { + // The creation time of the deployment. Formatted timestamp in ISO 6801. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // The email of the user creates the deployment. + Creator types.String `tfsdk:"creator" tf:"computed"` + // The deployment artifacts for an app. + DeploymentArtifacts types.List `tfsdk:"deployment_artifacts" tf:"computed,object"` + // The unique id of the deployment. + DeploymentId types.String `tfsdk:"deployment_id" tf:"optional"` + // The mode of which the deployment will manage the source code. + Mode types.String `tfsdk:"mode" tf:"optional"` + // The workspace file system path of the source code used to create the app + // deployment. This is different from + // `deployment_artifacts.source_code_path`, which is the path used by the + // deployed app. The former refers to the original source code location of + // the app in the workspace during deployment creation, whereas the latter + // provides a system generated stable snapshotted source code path used by + // the deployment. + SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` + // Status and status message of the deployment + Status types.List `tfsdk:"status" tf:"computed,object"` + // The update time of the deployment. Formatted timestamp in ISO 6801. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` +} + +func (newState *AppDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeployment_SdkV2) { +} + +func (newState *AppDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeployment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeployment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppDeployment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "deployment_artifacts": reflect.TypeOf(AppDeploymentArtifacts_SdkV2{}), + "status": reflect.TypeOf(AppDeploymentStatus_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, AppDeployment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppDeployment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "creator": o.Creator, + "deployment_artifacts": o.DeploymentArtifacts, + "deployment_id": o.DeploymentId, + "mode": o.Mode, + "source_code_path": o.SourceCodePath, + "status": o.Status, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppDeployment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "creator": types.StringType, + "deployment_artifacts": basetypes.ListType{ + ElemType: AppDeploymentArtifacts{}.Type(ctx), + }, + "deployment_id": types.StringType, + "mode": types.StringType, + "source_code_path": types.StringType, + "status": basetypes.ListType{ + ElemType: AppDeploymentStatus{}.Type(ctx), + }, + "update_time": types.StringType, + }, + } +} + +// GetDeploymentArtifacts returns the value of the DeploymentArtifacts field in AppDeployment_SdkV2 as +// a AppDeploymentArtifacts_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppDeployment_SdkV2) GetDeploymentArtifacts(ctx context.Context) (AppDeploymentArtifacts_SdkV2, bool) { + var e AppDeploymentArtifacts_SdkV2 + if o.DeploymentArtifacts.IsNull() || o.DeploymentArtifacts.IsUnknown() { + return e, false + } + var v []AppDeploymentArtifacts_SdkV2 + d := o.DeploymentArtifacts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeploymentArtifacts sets the value of the DeploymentArtifacts field in AppDeployment_SdkV2. +func (o *AppDeployment_SdkV2) SetDeploymentArtifacts(ctx context.Context, v AppDeploymentArtifacts_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment_artifacts"] + o.DeploymentArtifacts = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in AppDeployment_SdkV2 as +// a AppDeploymentStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppDeployment_SdkV2) GetStatus(ctx context.Context) (AppDeploymentStatus_SdkV2, bool) { + var e AppDeploymentStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []AppDeploymentStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in AppDeployment_SdkV2. +func (o *AppDeployment_SdkV2) SetStatus(ctx context.Context, v AppDeploymentStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +type AppDeploymentArtifacts_SdkV2 struct { + // The snapshotted workspace file system path of the source code loaded by + // the deployed app. + SourceCodePath types.String `tfsdk:"source_code_path" tf:"optional"` +} + +func (newState *AppDeploymentArtifacts_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentArtifacts_SdkV2) { +} + +func (newState *AppDeploymentArtifacts_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeploymentArtifacts_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentArtifacts. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppDeploymentArtifacts_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, AppDeploymentArtifacts_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppDeploymentArtifacts_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "source_code_path": o.SourceCodePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppDeploymentArtifacts_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "source_code_path": types.StringType, + }, + } +} + +type AppDeploymentStatus_SdkV2 struct { + // Message corresponding with the deployment state. + Message types.String `tfsdk:"message" tf:"computed"` + // State of the deployment. + State types.String `tfsdk:"state" tf:"computed"` +} + +func (newState *AppDeploymentStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppDeploymentStatus_SdkV2) { +} + +func (newState *AppDeploymentStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppDeploymentStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppDeploymentStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppDeploymentStatus_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, AppDeploymentStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppDeploymentStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppDeploymentStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "state": types.StringType, + }, + } +} + +type AppPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *AppPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermission_SdkV2) { +} + +func (newState *AppPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, AppPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in AppPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *AppPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in AppPermission_SdkV2. +func (o *AppPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type AppPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *AppPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissions_SdkV2) { +} + +func (newState *AppPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AppAccessControlResponse_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, AppPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AppAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in AppPermissions_SdkV2 as +// a slice of AppAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AppPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]AppAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AppAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in AppPermissions_SdkV2. +func (o *AppPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []AppAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type AppPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *AppPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsDescription_SdkV2) { +} + +func (newState *AppPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppPermissionsDescription_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, AppPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type AppPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The app for which to get or manage permissions. + AppName types.String `tfsdk:"-"` +} + +func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppPermissionsRequest_SdkV2) { +} + +func (newState *AppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AppAccessControlRequest_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, AppPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "app_name": o.AppName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AppAccessControlRequest{}.Type(ctx), + }, + "app_name": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in AppPermissionsRequest_SdkV2 as +// a slice of AppAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AppPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]AppAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AppAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in AppPermissionsRequest_SdkV2. +func (o *AppPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []AppAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type AppResource_SdkV2 struct { + // Description of the App Resource. + Description types.String `tfsdk:"description" tf:"optional"` + + Job types.List `tfsdk:"job" tf:"optional,object"` + // Name of the App Resource. + Name types.String `tfsdk:"name" tf:""` + + Secret types.List `tfsdk:"secret" tf:"optional,object"` + + ServingEndpoint types.List `tfsdk:"serving_endpoint" tf:"optional,object"` + + SqlWarehouse types.List `tfsdk:"sql_warehouse" tf:"optional,object"` +} + +func (newState *AppResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResource_SdkV2) { +} + +func (newState *AppResource_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResource_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResource. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppResource_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "job": reflect.TypeOf(AppResourceJob_SdkV2{}), + "secret": reflect.TypeOf(AppResourceSecret_SdkV2{}), + "serving_endpoint": reflect.TypeOf(AppResourceServingEndpoint_SdkV2{}), + "sql_warehouse": reflect.TypeOf(AppResourceSqlWarehouse_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, AppResource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppResource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "job": o.Job, + "name": o.Name, + "secret": o.Secret, + "serving_endpoint": o.ServingEndpoint, + "sql_warehouse": o.SqlWarehouse, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppResource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "job": basetypes.ListType{ + ElemType: AppResourceJob{}.Type(ctx), + }, + "name": types.StringType, + "secret": basetypes.ListType{ + ElemType: AppResourceSecret{}.Type(ctx), + }, + "serving_endpoint": basetypes.ListType{ + ElemType: AppResourceServingEndpoint{}.Type(ctx), + }, + "sql_warehouse": basetypes.ListType{ + ElemType: AppResourceSqlWarehouse{}.Type(ctx), + }, + }, + } +} + +// GetJob returns the value of the Job field in AppResource_SdkV2 as +// a AppResourceJob_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppResource_SdkV2) GetJob(ctx context.Context) (AppResourceJob_SdkV2, bool) { + var e AppResourceJob_SdkV2 + if o.Job.IsNull() || o.Job.IsUnknown() { + return e, false + } + var v []AppResourceJob_SdkV2 + d := o.Job.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetJob sets the value of the Job field in AppResource_SdkV2. +func (o *AppResource_SdkV2) SetJob(ctx context.Context, v AppResourceJob_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job"] + o.Job = types.ListValueMust(t, vs) +} + +// GetSecret returns the value of the Secret field in AppResource_SdkV2 as +// a AppResourceSecret_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppResource_SdkV2) GetSecret(ctx context.Context) (AppResourceSecret_SdkV2, bool) { + var e AppResourceSecret_SdkV2 + if o.Secret.IsNull() || o.Secret.IsUnknown() { + return e, false + } + var v []AppResourceSecret_SdkV2 + d := o.Secret.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSecret sets the value of the Secret field in AppResource_SdkV2. +func (o *AppResource_SdkV2) SetSecret(ctx context.Context, v AppResourceSecret_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["secret"] + o.Secret = types.ListValueMust(t, vs) +} + +// GetServingEndpoint returns the value of the ServingEndpoint field in AppResource_SdkV2 as +// a AppResourceServingEndpoint_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppResource_SdkV2) GetServingEndpoint(ctx context.Context) (AppResourceServingEndpoint_SdkV2, bool) { + var e AppResourceServingEndpoint_SdkV2 + if o.ServingEndpoint.IsNull() || o.ServingEndpoint.IsUnknown() { + return e, false + } + var v []AppResourceServingEndpoint_SdkV2 + d := o.ServingEndpoint.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetServingEndpoint sets the value of the ServingEndpoint field in AppResource_SdkV2. +func (o *AppResource_SdkV2) SetServingEndpoint(ctx context.Context, v AppResourceServingEndpoint_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["serving_endpoint"] + o.ServingEndpoint = types.ListValueMust(t, vs) +} + +// GetSqlWarehouse returns the value of the SqlWarehouse field in AppResource_SdkV2 as +// a AppResourceSqlWarehouse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AppResource_SdkV2) GetSqlWarehouse(ctx context.Context) (AppResourceSqlWarehouse_SdkV2, bool) { + var e AppResourceSqlWarehouse_SdkV2 + if o.SqlWarehouse.IsNull() || o.SqlWarehouse.IsUnknown() { + return e, false + } + var v []AppResourceSqlWarehouse_SdkV2 + d := o.SqlWarehouse.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlWarehouse sets the value of the SqlWarehouse field in AppResource_SdkV2. +func (o *AppResource_SdkV2) SetSqlWarehouse(ctx context.Context, v AppResourceSqlWarehouse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_warehouse"] + o.SqlWarehouse = types.ListValueMust(t, vs) +} + +type AppResourceJob_SdkV2 struct { + // Id of the job to grant permission on. + Id types.String `tfsdk:"id" tf:""` + // Permissions to grant on the Job. Supported permissions are: "CAN_MANAGE", + // "IS_OWNER", "CAN_MANAGE_RUN", "CAN_VIEW". + Permission types.String `tfsdk:"permission" tf:""` +} + +func (newState *AppResourceJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResourceJob_SdkV2) { +} + +func (newState *AppResourceJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceJob_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceJob. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppResourceJob_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, AppResourceJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppResourceJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "permission": o.Permission, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppResourceJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "permission": types.StringType, + }, + } +} + +type AppResourceSecret_SdkV2 struct { + // Key of the secret to grant permission on. + Key types.String `tfsdk:"key" tf:""` + // Permission to grant on the secret scope. For secrets, only one permission + // is allowed. Permission must be one of: "READ", "WRITE", "MANAGE". + Permission types.String `tfsdk:"permission" tf:""` + // Scope of the secret to grant permission on. + Scope types.String `tfsdk:"scope" tf:""` +} + +func (newState *AppResourceSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResourceSecret_SdkV2) { +} + +func (newState *AppResourceSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceSecret_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSecret. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppResourceSecret_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, AppResourceSecret_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppResourceSecret_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "permission": o.Permission, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppResourceSecret_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "permission": types.StringType, + "scope": types.StringType, + }, + } +} + +type AppResourceServingEndpoint_SdkV2 struct { + // Name of the serving endpoint to grant permission on. + Name types.String `tfsdk:"name" tf:""` + // Permission to grant on the serving endpoint. Supported permissions are: + // "CAN_MANAGE", "CAN_QUERY", "CAN_VIEW". + Permission types.String `tfsdk:"permission" tf:""` +} + +func (newState *AppResourceServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResourceServingEndpoint_SdkV2) { +} + +func (newState *AppResourceServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceServingEndpoint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceServingEndpoint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppResourceServingEndpoint_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, AppResourceServingEndpoint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppResourceServingEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "permission": o.Permission, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppResourceServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "permission": types.StringType, + }, + } +} + +type AppResourceSqlWarehouse_SdkV2 struct { + // Id of the SQL warehouse to grant permission on. + Id types.String `tfsdk:"id" tf:""` + // Permission to grant on the SQL warehouse. Supported permissions are: + // "CAN_MANAGE", "CAN_USE", "IS_OWNER". + Permission types.String `tfsdk:"permission" tf:""` +} + +func (newState *AppResourceSqlWarehouse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AppResourceSqlWarehouse_SdkV2) { +} + +func (newState *AppResourceSqlWarehouse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AppResourceSqlWarehouse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AppResourceSqlWarehouse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AppResourceSqlWarehouse_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, AppResourceSqlWarehouse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AppResourceSqlWarehouse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "permission": o.Permission, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AppResourceSqlWarehouse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "permission": types.StringType, + }, + } +} + +type ApplicationStatus_SdkV2 struct { + // Application status message + Message types.String `tfsdk:"message" tf:"computed"` + // State of the application. + State types.String `tfsdk:"state" tf:"computed"` +} + +func (newState *ApplicationStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApplicationStatus_SdkV2) { +} + +func (newState *ApplicationStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApplicationStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ApplicationStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ApplicationStatus_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, ApplicationStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ApplicationStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ApplicationStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "state": types.StringType, + }, + } +} + +type ComputeStatus_SdkV2 struct { + // Compute status message + Message types.String `tfsdk:"message" tf:"computed"` + // State of the app compute. + State types.String `tfsdk:"state" tf:"computed"` +} + +func (newState *ComputeStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComputeStatus_SdkV2) { +} + +func (newState *ComputeStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComputeStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ComputeStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ComputeStatus_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, ComputeStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ComputeStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ComputeStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "state": types.StringType, + }, + } +} + +// Create an app deployment +type CreateAppDeploymentRequest_SdkV2 struct { + AppDeployment types.List `tfsdk:"app_deployment" tf:"optional,object"` + // The name of the app. + AppName types.String `tfsdk:"-"` +} + +func (newState *CreateAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppDeploymentRequest_SdkV2) { +} + +func (newState *CreateAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAppDeploymentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppDeploymentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAppDeploymentRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "app_deployment": reflect.TypeOf(AppDeployment_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, CreateAppDeploymentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAppDeploymentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_deployment": o.AppDeployment, + "app_name": o.AppName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAppDeploymentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_deployment": basetypes.ListType{ + ElemType: AppDeployment{}.Type(ctx), + }, + "app_name": types.StringType, + }, + } +} + +// GetAppDeployment returns the value of the AppDeployment field in CreateAppDeploymentRequest_SdkV2 as +// a AppDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAppDeploymentRequest_SdkV2) GetAppDeployment(ctx context.Context) (AppDeployment_SdkV2, bool) { + var e AppDeployment_SdkV2 + if o.AppDeployment.IsNull() || o.AppDeployment.IsUnknown() { + return e, false + } + var v []AppDeployment_SdkV2 + d := o.AppDeployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAppDeployment sets the value of the AppDeployment field in CreateAppDeploymentRequest_SdkV2. +func (o *CreateAppDeploymentRequest_SdkV2) SetAppDeployment(ctx context.Context, v AppDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["app_deployment"] + o.AppDeployment = types.ListValueMust(t, vs) +} + +// Create an app +type CreateAppRequest_SdkV2 struct { + App types.List `tfsdk:"app" tf:"optional,object"` +} + +func (newState *CreateAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAppRequest_SdkV2) { +} + +func (newState *CreateAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAppRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAppRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAppRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "app": reflect.TypeOf(App_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, CreateAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAppRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app": o.App, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app": basetypes.ListType{ + ElemType: App{}.Type(ctx), + }, + }, + } +} + +// GetApp returns the value of the App field in CreateAppRequest_SdkV2 as +// a App_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAppRequest_SdkV2) GetApp(ctx context.Context) (App_SdkV2, bool) { + var e App_SdkV2 + if o.App.IsNull() || o.App.IsUnknown() { + return e, false + } + var v []App_SdkV2 + d := o.App.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetApp sets the value of the App field in CreateAppRequest_SdkV2. +func (o *CreateAppRequest_SdkV2) SetApp(ctx context.Context, v App_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["app"] + o.App = types.ListValueMust(t, vs) +} + +// Delete an app +type DeleteAppRequest_SdkV2 struct { + // The name of the app. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAppRequest_SdkV2) { +} + +func (newState *DeleteAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAppRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAppRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAppRequest_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, DeleteAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAppRequest_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 DeleteAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get an app deployment +type GetAppDeploymentRequest_SdkV2 struct { + // The name of the app. + AppName types.String `tfsdk:"-"` + // The unique id of the deployment. + DeploymentId types.String `tfsdk:"-"` +} + +func (newState *GetAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppDeploymentRequest_SdkV2) { +} + +func (newState *GetAppDeploymentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppDeploymentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppDeploymentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAppDeploymentRequest_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, GetAppDeploymentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAppDeploymentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_name": o.AppName, + "deployment_id": o.DeploymentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAppDeploymentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_name": types.StringType, + "deployment_id": types.StringType, + }, + } +} + +// Get app permission levels +type GetAppPermissionLevelsRequest_SdkV2 struct { + // The app for which to get or manage permissions. + AppName types.String `tfsdk:"-"` +} + +func (newState *GetAppPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetAppPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAppPermissionLevelsRequest_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, GetAppPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_name": o.AppName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAppPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_name": types.StringType, + }, + } +} + +type GetAppPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetAppPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetAppPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAppPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(AppPermissionsDescription_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, GetAppPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAppPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: AppPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetAppPermissionLevelsResponse_SdkV2 as +// a slice of AppPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetAppPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]AppPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []AppPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetAppPermissionLevelsResponse_SdkV2. +func (o *GetAppPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []AppPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get app permissions +type GetAppPermissionsRequest_SdkV2 struct { + // The app for which to get or manage permissions. + AppName types.String `tfsdk:"-"` +} + +func (newState *GetAppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppPermissionsRequest_SdkV2) { +} + +func (newState *GetAppPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAppPermissionsRequest_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, GetAppPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_name": o.AppName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAppPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_name": types.StringType, + }, + } +} + +// Get an app +type GetAppRequest_SdkV2 struct { + // The name of the app. + Name types.String `tfsdk:"-"` +} + +func (newState *GetAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAppRequest_SdkV2) { +} + +func (newState *GetAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAppRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAppRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAppRequest_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, GetAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAppRequest_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 GetAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// List app deployments +type ListAppDeploymentsRequest_SdkV2 struct { + // The name of the app. + AppName types.String `tfsdk:"-"` + // Upper bound for items returned. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page of apps. Requests first page if + // absent. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAppDeploymentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsRequest_SdkV2) { +} + +func (newState *ListAppDeploymentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAppDeploymentsRequest_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, ListAppDeploymentsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAppDeploymentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_name": o.AppName, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAppDeploymentsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListAppDeploymentsResponse_SdkV2 struct { + // Deployment history of the app. + AppDeployments types.List `tfsdk:"app_deployments" tf:"optional"` + // Pagination token to request the next page of apps. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListAppDeploymentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppDeploymentsResponse_SdkV2) { +} + +func (newState *ListAppDeploymentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppDeploymentsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppDeploymentsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAppDeploymentsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "app_deployments": reflect.TypeOf(AppDeployment_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, ListAppDeploymentsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAppDeploymentsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_deployments": o.AppDeployments, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAppDeploymentsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_deployments": basetypes.ListType{ + ElemType: AppDeployment{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetAppDeployments returns the value of the AppDeployments field in ListAppDeploymentsResponse_SdkV2 as +// a slice of AppDeployment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAppDeploymentsResponse_SdkV2) GetAppDeployments(ctx context.Context) ([]AppDeployment_SdkV2, bool) { + if o.AppDeployments.IsNull() || o.AppDeployments.IsUnknown() { + return nil, false + } + var v []AppDeployment_SdkV2 + d := o.AppDeployments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAppDeployments sets the value of the AppDeployments field in ListAppDeploymentsResponse_SdkV2. +func (o *ListAppDeploymentsResponse_SdkV2) SetAppDeployments(ctx context.Context, v []AppDeployment_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["app_deployments"] + t = t.(attr.TypeWithElementType).ElementType() + o.AppDeployments = types.ListValueMust(t, vs) +} + +// List apps +type ListAppsRequest_SdkV2 struct { + // Upper bound for items returned. + PageSize types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page of apps. Requests first page if + // absent. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAppsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsRequest_SdkV2) { +} + +func (newState *ListAppsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAppsRequest_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, ListAppsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAppsRequest_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 ListAppsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListAppsResponse_SdkV2 struct { + Apps types.List `tfsdk:"apps" tf:"optional"` + // Pagination token to request the next page of apps. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListAppsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAppsResponse_SdkV2) { +} + +func (newState *ListAppsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAppsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAppsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAppsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "apps": reflect.TypeOf(App_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, ListAppsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAppsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAppsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apps": basetypes.ListType{ + ElemType: App{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetApps returns the value of the Apps field in ListAppsResponse_SdkV2 as +// a slice of App_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAppsResponse_SdkV2) GetApps(ctx context.Context) ([]App_SdkV2, bool) { + if o.Apps.IsNull() || o.Apps.IsUnknown() { + return nil, false + } + var v []App_SdkV2 + d := o.Apps.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetApps sets the value of the Apps field in ListAppsResponse_SdkV2. +func (o *ListAppsResponse_SdkV2) SetApps(ctx context.Context, v []App_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["apps"] + t = t.(attr.TypeWithElementType).ElementType() + o.Apps = types.ListValueMust(t, vs) +} + +type StartAppRequest_SdkV2 struct { + // The name of the app. + Name types.String `tfsdk:"-"` +} + +func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartAppRequest_SdkV2) { +} + +func (newState *StartAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartAppRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartAppRequest_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, StartAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartAppRequest_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 StartAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type StopAppRequest_SdkV2 struct { + // The name of the app. + Name types.String `tfsdk:"-"` +} + +func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopAppRequest_SdkV2) { +} + +func (newState *StopAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopAppRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StopAppRequest_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, StopAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StopAppRequest_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 StopAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Update an app +type UpdateAppRequest_SdkV2 struct { + App types.List `tfsdk:"app" tf:"optional,object"` + // The name of the app. The name must contain only lowercase alphanumeric + // characters and hyphens. It must be unique within the workspace. + Name types.String `tfsdk:"-"` +} + +func (newState *UpdateAppRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAppRequest_SdkV2) { +} + +func (newState *UpdateAppRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAppRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAppRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAppRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "app": reflect.TypeOf(App_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, UpdateAppRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAppRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app": o.App, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAppRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app": basetypes.ListType{ + ElemType: App{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetApp returns the value of the App field in UpdateAppRequest_SdkV2 as +// a App_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAppRequest_SdkV2) GetApp(ctx context.Context) (App_SdkV2, bool) { + var e App_SdkV2 + if o.App.IsNull() || o.App.IsUnknown() { + return e, false + } + var v []App_SdkV2 + d := o.App.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetApp sets the value of the App field in UpdateAppRequest_SdkV2. +func (o *UpdateAppRequest_SdkV2) SetApp(ctx context.Context, v App_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["app"] + o.App = types.ListValueMust(t, vs) +} diff --git a/internal/service/billing_tf/legacy_model.go b/internal/service/billing_tf/legacy_model.go new file mode 100755 index 000000000..1a60e0a09 --- /dev/null +++ b/internal/service/billing_tf/legacy_model.go @@ -0,0 +1,2715 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package billing_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type ActionConfiguration_SdkV2 struct { + // Databricks action configuration ID. + ActionConfigurationId types.String `tfsdk:"action_configuration_id" tf:"optional"` + // The type of the action. + ActionType types.String `tfsdk:"action_type" tf:"optional"` + // Target for the action. For example, an email address. + Target types.String `tfsdk:"target" tf:"optional"` +} + +func (newState *ActionConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ActionConfiguration_SdkV2) { +} + +func (newState *ActionConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState ActionConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ActionConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ActionConfiguration_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, ActionConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ActionConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "action_configuration_id": o.ActionConfigurationId, + "action_type": o.ActionType, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ActionConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "action_configuration_id": types.StringType, + "action_type": types.StringType, + "target": types.StringType, + }, + } +} + +type AlertConfiguration_SdkV2 struct { + // Configured actions for this alert. These define what happens when an + // alert enters a triggered state. + ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + // Databricks alert configuration ID. + AlertConfigurationId types.String `tfsdk:"alert_configuration_id" tf:"optional"` + // The threshold for the budget alert to determine if it is in a triggered + // state. The number is evaluated based on `quantity_type`. + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + // The way to calculate cost for this budget alert. This is what + // `quantity_threshold` is measured in. + QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + // The time window of usage data for the budget. + TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + // The evaluation method to determine when this budget alert is in a + // triggered state. + TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` +} + +func (newState *AlertConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConfiguration_SdkV2) { +} + +func (newState *AlertConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "action_configurations": reflect.TypeOf(ActionConfiguration_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, AlertConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "action_configurations": o.ActionConfigurations, + "alert_configuration_id": o.AlertConfigurationId, + "quantity_threshold": o.QuantityThreshold, + "quantity_type": o.QuantityType, + "time_period": o.TimePeriod, + "trigger_type": o.TriggerType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "action_configurations": basetypes.ListType{ + ElemType: ActionConfiguration{}.Type(ctx), + }, + "alert_configuration_id": types.StringType, + "quantity_threshold": types.StringType, + "quantity_type": types.StringType, + "time_period": types.StringType, + "trigger_type": types.StringType, + }, + } +} + +// GetActionConfigurations returns the value of the ActionConfigurations field in AlertConfiguration_SdkV2 as +// a slice of ActionConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertConfiguration_SdkV2) GetActionConfigurations(ctx context.Context) ([]ActionConfiguration_SdkV2, bool) { + if o.ActionConfigurations.IsNull() || o.ActionConfigurations.IsUnknown() { + return nil, false + } + var v []ActionConfiguration_SdkV2 + d := o.ActionConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetActionConfigurations sets the value of the ActionConfigurations field in AlertConfiguration_SdkV2. +func (o *AlertConfiguration_SdkV2) SetActionConfigurations(ctx context.Context, v []ActionConfiguration_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["action_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.ActionConfigurations = types.ListValueMust(t, vs) +} + +type BudgetConfiguration_SdkV2 struct { + // Databricks account ID. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Alerts to configure when this budget is in a triggered state. Budgets + // must have exactly one alert configuration. + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + // Databricks budget configuration ID. + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + // Creation time of this budget configuration. + CreateTime types.Int64 `tfsdk:"create_time" tf:"optional"` + // Human-readable name of budget configuration. Max Length: 128 + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Configured filters for this budget. These are applied to your account's + // usage to limit the scope of what is considered for this budget. Leave + // empty to include all usage for this account. All provided filters must be + // matched for usage to be included. + Filter types.List `tfsdk:"filter" tf:"optional,object"` + // Update time of this budget configuration. + UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` +} + +func (newState *BudgetConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfiguration_SdkV2) { +} + +func (newState *BudgetConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BudgetConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert_configurations": reflect.TypeOf(AlertConfiguration_SdkV2{}), + "filter": reflect.TypeOf(BudgetConfigurationFilter_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, BudgetConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BudgetConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "alert_configurations": o.AlertConfigurations, + "budget_configuration_id": o.BudgetConfigurationId, + "create_time": o.CreateTime, + "display_name": o.DisplayName, + "filter": o.Filter, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BudgetConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "alert_configurations": basetypes.ListType{ + ElemType: AlertConfiguration{}.Type(ctx), + }, + "budget_configuration_id": types.StringType, + "create_time": types.Int64Type, + "display_name": types.StringType, + "filter": basetypes.ListType{ + ElemType: BudgetConfigurationFilter{}.Type(ctx), + }, + "update_time": types.Int64Type, + }, + } +} + +// GetAlertConfigurations returns the value of the AlertConfigurations field in BudgetConfiguration_SdkV2 as +// a slice of AlertConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfiguration_SdkV2) GetAlertConfigurations(ctx context.Context) ([]AlertConfiguration_SdkV2, bool) { + if o.AlertConfigurations.IsNull() || o.AlertConfigurations.IsUnknown() { + return nil, false + } + var v []AlertConfiguration_SdkV2 + d := o.AlertConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAlertConfigurations sets the value of the AlertConfigurations field in BudgetConfiguration_SdkV2. +func (o *BudgetConfiguration_SdkV2) SetAlertConfigurations(ctx context.Context, v []AlertConfiguration_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["alert_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.AlertConfigurations = types.ListValueMust(t, vs) +} + +// GetFilter returns the value of the Filter field in BudgetConfiguration_SdkV2 as +// a BudgetConfigurationFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfiguration_SdkV2) GetFilter(ctx context.Context) (BudgetConfigurationFilter_SdkV2, bool) { + var e BudgetConfigurationFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []BudgetConfigurationFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in BudgetConfiguration_SdkV2. +func (o *BudgetConfiguration_SdkV2) SetFilter(ctx context.Context, v BudgetConfigurationFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type BudgetConfigurationFilter_SdkV2 struct { + // A list of tag keys and values that will limit the budget to usage that + // includes those specific custom tags. Tags are case-sensitive and should + // be entered exactly as they appear in your usage data. + Tags types.List `tfsdk:"tags" tf:"optional"` + // If provided, usage must match with the provided Databricks workspace IDs. + WorkspaceId types.List `tfsdk:"workspace_id" tf:"optional,object"` +} + +func (newState *BudgetConfigurationFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilter_SdkV2) { +} + +func (newState *BudgetConfigurationFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BudgetConfigurationFilter_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(BudgetConfigurationFilterTagClause_SdkV2{}), + "workspace_id": reflect.TypeOf(BudgetConfigurationFilterWorkspaceIdClause_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, BudgetConfigurationFilter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "tags": o.Tags, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BudgetConfigurationFilter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "tags": basetypes.ListType{ + ElemType: BudgetConfigurationFilterTagClause{}.Type(ctx), + }, + "workspace_id": basetypes.ListType{ + ElemType: BudgetConfigurationFilterWorkspaceIdClause{}.Type(ctx), + }, + }, + } +} + +// GetTags returns the value of the Tags field in BudgetConfigurationFilter_SdkV2 as +// a slice of BudgetConfigurationFilterTagClause_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfigurationFilter_SdkV2) GetTags(ctx context.Context) ([]BudgetConfigurationFilterTagClause_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []BudgetConfigurationFilterTagClause_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in BudgetConfigurationFilter_SdkV2. +func (o *BudgetConfigurationFilter_SdkV2) SetTags(ctx context.Context, v []BudgetConfigurationFilterTagClause_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// GetWorkspaceId returns the value of the WorkspaceId field in BudgetConfigurationFilter_SdkV2 as +// a BudgetConfigurationFilterWorkspaceIdClause_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfigurationFilter_SdkV2) GetWorkspaceId(ctx context.Context) (BudgetConfigurationFilterWorkspaceIdClause_SdkV2, bool) { + var e BudgetConfigurationFilterWorkspaceIdClause_SdkV2 + if o.WorkspaceId.IsNull() || o.WorkspaceId.IsUnknown() { + return e, false + } + var v []BudgetConfigurationFilterWorkspaceIdClause_SdkV2 + d := o.WorkspaceId.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkspaceId sets the value of the WorkspaceId field in BudgetConfigurationFilter_SdkV2. +func (o *BudgetConfigurationFilter_SdkV2) SetWorkspaceId(ctx context.Context, v BudgetConfigurationFilterWorkspaceIdClause_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace_id"] + o.WorkspaceId = types.ListValueMust(t, vs) +} + +type BudgetConfigurationFilterClause_SdkV2 struct { + Operator types.String `tfsdk:"operator" tf:"optional"` + + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *BudgetConfigurationFilterClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterClause_SdkV2) { +} + +func (newState *BudgetConfigurationFilterClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterClause_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterClause. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BudgetConfigurationFilterClause_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "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, BudgetConfigurationFilterClause_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterClause_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "operator": o.Operator, + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BudgetConfigurationFilterClause_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "operator": types.StringType, + "values": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetValues returns the value of the Values field in BudgetConfigurationFilterClause_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfigurationFilterClause_SdkV2) GetValues(ctx context.Context) ([]types.String, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in BudgetConfigurationFilterClause_SdkV2. +func (o *BudgetConfigurationFilterClause_SdkV2) SetValues(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["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type BudgetConfigurationFilterTagClause_SdkV2 struct { + Key types.String `tfsdk:"key" tf:"optional"` + + Value types.List `tfsdk:"value" tf:"optional,object"` +} + +func (newState *BudgetConfigurationFilterTagClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterTagClause_SdkV2) { +} + +func (newState *BudgetConfigurationFilterTagClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterTagClause_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterTagClause. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BudgetConfigurationFilterTagClause_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "value": reflect.TypeOf(BudgetConfigurationFilterClause_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, BudgetConfigurationFilterTagClause_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterTagClause_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 BudgetConfigurationFilterTagClause_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": basetypes.ListType{ + ElemType: BudgetConfigurationFilterClause{}.Type(ctx), + }, + }, + } +} + +// GetValue returns the value of the Value field in BudgetConfigurationFilterTagClause_SdkV2 as +// a BudgetConfigurationFilterClause_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfigurationFilterTagClause_SdkV2) GetValue(ctx context.Context) (BudgetConfigurationFilterClause_SdkV2, bool) { + var e BudgetConfigurationFilterClause_SdkV2 + if o.Value.IsNull() || o.Value.IsUnknown() { + return e, false + } + var v []BudgetConfigurationFilterClause_SdkV2 + d := o.Value.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetValue sets the value of the Value field in BudgetConfigurationFilterTagClause_SdkV2. +func (o *BudgetConfigurationFilterTagClause_SdkV2) SetValue(ctx context.Context, v BudgetConfigurationFilterClause_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] + o.Value = types.ListValueMust(t, vs) +} + +type BudgetConfigurationFilterWorkspaceIdClause_SdkV2 struct { + Operator types.String `tfsdk:"operator" tf:"optional"` + + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterWorkspaceIdClause_SdkV2) { +} + +func (newState *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SyncEffectiveFieldsDuringRead(existingState BudgetConfigurationFilterWorkspaceIdClause_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BudgetConfigurationFilterWorkspaceIdClause. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BudgetConfigurationFilterWorkspaceIdClause_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "values": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, BudgetConfigurationFilterWorkspaceIdClause_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterWorkspaceIdClause_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "operator": o.Operator, + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BudgetConfigurationFilterWorkspaceIdClause_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "operator": types.StringType, + "values": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetValues returns the value of the Values field in BudgetConfigurationFilterWorkspaceIdClause_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) GetValues(ctx context.Context) ([]types.Int64, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in BudgetConfigurationFilterWorkspaceIdClause_SdkV2. +func (o *BudgetConfigurationFilterWorkspaceIdClause_SdkV2) SetValues(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type CreateBillingUsageDashboardRequest_SdkV2 struct { + // Workspace level usage dashboard shows usage data for the specified + // workspace ID. Global level usage dashboard shows usage data for all + // workspaces in the account. + DashboardType types.String `tfsdk:"dashboard_type" tf:"optional"` + // The workspace ID of the workspace in which the usage dashboard is + // created. + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` +} + +func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardRequest_SdkV2) { +} + +func (newState *CreateBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBillingUsageDashboardRequest_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, CreateBillingUsageDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBillingUsageDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_type": o.DashboardType, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBillingUsageDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_type": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type CreateBillingUsageDashboardResponse_SdkV2 struct { + // The unique id of the usage dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` +} + +func (newState *CreateBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBillingUsageDashboardResponse_SdkV2) { +} + +func (newState *CreateBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBillingUsageDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBillingUsageDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBillingUsageDashboardResponse_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, CreateBillingUsageDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBillingUsageDashboardResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBillingUsageDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +type CreateBudgetConfigurationBudget_SdkV2 struct { + // Databricks account ID. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Alerts to configure when this budget is in a triggered state. Budgets + // must have exactly one alert configuration. + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + // Human-readable name of budget configuration. Max Length: 128 + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Configured filters for this budget. These are applied to your account's + // usage to limit the scope of what is considered for this budget. Leave + // empty to include all usage for this account. All provided filters must be + // matched for usage to be included. + Filter types.List `tfsdk:"filter" tf:"optional,object"` +} + +func (newState *CreateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudget_SdkV2) { +} + +func (newState *CreateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudget_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudget. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBudgetConfigurationBudget_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert_configurations": reflect.TypeOf(CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2{}), + "filter": reflect.TypeOf(BudgetConfigurationFilter_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, CreateBudgetConfigurationBudget_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudget_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "alert_configurations": o.AlertConfigurations, + "display_name": o.DisplayName, + "filter": o.Filter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBudgetConfigurationBudget_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "alert_configurations": basetypes.ListType{ + ElemType: CreateBudgetConfigurationBudgetAlertConfigurations{}.Type(ctx), + }, + "display_name": types.StringType, + "filter": basetypes.ListType{ + ElemType: BudgetConfigurationFilter{}.Type(ctx), + }, + }, + } +} + +// GetAlertConfigurations returns the value of the AlertConfigurations field in CreateBudgetConfigurationBudget_SdkV2 as +// a slice of CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateBudgetConfigurationBudget_SdkV2) GetAlertConfigurations(ctx context.Context) ([]CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2, bool) { + if o.AlertConfigurations.IsNull() || o.AlertConfigurations.IsUnknown() { + return nil, false + } + var v []CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 + d := o.AlertConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAlertConfigurations sets the value of the AlertConfigurations field in CreateBudgetConfigurationBudget_SdkV2. +func (o *CreateBudgetConfigurationBudget_SdkV2) SetAlertConfigurations(ctx context.Context, v []CreateBudgetConfigurationBudgetAlertConfigurations_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["alert_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.AlertConfigurations = types.ListValueMust(t, vs) +} + +// GetFilter returns the value of the Filter field in CreateBudgetConfigurationBudget_SdkV2 as +// a BudgetConfigurationFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateBudgetConfigurationBudget_SdkV2) GetFilter(ctx context.Context) (BudgetConfigurationFilter_SdkV2, bool) { + var e BudgetConfigurationFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []BudgetConfigurationFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in CreateBudgetConfigurationBudget_SdkV2. +func (o *CreateBudgetConfigurationBudget_SdkV2) SetFilter(ctx context.Context, v BudgetConfigurationFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type CreateBudgetConfigurationBudgetActionConfigurations_SdkV2 struct { + // The type of the action. + ActionType types.String `tfsdk:"action_type" tf:"optional"` + // Target for the action. For example, an email address. + Target types.String `tfsdk:"target" tf:"optional"` +} + +func (newState *CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) { +} + +func (newState *CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetActionConfigurations. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBudgetConfigurationBudgetActionConfigurations_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, CreateBudgetConfigurationBudgetActionConfigurations_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "action_type": o.ActionType, + "target": o.Target, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBudgetConfigurationBudgetActionConfigurations_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "action_type": types.StringType, + "target": types.StringType, + }, + } +} + +type CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 struct { + // Configured actions for this alert. These define what happens when an + // alert enters a triggered state. + ActionConfigurations types.List `tfsdk:"action_configurations" tf:"optional"` + // The threshold for the budget alert to determine if it is in a triggered + // state. The number is evaluated based on `quantity_type`. + QuantityThreshold types.String `tfsdk:"quantity_threshold" tf:"optional"` + // The way to calculate cost for this budget alert. This is what + // `quantity_threshold` is measured in. + QuantityType types.String `tfsdk:"quantity_type" tf:"optional"` + // The time window of usage data for the budget. + TimePeriod types.String `tfsdk:"time_period" tf:"optional"` + // The evaluation method to determine when this budget alert is in a + // triggered state. + TriggerType types.String `tfsdk:"trigger_type" tf:"optional"` +} + +func (newState *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) { +} + +func (newState *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationBudgetAlertConfigurations. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "action_configurations": reflect.TypeOf(CreateBudgetConfigurationBudgetActionConfigurations_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, CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "action_configurations": o.ActionConfigurations, + "quantity_threshold": o.QuantityThreshold, + "quantity_type": o.QuantityType, + "time_period": o.TimePeriod, + "trigger_type": o.TriggerType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "action_configurations": basetypes.ListType{ + ElemType: CreateBudgetConfigurationBudgetActionConfigurations{}.Type(ctx), + }, + "quantity_threshold": types.StringType, + "quantity_type": types.StringType, + "time_period": types.StringType, + "trigger_type": types.StringType, + }, + } +} + +// GetActionConfigurations returns the value of the ActionConfigurations field in CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2 as +// a slice of CreateBudgetConfigurationBudgetActionConfigurations_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) GetActionConfigurations(ctx context.Context) ([]CreateBudgetConfigurationBudgetActionConfigurations_SdkV2, bool) { + if o.ActionConfigurations.IsNull() || o.ActionConfigurations.IsUnknown() { + return nil, false + } + var v []CreateBudgetConfigurationBudgetActionConfigurations_SdkV2 + d := o.ActionConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetActionConfigurations sets the value of the ActionConfigurations field in CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2. +func (o *CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) SetActionConfigurations(ctx context.Context, v []CreateBudgetConfigurationBudgetActionConfigurations_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["action_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.ActionConfigurations = types.ListValueMust(t, vs) +} + +type CreateBudgetConfigurationRequest_SdkV2 struct { + // Properties of the new budget configuration. + Budget types.List `tfsdk:"budget" tf:"object"` +} + +func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationRequest_SdkV2) { +} + +func (newState *CreateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBudgetConfigurationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budget": reflect.TypeOf(CreateBudgetConfigurationBudget_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, CreateBudgetConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget": o.Budget, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget": basetypes.ListType{ + ElemType: CreateBudgetConfigurationBudget{}.Type(ctx), + }, + }, + } +} + +// GetBudget returns the value of the Budget field in CreateBudgetConfigurationRequest_SdkV2 as +// a CreateBudgetConfigurationBudget_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateBudgetConfigurationRequest_SdkV2) GetBudget(ctx context.Context) (CreateBudgetConfigurationBudget_SdkV2, bool) { + var e CreateBudgetConfigurationBudget_SdkV2 + if o.Budget.IsNull() || o.Budget.IsUnknown() { + return e, false + } + var v []CreateBudgetConfigurationBudget_SdkV2 + d := o.Budget.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBudget sets the value of the Budget field in CreateBudgetConfigurationRequest_SdkV2. +func (o *CreateBudgetConfigurationRequest_SdkV2) SetBudget(ctx context.Context, v CreateBudgetConfigurationBudget_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] + o.Budget = types.ListValueMust(t, vs) +} + +type CreateBudgetConfigurationResponse_SdkV2 struct { + // The created budget configuration. + Budget types.List `tfsdk:"budget" tf:"optional,object"` +} + +func (newState *CreateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationResponse_SdkV2) { +} + +func (newState *CreateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateBudgetConfigurationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateBudgetConfigurationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateBudgetConfigurationResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budget": reflect.TypeOf(BudgetConfiguration_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, CreateBudgetConfigurationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget": o.Budget, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget": basetypes.ListType{ + ElemType: BudgetConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetBudget returns the value of the Budget field in CreateBudgetConfigurationResponse_SdkV2 as +// a BudgetConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateBudgetConfigurationResponse_SdkV2) GetBudget(ctx context.Context) (BudgetConfiguration_SdkV2, bool) { + var e BudgetConfiguration_SdkV2 + if o.Budget.IsNull() || o.Budget.IsUnknown() { + return e, false + } + var v []BudgetConfiguration_SdkV2 + d := o.Budget.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBudget sets the value of the Budget field in CreateBudgetConfigurationResponse_SdkV2. +func (o *CreateBudgetConfigurationResponse_SdkV2) SetBudget(ctx context.Context, v BudgetConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] + o.Budget = types.ListValueMust(t, vs) +} + +type CreateLogDeliveryConfigurationParams_SdkV2 struct { + // The optional human-readable name of the log delivery configuration. + // Defaults to empty. + ConfigName types.String `tfsdk:"config_name" tf:"optional"` + // The ID for a method:credentials/create that represents the AWS IAM role + // with policy and trust relationship as described in the main billable + // usage documentation page. See [Configure billable usage delivery]. + // + // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + CredentialsId types.String `tfsdk:"credentials_id" tf:""` + // The optional delivery path prefix within Amazon S3 storage. Defaults to + // empty, which means that logs are delivered to the root of the bucket. + // This must be a valid S3 object key. This must not start or end with a + // slash character. + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the + // optional start month and year for delivery, specified in `YYYY-MM` + // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not + // available for usage before March 2019 (`2019-03`). + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + // Log delivery type. Supported values are: + // + // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the + // CSV schema, see the [View billable usage]. + // + // * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema, + // see [Configure audit logging] + // + // [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html + // [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + LogType types.String `tfsdk:"log_type" tf:""` + // The file type of log delivery. + // + // * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the + // CSV (comma-separated values) format is supported. For the schema, see the + // [View billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be + // `JSON`. Only the JSON (JavaScript Object Notation) format is supported. + // For the schema, see the [Configuring audit logs]. + // + // [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html + OutputFormat types.String `tfsdk:"output_format" tf:""` + // Status of log delivery configuration. Set to `ENABLED` (enabled) or + // `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable + // the configuration](#operation/patch-log-delivery-config-status) later. + // Deletion of a configuration is not supported, so disable a log delivery + // configuration that is no longer needed. + Status types.String `tfsdk:"status" tf:"optional"` + // The ID for a method:storage/create that represents the S3 bucket with + // bucket policy as described in the main billable usage documentation page. + // See [Configure billable usage delivery]. + // + // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:""` + // Optional filter that specifies workspace IDs to deliver logs for. By + // default the workspace filter is empty and log delivery applies at the + // account level, delivering workspace-level logs for all workspaces in your + // account, plus account level logs. You can optionally set this field to an + // array of workspace IDs (each one is an `int64`) to which log delivery + // should apply, in which case only workspace-level logs relating to the + // specified workspaces are delivered. If you plan to use different log + // delivery configurations for different workspaces, set this field + // explicitly. Be aware that delivery configurations mentioning specific + // workspaces won't apply to new workspaces created in the future, and + // delivery won't include account level logs. For some types of Databricks + // deployments there is only one workspace per account ID, so this field is + // unnecessary. + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` +} + +func (newState *CreateLogDeliveryConfigurationParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateLogDeliveryConfigurationParams_SdkV2) { +} + +func (newState *CreateLogDeliveryConfigurationParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateLogDeliveryConfigurationParams_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateLogDeliveryConfigurationParams. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateLogDeliveryConfigurationParams_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "workspace_ids_filter": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, CreateLogDeliveryConfigurationParams_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateLogDeliveryConfigurationParams_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config_name": o.ConfigName, + "credentials_id": o.CredentialsId, + "delivery_path_prefix": o.DeliveryPathPrefix, + "delivery_start_time": o.DeliveryStartTime, + "log_type": o.LogType, + "output_format": o.OutputFormat, + "status": o.Status, + "storage_configuration_id": o.StorageConfigurationId, + "workspace_ids_filter": o.WorkspaceIdsFilter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateLogDeliveryConfigurationParams_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config_name": types.StringType, + "credentials_id": types.StringType, + "delivery_path_prefix": types.StringType, + "delivery_start_time": types.StringType, + "log_type": types.StringType, + "output_format": types.StringType, + "status": types.StringType, + "storage_configuration_id": types.StringType, + "workspace_ids_filter": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetWorkspaceIdsFilter returns the value of the WorkspaceIdsFilter field in CreateLogDeliveryConfigurationParams_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateLogDeliveryConfigurationParams_SdkV2) GetWorkspaceIdsFilter(ctx context.Context) ([]types.Int64, bool) { + if o.WorkspaceIdsFilter.IsNull() || o.WorkspaceIdsFilter.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.WorkspaceIdsFilter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWorkspaceIdsFilter sets the value of the WorkspaceIdsFilter field in CreateLogDeliveryConfigurationParams_SdkV2. +func (o *CreateLogDeliveryConfigurationParams_SdkV2) SetWorkspaceIdsFilter(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace_ids_filter"] + t = t.(attr.TypeWithElementType).ElementType() + o.WorkspaceIdsFilter = types.ListValueMust(t, vs) +} + +// Delete budget +type DeleteBudgetConfigurationRequest_SdkV2 struct { + // The Databricks budget configuration ID. + BudgetId types.String `tfsdk:"-"` +} + +func (newState *DeleteBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteBudgetConfigurationRequest_SdkV2) { +} + +func (newState *DeleteBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteBudgetConfigurationRequest_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, DeleteBudgetConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteBudgetConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget_id": o.BudgetId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget_id": types.StringType, + }, + } +} + +type DeleteBudgetConfigurationResponse_SdkV2 struct { +} + +func (newState *DeleteBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteBudgetConfigurationResponse_SdkV2) { +} + +func (newState *DeleteBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteBudgetConfigurationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteBudgetConfigurationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteBudgetConfigurationResponse_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, DeleteBudgetConfigurationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteBudgetConfigurationResponse_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 DeleteBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Return billable usage logs +type DownloadRequest_SdkV2 struct { + // Format: `YYYY-MM`. Last month to return billable usage logs for. This + // field is required. + EndMonth types.String `tfsdk:"-"` + // Specify whether to include personally identifiable information in the + // billable usage logs, for example the email addresses of cluster creators. + // Handle this information with care. Defaults to false. + PersonalData types.Bool `tfsdk:"-"` + // Format: `YYYY-MM`. First month to return billable usage logs for. This + // field is required. + StartMonth types.String `tfsdk:"-"` +} + +func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest_SdkV2) { +} + +func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DownloadRequest_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, DownloadRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DownloadRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_month": o.EndMonth, + "personal_data": o.PersonalData, + "start_month": o.StartMonth, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DownloadRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_month": types.StringType, + "personal_data": types.BoolType, + "start_month": types.StringType, + }, + } +} + +type DownloadResponse_SdkV2 struct { + Contents types.Object `tfsdk:"-"` +} + +func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse_SdkV2) { +} + +func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DownloadResponse_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, DownloadResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DownloadResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "contents": o.Contents, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DownloadResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "contents": types.ObjectType{}, + }, + } +} + +// Get usage dashboard +type GetBillingUsageDashboardRequest_SdkV2 struct { + // Workspace level usage dashboard shows usage data for the specified + // workspace ID. Global level usage dashboard shows usage data for all + // workspaces in the account. + DashboardType types.String `tfsdk:"-"` + // The workspace ID of the workspace in which the usage dashboard is + // created. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *GetBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardRequest_SdkV2) { +} + +func (newState *GetBillingUsageDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetBillingUsageDashboardRequest_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, GetBillingUsageDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetBillingUsageDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_type": o.DashboardType, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetBillingUsageDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_type": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type GetBillingUsageDashboardResponse_SdkV2 struct { + // The unique id of the usage dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + // The URL of the usage dashboard. + DashboardUrl types.String `tfsdk:"dashboard_url" tf:"optional"` +} + +func (newState *GetBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBillingUsageDashboardResponse_SdkV2) { +} + +func (newState *GetBillingUsageDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBillingUsageDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBillingUsageDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetBillingUsageDashboardResponse_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, GetBillingUsageDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetBillingUsageDashboardResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "dashboard_url": o.DashboardUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetBillingUsageDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "dashboard_url": types.StringType, + }, + } +} + +// Get budget +type GetBudgetConfigurationRequest_SdkV2 struct { + // The budget configuration ID + BudgetId types.String `tfsdk:"-"` +} + +func (newState *GetBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationRequest_SdkV2) { +} + +func (newState *GetBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetBudgetConfigurationRequest_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, GetBudgetConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetBudgetConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget_id": o.BudgetId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget_id": types.StringType, + }, + } +} + +type GetBudgetConfigurationResponse_SdkV2 struct { + Budget types.List `tfsdk:"budget" tf:"optional,object"` +} + +func (newState *GetBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationResponse_SdkV2) { +} + +func (newState *GetBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBudgetConfigurationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBudgetConfigurationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetBudgetConfigurationResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budget": reflect.TypeOf(BudgetConfiguration_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, GetBudgetConfigurationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetBudgetConfigurationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget": o.Budget, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget": basetypes.ListType{ + ElemType: BudgetConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetBudget returns the value of the Budget field in GetBudgetConfigurationResponse_SdkV2 as +// a BudgetConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetBudgetConfigurationResponse_SdkV2) GetBudget(ctx context.Context) (BudgetConfiguration_SdkV2, bool) { + var e BudgetConfiguration_SdkV2 + if o.Budget.IsNull() || o.Budget.IsUnknown() { + return e, false + } + var v []BudgetConfiguration_SdkV2 + d := o.Budget.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBudget sets the value of the Budget field in GetBudgetConfigurationResponse_SdkV2. +func (o *GetBudgetConfigurationResponse_SdkV2) SetBudget(ctx context.Context, v BudgetConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] + o.Budget = types.ListValueMust(t, vs) +} + +// Get log delivery configuration +type GetLogDeliveryRequest_SdkV2 struct { + // Databricks log delivery configuration ID + LogDeliveryConfigurationId types.String `tfsdk:"-"` +} + +func (newState *GetLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLogDeliveryRequest_SdkV2) { +} + +func (newState *GetLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLogDeliveryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLogDeliveryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetLogDeliveryRequest_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, GetLogDeliveryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetLogDeliveryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_delivery_configuration_id": o.LogDeliveryConfigurationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLogDeliveryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_delivery_configuration_id": types.StringType, + }, + } +} + +// Get all budgets +type ListBudgetConfigurationsRequest_SdkV2 struct { + // A page token received from a previous get all budget configurations call. + // This token can be used to retrieve the subsequent page. Requests first + // page if absent. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListBudgetConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsRequest_SdkV2) { +} + +func (newState *ListBudgetConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListBudgetConfigurationsRequest_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, ListBudgetConfigurationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListBudgetConfigurationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListBudgetConfigurationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_token": types.StringType, + }, + } +} + +type ListBudgetConfigurationsResponse_SdkV2 struct { + Budgets types.List `tfsdk:"budgets" tf:"optional"` + // Token which can be sent as `page_token` to retrieve the next page of + // results. If this field is omitted, there are no subsequent budgets. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListBudgetConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListBudgetConfigurationsResponse_SdkV2) { +} + +func (newState *ListBudgetConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListBudgetConfigurationsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListBudgetConfigurationsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListBudgetConfigurationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budgets": reflect.TypeOf(BudgetConfiguration_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, ListBudgetConfigurationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListBudgetConfigurationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budgets": o.Budgets, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListBudgetConfigurationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budgets": basetypes.ListType{ + ElemType: BudgetConfiguration{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetBudgets returns the value of the Budgets field in ListBudgetConfigurationsResponse_SdkV2 as +// a slice of BudgetConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListBudgetConfigurationsResponse_SdkV2) GetBudgets(ctx context.Context) ([]BudgetConfiguration_SdkV2, bool) { + if o.Budgets.IsNull() || o.Budgets.IsUnknown() { + return nil, false + } + var v []BudgetConfiguration_SdkV2 + d := o.Budgets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetBudgets sets the value of the Budgets field in ListBudgetConfigurationsResponse_SdkV2. +func (o *ListBudgetConfigurationsResponse_SdkV2) SetBudgets(ctx context.Context, v []BudgetConfiguration_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["budgets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Budgets = types.ListValueMust(t, vs) +} + +// Get all log delivery configurations +type ListLogDeliveryRequest_SdkV2 struct { + // Filter by credential configuration ID. + CredentialsId types.String `tfsdk:"-"` + // Filter by status `ENABLED` or `DISABLED`. + Status types.String `tfsdk:"-"` + // Filter by storage configuration ID. + StorageConfigurationId types.String `tfsdk:"-"` +} + +func (newState *ListLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListLogDeliveryRequest_SdkV2) { +} + +func (newState *ListLogDeliveryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListLogDeliveryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListLogDeliveryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListLogDeliveryRequest_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, ListLogDeliveryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListLogDeliveryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + "status": o.Status, + "storage_configuration_id": o.StorageConfigurationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListLogDeliveryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credentials_id": types.StringType, + "status": types.StringType, + "storage_configuration_id": types.StringType, + }, + } +} + +type LogDeliveryConfiguration_SdkV2 struct { + // The Databricks account ID that hosts the log delivery configuration. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Databricks log delivery configuration ID. + ConfigId types.String `tfsdk:"config_id" tf:"optional"` + // The optional human-readable name of the log delivery configuration. + // Defaults to empty. + ConfigName types.String `tfsdk:"config_name" tf:"optional"` + // Time in epoch milliseconds when the log delivery configuration was + // created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + // The ID for a method:credentials/create that represents the AWS IAM role + // with policy and trust relationship as described in the main billable + // usage documentation page. See [Configure billable usage delivery]. + // + // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + // The optional delivery path prefix within Amazon S3 storage. Defaults to + // empty, which means that logs are delivered to the root of the bucket. + // This must be a valid S3 object key. This must not start or end with a + // slash character. + DeliveryPathPrefix types.String `tfsdk:"delivery_path_prefix" tf:"optional"` + // This field applies only if `log_type` is `BILLABLE_USAGE`. This is the + // optional start month and year for delivery, specified in `YYYY-MM` + // format. Defaults to current year and month. `BILLABLE_USAGE` logs are not + // available for usage before March 2019 (`2019-03`). + DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` + // Databricks log delivery status. + LogDeliveryStatus types.List `tfsdk:"log_delivery_status" tf:"optional,object"` + // Log delivery type. Supported values are: + // + // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the + // CSV schema, see the [View billable usage]. + // + // * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema, + // see [Configure audit logging] + // + // [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html + // [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + LogType types.String `tfsdk:"log_type" tf:"optional"` + // The file type of log delivery. + // + // * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the + // CSV (comma-separated values) format is supported. For the schema, see the + // [View billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be + // `JSON`. Only the JSON (JavaScript Object Notation) format is supported. + // For the schema, see the [Configuring audit logs]. + // + // [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + // [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html + OutputFormat types.String `tfsdk:"output_format" tf:"optional"` + // Status of log delivery configuration. Set to `ENABLED` (enabled) or + // `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable + // the configuration](#operation/patch-log-delivery-config-status) later. + // Deletion of a configuration is not supported, so disable a log delivery + // configuration that is no longer needed. + Status types.String `tfsdk:"status" tf:"optional"` + // The ID for a method:storage/create that represents the S3 bucket with + // bucket policy as described in the main billable usage documentation page. + // See [Configure billable usage delivery]. + // + // [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + // Time in epoch milliseconds when the log delivery configuration was + // updated. + UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` + // Optional filter that specifies workspace IDs to deliver logs for. By + // default the workspace filter is empty and log delivery applies at the + // account level, delivering workspace-level logs for all workspaces in your + // account, plus account level logs. You can optionally set this field to an + // array of workspace IDs (each one is an `int64`) to which log delivery + // should apply, in which case only workspace-level logs relating to the + // specified workspaces are delivered. If you plan to use different log + // delivery configurations for different workspaces, set this field + // explicitly. Be aware that delivery configurations mentioning specific + // workspaces won't apply to new workspaces created in the future, and + // delivery won't include account level logs. For some types of Databricks + // deployments there is only one workspace per account ID, so this field is + // unnecessary. + WorkspaceIdsFilter types.List `tfsdk:"workspace_ids_filter" tf:"optional"` +} + +func (newState *LogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryConfiguration_SdkV2) { +} + +func (newState *LogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogDeliveryConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogDeliveryConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "log_delivery_status": reflect.TypeOf(LogDeliveryStatus_SdkV2{}), + "workspace_ids_filter": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, LogDeliveryConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogDeliveryConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "config_id": o.ConfigId, + "config_name": o.ConfigName, + "creation_time": o.CreationTime, + "credentials_id": o.CredentialsId, + "delivery_path_prefix": o.DeliveryPathPrefix, + "delivery_start_time": o.DeliveryStartTime, + "log_delivery_status": o.LogDeliveryStatus, + "log_type": o.LogType, + "output_format": o.OutputFormat, + "status": o.Status, + "storage_configuration_id": o.StorageConfigurationId, + "update_time": o.UpdateTime, + "workspace_ids_filter": o.WorkspaceIdsFilter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogDeliveryConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "config_id": types.StringType, + "config_name": types.StringType, + "creation_time": types.Int64Type, + "credentials_id": types.StringType, + "delivery_path_prefix": types.StringType, + "delivery_start_time": types.StringType, + "log_delivery_status": basetypes.ListType{ + ElemType: LogDeliveryStatus{}.Type(ctx), + }, + "log_type": types.StringType, + "output_format": types.StringType, + "status": types.StringType, + "storage_configuration_id": types.StringType, + "update_time": types.Int64Type, + "workspace_ids_filter": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetLogDeliveryStatus returns the value of the LogDeliveryStatus field in LogDeliveryConfiguration_SdkV2 as +// a LogDeliveryStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LogDeliveryConfiguration_SdkV2) GetLogDeliveryStatus(ctx context.Context) (LogDeliveryStatus_SdkV2, bool) { + var e LogDeliveryStatus_SdkV2 + if o.LogDeliveryStatus.IsNull() || o.LogDeliveryStatus.IsUnknown() { + return e, false + } + var v []LogDeliveryStatus_SdkV2 + d := o.LogDeliveryStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLogDeliveryStatus sets the value of the LogDeliveryStatus field in LogDeliveryConfiguration_SdkV2. +func (o *LogDeliveryConfiguration_SdkV2) SetLogDeliveryStatus(ctx context.Context, v LogDeliveryStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_status"] + o.LogDeliveryStatus = types.ListValueMust(t, vs) +} + +// GetWorkspaceIdsFilter returns the value of the WorkspaceIdsFilter field in LogDeliveryConfiguration_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LogDeliveryConfiguration_SdkV2) GetWorkspaceIdsFilter(ctx context.Context) ([]types.Int64, bool) { + if o.WorkspaceIdsFilter.IsNull() || o.WorkspaceIdsFilter.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.WorkspaceIdsFilter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWorkspaceIdsFilter sets the value of the WorkspaceIdsFilter field in LogDeliveryConfiguration_SdkV2. +func (o *LogDeliveryConfiguration_SdkV2) SetWorkspaceIdsFilter(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace_ids_filter"] + t = t.(attr.TypeWithElementType).ElementType() + o.WorkspaceIdsFilter = types.ListValueMust(t, vs) +} + +// Databricks log delivery status. +type LogDeliveryStatus_SdkV2 struct { + // The UTC time for the latest log delivery attempt. + LastAttemptTime types.String `tfsdk:"last_attempt_time" tf:"optional"` + // The UTC time for the latest successful log delivery. + LastSuccessfulAttemptTime types.String `tfsdk:"last_successful_attempt_time" tf:"optional"` + // Informative message about the latest log delivery attempt. If the log + // delivery fails with USER_FAILURE, error details will be provided for + // fixing misconfigurations in cloud permissions. + Message types.String `tfsdk:"message" tf:"optional"` + // The status string for log delivery. Possible values are: * `CREATED`: + // There were no log delivery attempts since the config was created. * + // `SUCCEEDED`: The latest attempt of log delivery has succeeded completely. + // * `USER_FAILURE`: The latest attempt of log delivery failed because of + // misconfiguration of customer provided permissions on role or storage. * + // `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an + // Databricks internal error. Contact support if it doesn't go away soon. * + // `NOT_FOUND`: The log delivery status as the configuration has been + // disabled since the release of this feature or there are no workspaces in + // the account. + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *LogDeliveryStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogDeliveryStatus_SdkV2) { +} + +func (newState *LogDeliveryStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogDeliveryStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogDeliveryStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogDeliveryStatus_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, LogDeliveryStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogDeliveryStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "last_attempt_time": o.LastAttemptTime, + "last_successful_attempt_time": o.LastSuccessfulAttemptTime, + "message": o.Message, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogDeliveryStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "last_attempt_time": types.StringType, + "last_successful_attempt_time": types.StringType, + "message": types.StringType, + "status": types.StringType, + }, + } +} + +type PatchStatusResponse_SdkV2 struct { +} + +func (newState *PatchStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchStatusResponse_SdkV2) { +} + +func (newState *PatchStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchStatusResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchStatusResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PatchStatusResponse_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, PatchStatusResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PatchStatusResponse_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 PatchStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateBudgetConfigurationBudget_SdkV2 struct { + // Databricks account ID. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Alerts to configure when this budget is in a triggered state. Budgets + // must have exactly one alert configuration. + AlertConfigurations types.List `tfsdk:"alert_configurations" tf:"optional"` + // Databricks budget configuration ID. + BudgetConfigurationId types.String `tfsdk:"budget_configuration_id" tf:"optional"` + // Human-readable name of budget configuration. Max Length: 128 + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Configured filters for this budget. These are applied to your account's + // usage to limit the scope of what is considered for this budget. Leave + // empty to include all usage for this account. All provided filters must be + // matched for usage to be included. + Filter types.List `tfsdk:"filter" tf:"optional,object"` +} + +func (newState *UpdateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationBudget_SdkV2) { +} + +func (newState *UpdateBudgetConfigurationBudget_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationBudget_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationBudget. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateBudgetConfigurationBudget_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert_configurations": reflect.TypeOf(AlertConfiguration_SdkV2{}), + "filter": reflect.TypeOf(BudgetConfigurationFilter_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, UpdateBudgetConfigurationBudget_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationBudget_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "alert_configurations": o.AlertConfigurations, + "budget_configuration_id": o.BudgetConfigurationId, + "display_name": o.DisplayName, + "filter": o.Filter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateBudgetConfigurationBudget_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "alert_configurations": basetypes.ListType{ + ElemType: AlertConfiguration{}.Type(ctx), + }, + "budget_configuration_id": types.StringType, + "display_name": types.StringType, + "filter": basetypes.ListType{ + ElemType: BudgetConfigurationFilter{}.Type(ctx), + }, + }, + } +} + +// GetAlertConfigurations returns the value of the AlertConfigurations field in UpdateBudgetConfigurationBudget_SdkV2 as +// a slice of AlertConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateBudgetConfigurationBudget_SdkV2) GetAlertConfigurations(ctx context.Context) ([]AlertConfiguration_SdkV2, bool) { + if o.AlertConfigurations.IsNull() || o.AlertConfigurations.IsUnknown() { + return nil, false + } + var v []AlertConfiguration_SdkV2 + d := o.AlertConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAlertConfigurations sets the value of the AlertConfigurations field in UpdateBudgetConfigurationBudget_SdkV2. +func (o *UpdateBudgetConfigurationBudget_SdkV2) SetAlertConfigurations(ctx context.Context, v []AlertConfiguration_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["alert_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.AlertConfigurations = types.ListValueMust(t, vs) +} + +// GetFilter returns the value of the Filter field in UpdateBudgetConfigurationBudget_SdkV2 as +// a BudgetConfigurationFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateBudgetConfigurationBudget_SdkV2) GetFilter(ctx context.Context) (BudgetConfigurationFilter_SdkV2, bool) { + var e BudgetConfigurationFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []BudgetConfigurationFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in UpdateBudgetConfigurationBudget_SdkV2. +func (o *UpdateBudgetConfigurationBudget_SdkV2) SetFilter(ctx context.Context, v BudgetConfigurationFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type UpdateBudgetConfigurationRequest_SdkV2 struct { + // The updated budget. This will overwrite the budget specified by the + // budget ID. + Budget types.List `tfsdk:"budget" tf:"object"` + // The Databricks budget configuration ID. + BudgetId types.String `tfsdk:"-"` +} + +func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationRequest_SdkV2) { +} + +func (newState *UpdateBudgetConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateBudgetConfigurationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budget": reflect.TypeOf(UpdateBudgetConfigurationBudget_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, UpdateBudgetConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget": o.Budget, + "budget_id": o.BudgetId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget": basetypes.ListType{ + ElemType: UpdateBudgetConfigurationBudget{}.Type(ctx), + }, + "budget_id": types.StringType, + }, + } +} + +// GetBudget returns the value of the Budget field in UpdateBudgetConfigurationRequest_SdkV2 as +// a UpdateBudgetConfigurationBudget_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateBudgetConfigurationRequest_SdkV2) GetBudget(ctx context.Context) (UpdateBudgetConfigurationBudget_SdkV2, bool) { + var e UpdateBudgetConfigurationBudget_SdkV2 + if o.Budget.IsNull() || o.Budget.IsUnknown() { + return e, false + } + var v []UpdateBudgetConfigurationBudget_SdkV2 + d := o.Budget.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBudget sets the value of the Budget field in UpdateBudgetConfigurationRequest_SdkV2. +func (o *UpdateBudgetConfigurationRequest_SdkV2) SetBudget(ctx context.Context, v UpdateBudgetConfigurationBudget_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] + o.Budget = types.ListValueMust(t, vs) +} + +type UpdateBudgetConfigurationResponse_SdkV2 struct { + // The updated budget. + Budget types.List `tfsdk:"budget" tf:"optional,object"` +} + +func (newState *UpdateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationResponse_SdkV2) { +} + +func (newState *UpdateBudgetConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateBudgetConfigurationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateBudgetConfigurationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateBudgetConfigurationResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "budget": reflect.TypeOf(BudgetConfiguration_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, UpdateBudgetConfigurationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget": o.Budget, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget": basetypes.ListType{ + ElemType: BudgetConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetBudget returns the value of the Budget field in UpdateBudgetConfigurationResponse_SdkV2 as +// a BudgetConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateBudgetConfigurationResponse_SdkV2) GetBudget(ctx context.Context) (BudgetConfiguration_SdkV2, bool) { + var e BudgetConfiguration_SdkV2 + if o.Budget.IsNull() || o.Budget.IsUnknown() { + return e, false + } + var v []BudgetConfiguration_SdkV2 + d := o.Budget.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBudget sets the value of the Budget field in UpdateBudgetConfigurationResponse_SdkV2. +func (o *UpdateBudgetConfigurationResponse_SdkV2) SetBudget(ctx context.Context, v BudgetConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] + o.Budget = types.ListValueMust(t, vs) +} + +type UpdateLogDeliveryConfigurationStatusRequest_SdkV2 struct { + // Databricks log delivery configuration ID + LogDeliveryConfigurationId types.String `tfsdk:"-"` + // Status of log delivery configuration. Set to `ENABLED` (enabled) or + // `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable + // the configuration](#operation/patch-log-delivery-config-status) later. + // Deletion of a configuration is not supported, so disable a log delivery + // configuration that is no longer needed. + Status types.String `tfsdk:"status" tf:""` +} + +func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateLogDeliveryConfigurationStatusRequest_SdkV2) { +} + +func (newState *UpdateLogDeliveryConfigurationStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateLogDeliveryConfigurationStatusRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateLogDeliveryConfigurationStatusRequest_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, UpdateLogDeliveryConfigurationStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateLogDeliveryConfigurationStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_delivery_configuration_id": o.LogDeliveryConfigurationId, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateLogDeliveryConfigurationStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_delivery_configuration_id": types.StringType, + "status": types.StringType, + }, + } +} + +type WrappedCreateLogDeliveryConfiguration_SdkV2 struct { + LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` +} + +func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration_SdkV2) { +} + +func (newState *WrappedCreateLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedCreateLogDeliveryConfiguration_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WrappedCreateLogDeliveryConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "log_delivery_configuration": reflect.TypeOf(CreateLogDeliveryConfigurationParams_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, WrappedCreateLogDeliveryConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WrappedCreateLogDeliveryConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_delivery_configuration": o.LogDeliveryConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WrappedCreateLogDeliveryConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_delivery_configuration": basetypes.ListType{ + ElemType: CreateLogDeliveryConfigurationParams{}.Type(ctx), + }, + }, + } +} + +// GetLogDeliveryConfiguration returns the value of the LogDeliveryConfiguration field in WrappedCreateLogDeliveryConfiguration_SdkV2 as +// a CreateLogDeliveryConfigurationParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *WrappedCreateLogDeliveryConfiguration_SdkV2) GetLogDeliveryConfiguration(ctx context.Context) (CreateLogDeliveryConfigurationParams_SdkV2, bool) { + var e CreateLogDeliveryConfigurationParams_SdkV2 + if o.LogDeliveryConfiguration.IsNull() || o.LogDeliveryConfiguration.IsUnknown() { + return e, false + } + var v []CreateLogDeliveryConfigurationParams_SdkV2 + d := o.LogDeliveryConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLogDeliveryConfiguration sets the value of the LogDeliveryConfiguration field in WrappedCreateLogDeliveryConfiguration_SdkV2. +func (o *WrappedCreateLogDeliveryConfiguration_SdkV2) SetLogDeliveryConfiguration(ctx context.Context, v CreateLogDeliveryConfigurationParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_configuration"] + o.LogDeliveryConfiguration = types.ListValueMust(t, vs) +} + +type WrappedLogDeliveryConfiguration_SdkV2 struct { + LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` +} + +func (newState *WrappedLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfiguration_SdkV2) { +} + +func (newState *WrappedLogDeliveryConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WrappedLogDeliveryConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "log_delivery_configuration": reflect.TypeOf(LogDeliveryConfiguration_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, WrappedLogDeliveryConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WrappedLogDeliveryConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_delivery_configuration": o.LogDeliveryConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WrappedLogDeliveryConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_delivery_configuration": basetypes.ListType{ + ElemType: LogDeliveryConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetLogDeliveryConfiguration returns the value of the LogDeliveryConfiguration field in WrappedLogDeliveryConfiguration_SdkV2 as +// a LogDeliveryConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *WrappedLogDeliveryConfiguration_SdkV2) GetLogDeliveryConfiguration(ctx context.Context) (LogDeliveryConfiguration_SdkV2, bool) { + var e LogDeliveryConfiguration_SdkV2 + if o.LogDeliveryConfiguration.IsNull() || o.LogDeliveryConfiguration.IsUnknown() { + return e, false + } + var v []LogDeliveryConfiguration_SdkV2 + d := o.LogDeliveryConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLogDeliveryConfiguration sets the value of the LogDeliveryConfiguration field in WrappedLogDeliveryConfiguration_SdkV2. +func (o *WrappedLogDeliveryConfiguration_SdkV2) SetLogDeliveryConfiguration(ctx context.Context, v LogDeliveryConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_configuration"] + o.LogDeliveryConfiguration = types.ListValueMust(t, vs) +} + +type WrappedLogDeliveryConfigurations_SdkV2 struct { + LogDeliveryConfigurations types.List `tfsdk:"log_delivery_configurations" tf:"optional"` +} + +func (newState *WrappedLogDeliveryConfigurations_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfigurations_SdkV2) { +} + +func (newState *WrappedLogDeliveryConfigurations_SdkV2) SyncEffectiveFieldsDuringRead(existingState WrappedLogDeliveryConfigurations_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WrappedLogDeliveryConfigurations. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WrappedLogDeliveryConfigurations_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "log_delivery_configurations": reflect.TypeOf(LogDeliveryConfiguration_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, WrappedLogDeliveryConfigurations_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WrappedLogDeliveryConfigurations_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_delivery_configurations": o.LogDeliveryConfigurations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WrappedLogDeliveryConfigurations_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_delivery_configurations": basetypes.ListType{ + ElemType: LogDeliveryConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetLogDeliveryConfigurations returns the value of the LogDeliveryConfigurations field in WrappedLogDeliveryConfigurations_SdkV2 as +// a slice of LogDeliveryConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WrappedLogDeliveryConfigurations_SdkV2) GetLogDeliveryConfigurations(ctx context.Context) ([]LogDeliveryConfiguration_SdkV2, bool) { + if o.LogDeliveryConfigurations.IsNull() || o.LogDeliveryConfigurations.IsUnknown() { + return nil, false + } + var v []LogDeliveryConfiguration_SdkV2 + d := o.LogDeliveryConfigurations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLogDeliveryConfigurations sets the value of the LogDeliveryConfigurations field in WrappedLogDeliveryConfigurations_SdkV2. +func (o *WrappedLogDeliveryConfigurations_SdkV2) SetLogDeliveryConfigurations(ctx context.Context, v []LogDeliveryConfiguration_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["log_delivery_configurations"] + t = t.(attr.TypeWithElementType).ElementType() + o.LogDeliveryConfigurations = types.ListValueMust(t, vs) +} diff --git a/internal/service/billing_tf/model.go b/internal/service/billing_tf/model.go index 45f387b50..3073e7c70 100755 --- a/internal/service/billing_tf/model.go +++ b/internal/service/billing_tf/model.go @@ -183,7 +183,7 @@ type BudgetConfiguration struct { // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"optional,object"` // Update time of this budget configuration. UpdateTime types.Int64 `tfsdk:"update_time" tf:"optional"` } @@ -236,10 +236,8 @@ func (o BudgetConfiguration) Type(ctx context.Context) attr.Type { "budget_configuration_id": types.StringType, "create_time": types.Int64Type, "display_name": types.StringType, - "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), - }, - "update_time": types.Int64Type, + "filter": BudgetConfigurationFilter{}.Type(ctx), + "update_time": types.Int64Type, }, } } @@ -279,7 +277,10 @@ func (o *BudgetConfiguration) GetFilter(ctx context.Context) (BudgetConfiguratio return e, false } var v []BudgetConfigurationFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -291,9 +292,8 @@ func (o *BudgetConfiguration) GetFilter(ctx context.Context) (BudgetConfiguratio // SetFilter sets the value of the Filter field in BudgetConfiguration. func (o *BudgetConfiguration) SetFilter(ctx context.Context, v BudgetConfigurationFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type BudgetConfigurationFilter struct { @@ -302,7 +302,7 @@ type BudgetConfigurationFilter struct { // be entered exactly as they appear in your usage data. Tags types.List `tfsdk:"tags" tf:"optional"` // If provided, usage must match with the provided Databricks workspace IDs. - WorkspaceId types.List `tfsdk:"workspace_id" tf:"optional,object"` + WorkspaceId types.Object `tfsdk:"workspace_id" tf:"optional,object"` } func (newState *BudgetConfigurationFilter) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilter) { @@ -344,9 +344,7 @@ func (o BudgetConfigurationFilter) Type(ctx context.Context) attr.Type { "tags": basetypes.ListType{ ElemType: BudgetConfigurationFilterTagClause{}.Type(ctx), }, - "workspace_id": basetypes.ListType{ - ElemType: BudgetConfigurationFilterWorkspaceIdClause{}.Type(ctx), - }, + "workspace_id": BudgetConfigurationFilterWorkspaceIdClause{}.Type(ctx), }, } } @@ -386,7 +384,10 @@ func (o *BudgetConfigurationFilter) GetWorkspaceId(ctx context.Context) (BudgetC return e, false } var v []BudgetConfigurationFilterWorkspaceIdClause - d := o.WorkspaceId.ElementsAs(ctx, &v, true) + d := o.WorkspaceId.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -398,9 +399,8 @@ func (o *BudgetConfigurationFilter) GetWorkspaceId(ctx context.Context) (BudgetC // SetWorkspaceId sets the value of the WorkspaceId field in BudgetConfigurationFilter. func (o *BudgetConfigurationFilter) SetWorkspaceId(ctx context.Context, v BudgetConfigurationFilterWorkspaceIdClause) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace_id"] - o.WorkspaceId = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkspaceId = vs } type BudgetConfigurationFilterClause struct { @@ -481,7 +481,7 @@ func (o *BudgetConfigurationFilterClause) SetValues(ctx context.Context, v []typ type BudgetConfigurationFilterTagClause struct { Key types.String `tfsdk:"key" tf:"optional"` - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"optional,object"` } func (newState *BudgetConfigurationFilterTagClause) SyncEffectiveFieldsDuringCreateOrUpdate(plan BudgetConfigurationFilterTagClause) { @@ -519,10 +519,8 @@ func (o BudgetConfigurationFilterTagClause) ToObjectValue(ctx context.Context) b func (o BudgetConfigurationFilterTagClause) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "key": types.StringType, - "value": basetypes.ListType{ - ElemType: BudgetConfigurationFilterClause{}.Type(ctx), - }, + "key": types.StringType, + "value": BudgetConfigurationFilterClause{}.Type(ctx), }, } } @@ -536,7 +534,10 @@ func (o *BudgetConfigurationFilterTagClause) GetValue(ctx context.Context) (Budg return e, false } var v []BudgetConfigurationFilterClause - d := o.Value.ElementsAs(ctx, &v, true) + d := o.Value.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -548,9 +549,8 @@ func (o *BudgetConfigurationFilterTagClause) GetValue(ctx context.Context) (Budg // SetValue sets the value of the Value field in BudgetConfigurationFilterTagClause. func (o *BudgetConfigurationFilterTagClause) SetValue(ctx context.Context, v BudgetConfigurationFilterClause) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] - o.Value = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Value = vs } type BudgetConfigurationFilterWorkspaceIdClause struct { @@ -731,7 +731,7 @@ type CreateBudgetConfigurationBudget struct { // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"optional,object"` } func (newState *CreateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationBudget) { @@ -777,9 +777,7 @@ func (o CreateBudgetConfigurationBudget) Type(ctx context.Context) attr.Type { ElemType: CreateBudgetConfigurationBudgetAlertConfigurations{}.Type(ctx), }, "display_name": types.StringType, - "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), - }, + "filter": BudgetConfigurationFilter{}.Type(ctx), }, } } @@ -819,7 +817,10 @@ func (o *CreateBudgetConfigurationBudget) GetFilter(ctx context.Context) (Budget return e, false } var v []BudgetConfigurationFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -831,9 +832,8 @@ func (o *CreateBudgetConfigurationBudget) GetFilter(ctx context.Context) (Budget // SetFilter sets the value of the Filter field in CreateBudgetConfigurationBudget. func (o *CreateBudgetConfigurationBudget) SetFilter(ctx context.Context, v BudgetConfigurationFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type CreateBudgetConfigurationBudgetActionConfigurations struct { @@ -976,7 +976,7 @@ func (o *CreateBudgetConfigurationBudgetAlertConfigurations) SetActionConfigurat type CreateBudgetConfigurationRequest struct { // Properties of the new budget configuration. - Budget types.List `tfsdk:"budget" tf:"object"` + Budget types.Object `tfsdk:"budget" tf:"object"` } func (newState *CreateBudgetConfigurationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationRequest) { @@ -1013,9 +1013,7 @@ func (o CreateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) bas func (o CreateBudgetConfigurationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget": basetypes.ListType{ - ElemType: CreateBudgetConfigurationBudget{}.Type(ctx), - }, + "budget": CreateBudgetConfigurationBudget{}.Type(ctx), }, } } @@ -1029,7 +1027,10 @@ func (o *CreateBudgetConfigurationRequest) GetBudget(ctx context.Context) (Creat return e, false } var v []CreateBudgetConfigurationBudget - d := o.Budget.ElementsAs(ctx, &v, true) + d := o.Budget.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1041,14 +1042,13 @@ func (o *CreateBudgetConfigurationRequest) GetBudget(ctx context.Context) (Creat // SetBudget sets the value of the Budget field in CreateBudgetConfigurationRequest. func (o *CreateBudgetConfigurationRequest) SetBudget(ctx context.Context, v CreateBudgetConfigurationBudget) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] - o.Budget = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Budget = vs } type CreateBudgetConfigurationResponse struct { // The created budget configuration. - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"optional,object"` } func (newState *CreateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateBudgetConfigurationResponse) { @@ -1085,9 +1085,7 @@ func (o CreateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) ba func (o CreateBudgetConfigurationResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), - }, + "budget": BudgetConfiguration{}.Type(ctx), }, } } @@ -1101,7 +1099,10 @@ func (o *CreateBudgetConfigurationResponse) GetBudget(ctx context.Context) (Budg return e, false } var v []BudgetConfiguration - d := o.Budget.ElementsAs(ctx, &v, true) + d := o.Budget.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1113,9 +1114,8 @@ func (o *CreateBudgetConfigurationResponse) GetBudget(ctx context.Context) (Budg // SetBudget sets the value of the Budget field in CreateBudgetConfigurationResponse. func (o *CreateBudgetConfigurationResponse) SetBudget(ctx context.Context, v BudgetConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] - o.Budget = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Budget = vs } type CreateLogDeliveryConfigurationParams struct { @@ -1588,7 +1588,7 @@ func (o GetBudgetConfigurationRequest) Type(ctx context.Context) attr.Type { } type GetBudgetConfigurationResponse struct { - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"optional,object"` } func (newState *GetBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBudgetConfigurationResponse) { @@ -1625,9 +1625,7 @@ func (o GetBudgetConfigurationResponse) ToObjectValue(ctx context.Context) baset func (o GetBudgetConfigurationResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), - }, + "budget": BudgetConfiguration{}.Type(ctx), }, } } @@ -1641,7 +1639,10 @@ func (o *GetBudgetConfigurationResponse) GetBudget(ctx context.Context) (BudgetC return e, false } var v []BudgetConfiguration - d := o.Budget.ElementsAs(ctx, &v, true) + d := o.Budget.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1653,9 +1654,8 @@ func (o *GetBudgetConfigurationResponse) GetBudget(ctx context.Context) (BudgetC // SetBudget sets the value of the Budget field in GetBudgetConfigurationResponse. func (o *GetBudgetConfigurationResponse) SetBudget(ctx context.Context, v BudgetConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] - o.Budget = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Budget = vs } // Get log delivery configuration @@ -1901,7 +1901,7 @@ type LogDeliveryConfiguration struct { // available for usage before March 2019 (`2019-03`). DeliveryStartTime types.String `tfsdk:"delivery_start_time" tf:"optional"` // Databricks log delivery status. - LogDeliveryStatus types.List `tfsdk:"log_delivery_status" tf:"optional,object"` + LogDeliveryStatus types.Object `tfsdk:"log_delivery_status" tf:"optional,object"` // Log delivery type. Supported values are: // // * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the @@ -2005,16 +2005,14 @@ func (o LogDeliveryConfiguration) ToObjectValue(ctx context.Context) basetypes.O func (o LogDeliveryConfiguration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "config_id": types.StringType, - "config_name": types.StringType, - "creation_time": types.Int64Type, - "credentials_id": types.StringType, - "delivery_path_prefix": types.StringType, - "delivery_start_time": types.StringType, - "log_delivery_status": basetypes.ListType{ - ElemType: LogDeliveryStatus{}.Type(ctx), - }, + "account_id": types.StringType, + "config_id": types.StringType, + "config_name": types.StringType, + "creation_time": types.Int64Type, + "credentials_id": types.StringType, + "delivery_path_prefix": types.StringType, + "delivery_start_time": types.StringType, + "log_delivery_status": LogDeliveryStatus{}.Type(ctx), "log_type": types.StringType, "output_format": types.StringType, "status": types.StringType, @@ -2036,7 +2034,10 @@ func (o *LogDeliveryConfiguration) GetLogDeliveryStatus(ctx context.Context) (Lo return e, false } var v []LogDeliveryStatus - d := o.LogDeliveryStatus.ElementsAs(ctx, &v, true) + d := o.LogDeliveryStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2048,9 +2049,8 @@ func (o *LogDeliveryConfiguration) GetLogDeliveryStatus(ctx context.Context) (Lo // SetLogDeliveryStatus sets the value of the LogDeliveryStatus field in LogDeliveryConfiguration. func (o *LogDeliveryConfiguration) SetLogDeliveryStatus(ctx context.Context, v LogDeliveryStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_status"] - o.LogDeliveryStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LogDeliveryStatus = vs } // GetWorkspaceIdsFilter returns the value of the WorkspaceIdsFilter field in LogDeliveryConfiguration as @@ -2195,7 +2195,7 @@ type UpdateBudgetConfigurationBudget struct { // usage to limit the scope of what is considered for this budget. Leave // empty to include all usage for this account. All provided filters must be // matched for usage to be included. - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"optional,object"` } func (newState *UpdateBudgetConfigurationBudget) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationBudget) { @@ -2243,9 +2243,7 @@ func (o UpdateBudgetConfigurationBudget) Type(ctx context.Context) attr.Type { }, "budget_configuration_id": types.StringType, "display_name": types.StringType, - "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), - }, + "filter": BudgetConfigurationFilter{}.Type(ctx), }, } } @@ -2285,7 +2283,10 @@ func (o *UpdateBudgetConfigurationBudget) GetFilter(ctx context.Context) (Budget return e, false } var v []BudgetConfigurationFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2297,15 +2298,14 @@ func (o *UpdateBudgetConfigurationBudget) GetFilter(ctx context.Context) (Budget // SetFilter sets the value of the Filter field in UpdateBudgetConfigurationBudget. func (o *UpdateBudgetConfigurationBudget) SetFilter(ctx context.Context, v BudgetConfigurationFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type UpdateBudgetConfigurationRequest struct { // The updated budget. This will overwrite the budget specified by the // budget ID. - Budget types.List `tfsdk:"budget" tf:"object"` + Budget types.Object `tfsdk:"budget" tf:"object"` // The Databricks budget configuration ID. BudgetId types.String `tfsdk:"-"` } @@ -2345,9 +2345,7 @@ func (o UpdateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) bas func (o UpdateBudgetConfigurationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget": basetypes.ListType{ - ElemType: UpdateBudgetConfigurationBudget{}.Type(ctx), - }, + "budget": UpdateBudgetConfigurationBudget{}.Type(ctx), "budget_id": types.StringType, }, } @@ -2362,7 +2360,10 @@ func (o *UpdateBudgetConfigurationRequest) GetBudget(ctx context.Context) (Updat return e, false } var v []UpdateBudgetConfigurationBudget - d := o.Budget.ElementsAs(ctx, &v, true) + d := o.Budget.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2374,14 +2375,13 @@ func (o *UpdateBudgetConfigurationRequest) GetBudget(ctx context.Context) (Updat // SetBudget sets the value of the Budget field in UpdateBudgetConfigurationRequest. func (o *UpdateBudgetConfigurationRequest) SetBudget(ctx context.Context, v UpdateBudgetConfigurationBudget) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] - o.Budget = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Budget = vs } type UpdateBudgetConfigurationResponse struct { // The updated budget. - Budget types.List `tfsdk:"budget" tf:"optional,object"` + Budget types.Object `tfsdk:"budget" tf:"optional,object"` } func (newState *UpdateBudgetConfigurationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateBudgetConfigurationResponse) { @@ -2418,9 +2418,7 @@ func (o UpdateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) ba func (o UpdateBudgetConfigurationResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), - }, + "budget": BudgetConfiguration{}.Type(ctx), }, } } @@ -2434,7 +2432,10 @@ func (o *UpdateBudgetConfigurationResponse) GetBudget(ctx context.Context) (Budg return e, false } var v []BudgetConfiguration - d := o.Budget.ElementsAs(ctx, &v, true) + d := o.Budget.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2446,9 +2447,8 @@ func (o *UpdateBudgetConfigurationResponse) GetBudget(ctx context.Context) (Budg // SetBudget sets the value of the Budget field in UpdateBudgetConfigurationResponse. func (o *UpdateBudgetConfigurationResponse) SetBudget(ctx context.Context, v BudgetConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["budget"] - o.Budget = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Budget = vs } type UpdateLogDeliveryConfigurationStatusRequest struct { @@ -2502,7 +2502,7 @@ func (o UpdateLogDeliveryConfigurationStatusRequest) Type(ctx context.Context) a } type WrappedCreateLogDeliveryConfiguration struct { - LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"optional,object"` } func (newState *WrappedCreateLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedCreateLogDeliveryConfiguration) { @@ -2539,9 +2539,7 @@ func (o WrappedCreateLogDeliveryConfiguration) ToObjectValue(ctx context.Context func (o WrappedCreateLogDeliveryConfiguration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "log_delivery_configuration": basetypes.ListType{ - ElemType: CreateLogDeliveryConfigurationParams{}.Type(ctx), - }, + "log_delivery_configuration": CreateLogDeliveryConfigurationParams{}.Type(ctx), }, } } @@ -2555,7 +2553,10 @@ func (o *WrappedCreateLogDeliveryConfiguration) GetLogDeliveryConfiguration(ctx return e, false } var v []CreateLogDeliveryConfigurationParams - d := o.LogDeliveryConfiguration.ElementsAs(ctx, &v, true) + d := o.LogDeliveryConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2567,13 +2568,12 @@ func (o *WrappedCreateLogDeliveryConfiguration) GetLogDeliveryConfiguration(ctx // SetLogDeliveryConfiguration sets the value of the LogDeliveryConfiguration field in WrappedCreateLogDeliveryConfiguration. func (o *WrappedCreateLogDeliveryConfiguration) SetLogDeliveryConfiguration(ctx context.Context, v CreateLogDeliveryConfigurationParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_configuration"] - o.LogDeliveryConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LogDeliveryConfiguration = vs } type WrappedLogDeliveryConfiguration struct { - LogDeliveryConfiguration types.List `tfsdk:"log_delivery_configuration" tf:"optional,object"` + LogDeliveryConfiguration types.Object `tfsdk:"log_delivery_configuration" tf:"optional,object"` } func (newState *WrappedLogDeliveryConfiguration) SyncEffectiveFieldsDuringCreateOrUpdate(plan WrappedLogDeliveryConfiguration) { @@ -2610,9 +2610,7 @@ func (o WrappedLogDeliveryConfiguration) ToObjectValue(ctx context.Context) base func (o WrappedLogDeliveryConfiguration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "log_delivery_configuration": basetypes.ListType{ - ElemType: LogDeliveryConfiguration{}.Type(ctx), - }, + "log_delivery_configuration": LogDeliveryConfiguration{}.Type(ctx), }, } } @@ -2626,7 +2624,10 @@ func (o *WrappedLogDeliveryConfiguration) GetLogDeliveryConfiguration(ctx contex return e, false } var v []LogDeliveryConfiguration - d := o.LogDeliveryConfiguration.ElementsAs(ctx, &v, true) + d := o.LogDeliveryConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2638,9 +2639,8 @@ func (o *WrappedLogDeliveryConfiguration) GetLogDeliveryConfiguration(ctx contex // SetLogDeliveryConfiguration sets the value of the LogDeliveryConfiguration field in WrappedLogDeliveryConfiguration. func (o *WrappedLogDeliveryConfiguration) SetLogDeliveryConfiguration(ctx context.Context, v LogDeliveryConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_delivery_configuration"] - o.LogDeliveryConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LogDeliveryConfiguration = vs } type WrappedLogDeliveryConfigurations struct { diff --git a/internal/service/catalog_tf/legacy_model.go b/internal/service/catalog_tf/legacy_model.go new file mode 100755 index 000000000..5e2d58c25 --- /dev/null +++ b/internal/service/catalog_tf/legacy_model.go @@ -0,0 +1,18871 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package catalog_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AccountsCreateMetastore_SdkV2 struct { + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` +} + +func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore_SdkV2) { +} + +func (newState *AccountsCreateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastore_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsCreateMetastore_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_info": reflect.TypeOf(CreateMetastore_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, AccountsCreateMetastore_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateMetastore_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_info": o.MetastoreInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsCreateMetastore_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_info": basetypes.ListType{ + ElemType: CreateMetastore{}.Type(ctx), + }, + }, + } +} + +// GetMetastoreInfo returns the value of the MetastoreInfo field in AccountsCreateMetastore_SdkV2 as +// a CreateMetastore_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsCreateMetastore_SdkV2) GetMetastoreInfo(ctx context.Context) (CreateMetastore_SdkV2, bool) { + var e CreateMetastore_SdkV2 + if o.MetastoreInfo.IsNull() || o.MetastoreInfo.IsUnknown() { + return e, false + } + var v []CreateMetastore_SdkV2 + d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsCreateMetastore_SdkV2. +func (o *AccountsCreateMetastore_SdkV2) SetMetastoreInfo(ctx context.Context, v CreateMetastore_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] + o.MetastoreInfo = types.ListValueMust(t, vs) +} + +type AccountsCreateMetastoreAssignment_SdkV2 struct { + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastoreAssignment_SdkV2) { +} + +func (newState *AccountsCreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateMetastoreAssignment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsCreateMetastoreAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_assignment": reflect.TypeOf(CreateMetastoreAssignment_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, AccountsCreateMetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateMetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsCreateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_assignment": basetypes.ListType{ + ElemType: CreateMetastoreAssignment{}.Type(ctx), + }, + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +// GetMetastoreAssignment returns the value of the MetastoreAssignment field in AccountsCreateMetastoreAssignment_SdkV2 as +// a CreateMetastoreAssignment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsCreateMetastoreAssignment_SdkV2) GetMetastoreAssignment(ctx context.Context) (CreateMetastoreAssignment_SdkV2, bool) { + var e CreateMetastoreAssignment_SdkV2 + if o.MetastoreAssignment.IsNull() || o.MetastoreAssignment.IsUnknown() { + return e, false + } + var v []CreateMetastoreAssignment_SdkV2 + d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsCreateMetastoreAssignment_SdkV2. +func (o *AccountsCreateMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx context.Context, v CreateMetastoreAssignment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] + o.MetastoreAssignment = types.ListValueMust(t, vs) +} + +type AccountsCreateStorageCredential_SdkV2 struct { + CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` +} + +func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateStorageCredential_SdkV2) { +} + +func (newState *AccountsCreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsCreateStorageCredential_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsCreateStorageCredential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "credential_info": reflect.TypeOf(CreateStorageCredential_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, AccountsCreateStorageCredential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateStorageCredential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsCreateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_info": basetypes.ListType{ + ElemType: CreateStorageCredential{}.Type(ctx), + }, + "metastore_id": types.StringType, + }, + } +} + +// GetCredentialInfo returns the value of the CredentialInfo field in AccountsCreateStorageCredential_SdkV2 as +// a CreateStorageCredential_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsCreateStorageCredential_SdkV2) GetCredentialInfo(ctx context.Context) (CreateStorageCredential_SdkV2, bool) { + var e CreateStorageCredential_SdkV2 + if o.CredentialInfo.IsNull() || o.CredentialInfo.IsUnknown() { + return e, false + } + var v []CreateStorageCredential_SdkV2 + d := o.CredentialInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCredentialInfo sets the value of the CredentialInfo field in AccountsCreateStorageCredential_SdkV2. +func (o *AccountsCreateStorageCredential_SdkV2) SetCredentialInfo(ctx context.Context, v CreateStorageCredential_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] + o.CredentialInfo = types.ListValueMust(t, vs) +} + +type AccountsMetastoreAssignment_SdkV2 struct { + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` +} + +func (newState *AccountsMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreAssignment_SdkV2) { +} + +func (newState *AccountsMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsMetastoreAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_assignment": reflect.TypeOf(MetastoreAssignment_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, AccountsMetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsMetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_assignment": basetypes.ListType{ + ElemType: MetastoreAssignment{}.Type(ctx), + }, + }, + } +} + +// GetMetastoreAssignment returns the value of the MetastoreAssignment field in AccountsMetastoreAssignment_SdkV2 as +// a MetastoreAssignment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsMetastoreAssignment_SdkV2) GetMetastoreAssignment(ctx context.Context) (MetastoreAssignment_SdkV2, bool) { + var e MetastoreAssignment_SdkV2 + if o.MetastoreAssignment.IsNull() || o.MetastoreAssignment.IsUnknown() { + return e, false + } + var v []MetastoreAssignment_SdkV2 + d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsMetastoreAssignment_SdkV2. +func (o *AccountsMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx context.Context, v MetastoreAssignment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] + o.MetastoreAssignment = types.ListValueMust(t, vs) +} + +type AccountsMetastoreInfo_SdkV2 struct { + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` +} + +func (newState *AccountsMetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreInfo_SdkV2) { +} + +func (newState *AccountsMetastoreInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsMetastoreInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsMetastoreInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsMetastoreInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_info": reflect.TypeOf(MetastoreInfo_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, AccountsMetastoreInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsMetastoreInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_info": o.MetastoreInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsMetastoreInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_info": basetypes.ListType{ + ElemType: MetastoreInfo{}.Type(ctx), + }, + }, + } +} + +// GetMetastoreInfo returns the value of the MetastoreInfo field in AccountsMetastoreInfo_SdkV2 as +// a MetastoreInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsMetastoreInfo_SdkV2) GetMetastoreInfo(ctx context.Context) (MetastoreInfo_SdkV2, bool) { + var e MetastoreInfo_SdkV2 + if o.MetastoreInfo.IsNull() || o.MetastoreInfo.IsUnknown() { + return e, false + } + var v []MetastoreInfo_SdkV2 + d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsMetastoreInfo_SdkV2. +func (o *AccountsMetastoreInfo_SdkV2) SetMetastoreInfo(ctx context.Context, v MetastoreInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] + o.MetastoreInfo = types.ListValueMust(t, vs) +} + +type AccountsStorageCredentialInfo_SdkV2 struct { + CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` +} + +func (newState *AccountsStorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsStorageCredentialInfo_SdkV2) { +} + +func (newState *AccountsStorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsStorageCredentialInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccountsStorageCredentialInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsStorageCredentialInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "credential_info": reflect.TypeOf(StorageCredentialInfo_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, AccountsStorageCredentialInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsStorageCredentialInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsStorageCredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_info": basetypes.ListType{ + ElemType: StorageCredentialInfo{}.Type(ctx), + }, + }, + } +} + +// GetCredentialInfo returns the value of the CredentialInfo field in AccountsStorageCredentialInfo_SdkV2 as +// a StorageCredentialInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsStorageCredentialInfo_SdkV2) GetCredentialInfo(ctx context.Context) (StorageCredentialInfo_SdkV2, bool) { + var e StorageCredentialInfo_SdkV2 + if o.CredentialInfo.IsNull() || o.CredentialInfo.IsUnknown() { + return e, false + } + var v []StorageCredentialInfo_SdkV2 + d := o.CredentialInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCredentialInfo sets the value of the CredentialInfo field in AccountsStorageCredentialInfo_SdkV2. +func (o *AccountsStorageCredentialInfo_SdkV2) SetCredentialInfo(ctx context.Context, v StorageCredentialInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] + o.CredentialInfo = types.ListValueMust(t, vs) +} + +type AccountsUpdateMetastore_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + + MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` +} + +func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore_SdkV2) { +} + +func (newState *AccountsUpdateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastore_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsUpdateMetastore_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_info": reflect.TypeOf(UpdateMetastore_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, AccountsUpdateMetastore_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateMetastore_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "metastore_info": o.MetastoreInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsUpdateMetastore_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "metastore_info": basetypes.ListType{ + ElemType: UpdateMetastore{}.Type(ctx), + }, + }, + } +} + +// GetMetastoreInfo returns the value of the MetastoreInfo field in AccountsUpdateMetastore_SdkV2 as +// a UpdateMetastore_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsUpdateMetastore_SdkV2) GetMetastoreInfo(ctx context.Context) (UpdateMetastore_SdkV2, bool) { + var e UpdateMetastore_SdkV2 + if o.MetastoreInfo.IsNull() || o.MetastoreInfo.IsUnknown() { + return e, false + } + var v []UpdateMetastore_SdkV2 + d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsUpdateMetastore_SdkV2. +func (o *AccountsUpdateMetastore_SdkV2) SetMetastoreInfo(ctx context.Context, v UpdateMetastore_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] + o.MetastoreInfo = types.ListValueMust(t, vs) +} + +type AccountsUpdateMetastoreAssignment_SdkV2 struct { + MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastoreAssignment_SdkV2) { +} + +func (newState *AccountsUpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateMetastoreAssignment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsUpdateMetastoreAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastore_assignment": reflect.TypeOf(UpdateMetastoreAssignment_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, AccountsUpdateMetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateMetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsUpdateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_assignment": basetypes.ListType{ + ElemType: UpdateMetastoreAssignment{}.Type(ctx), + }, + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +// GetMetastoreAssignment returns the value of the MetastoreAssignment field in AccountsUpdateMetastoreAssignment_SdkV2 as +// a UpdateMetastoreAssignment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsUpdateMetastoreAssignment_SdkV2) GetMetastoreAssignment(ctx context.Context) (UpdateMetastoreAssignment_SdkV2, bool) { + var e UpdateMetastoreAssignment_SdkV2 + if o.MetastoreAssignment.IsNull() || o.MetastoreAssignment.IsUnknown() { + return e, false + } + var v []UpdateMetastoreAssignment_SdkV2 + d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsUpdateMetastoreAssignment_SdkV2. +func (o *AccountsUpdateMetastoreAssignment_SdkV2) SetMetastoreAssignment(ctx context.Context, v UpdateMetastoreAssignment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] + o.MetastoreAssignment = types.ListValueMust(t, vs) +} + +type AccountsUpdateStorageCredential_SdkV2 struct { + CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Name of the storage credential. + StorageCredentialName types.String `tfsdk:"-"` +} + +func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateStorageCredential_SdkV2) { +} + +func (newState *AccountsUpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccountsUpdateStorageCredential_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccountsUpdateStorageCredential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "credential_info": reflect.TypeOf(UpdateStorageCredential_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, AccountsUpdateStorageCredential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateStorageCredential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccountsUpdateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_info": basetypes.ListType{ + ElemType: UpdateStorageCredential{}.Type(ctx), + }, + "metastore_id": types.StringType, + "storage_credential_name": types.StringType, + }, + } +} + +// GetCredentialInfo returns the value of the CredentialInfo field in AccountsUpdateStorageCredential_SdkV2 as +// a UpdateStorageCredential_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AccountsUpdateStorageCredential_SdkV2) GetCredentialInfo(ctx context.Context) (UpdateStorageCredential_SdkV2, bool) { + var e UpdateStorageCredential_SdkV2 + if o.CredentialInfo.IsNull() || o.CredentialInfo.IsUnknown() { + return e, false + } + var v []UpdateStorageCredential_SdkV2 + d := o.CredentialInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCredentialInfo sets the value of the CredentialInfo field in AccountsUpdateStorageCredential_SdkV2. +func (o *AccountsUpdateStorageCredential_SdkV2) SetCredentialInfo(ctx context.Context, v UpdateStorageCredential_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] + o.CredentialInfo = types.ListValueMust(t, vs) +} + +type ArtifactAllowlistInfo_SdkV2 struct { + // A list of allowed artifact match patterns. + ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:"optional"` + // Time at which this artifact allowlist was set, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of the user who set the artifact allowlist. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` +} + +func (newState *ArtifactAllowlistInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ArtifactAllowlistInfo_SdkV2) { +} + +func (newState *ArtifactAllowlistInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ArtifactAllowlistInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactAllowlistInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ArtifactAllowlistInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "artifact_matchers": reflect.TypeOf(ArtifactMatcher_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, ArtifactAllowlistInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ArtifactAllowlistInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_matchers": o.ArtifactMatchers, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ArtifactAllowlistInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_matchers": basetypes.ListType{ + ElemType: ArtifactMatcher{}.Type(ctx), + }, + "created_at": types.Int64Type, + "created_by": types.StringType, + "metastore_id": types.StringType, + }, + } +} + +// GetArtifactMatchers returns the value of the ArtifactMatchers field in ArtifactAllowlistInfo_SdkV2 as +// a slice of ArtifactMatcher_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ArtifactAllowlistInfo_SdkV2) GetArtifactMatchers(ctx context.Context) ([]ArtifactMatcher_SdkV2, bool) { + if o.ArtifactMatchers.IsNull() || o.ArtifactMatchers.IsUnknown() { + return nil, false + } + var v []ArtifactMatcher_SdkV2 + d := o.ArtifactMatchers.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetArtifactMatchers sets the value of the ArtifactMatchers field in ArtifactAllowlistInfo_SdkV2. +func (o *ArtifactAllowlistInfo_SdkV2) SetArtifactMatchers(ctx context.Context, v []ArtifactMatcher_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["artifact_matchers"] + t = t.(attr.TypeWithElementType).ElementType() + o.ArtifactMatchers = types.ListValueMust(t, vs) +} + +type ArtifactMatcher_SdkV2 struct { + // The artifact path or maven coordinate + Artifact types.String `tfsdk:"artifact" tf:""` + // The pattern matching type of the artifact + MatchType types.String `tfsdk:"match_type" tf:""` +} + +func (newState *ArtifactMatcher_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ArtifactMatcher_SdkV2) { +} + +func (newState *ArtifactMatcher_SdkV2) SyncEffectiveFieldsDuringRead(existingState ArtifactMatcher_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ArtifactMatcher. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ArtifactMatcher_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, ArtifactMatcher_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ArtifactMatcher_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact": o.Artifact, + "match_type": o.MatchType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ArtifactMatcher_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact": types.StringType, + "match_type": types.StringType, + }, + } +} + +type AssignResponse_SdkV2 struct { +} + +func (newState *AssignResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AssignResponse_SdkV2) { +} + +func (newState *AssignResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AssignResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AssignResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AssignResponse_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, AssignResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AssignResponse_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 AssignResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// AWS temporary credentials for API authentication. Read more at +// https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. +type AwsCredentials_SdkV2 struct { + // The access key ID that identifies the temporary credentials. + AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + // The Amazon Resource Name (ARN) of the S3 access point for temporary + // credentials related the external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // The secret access key that can be used to sign AWS API requests. + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + // The token that users must pass to AWS API to use the temporary + // credentials. + SessionToken types.String `tfsdk:"session_token" tf:"optional"` +} + +func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials_SdkV2) { +} + +func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsCredentials_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsCredentials_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, AwsCredentials_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsCredentials_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_key_id": o.AccessKeyId, + "access_point": o.AccessPoint, + "secret_access_key": o.SecretAccessKey, + "session_token": o.SessionToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsCredentials_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_key_id": types.StringType, + "access_point": types.StringType, + "secret_access_key": types.StringType, + "session_token": types.StringType, + }, + } +} + +// The AWS IAM role configuration +type AwsIamRole_SdkV2 struct { + // The external ID used in role assumption to prevent the confused deputy + // problem. + ExternalId types.String `tfsdk:"external_id" tf:"computed"` + // The Amazon Resource Name (ARN) of the AWS IAM role used to vend temporary + // credentials. + RoleArn types.String `tfsdk:"role_arn" tf:"optional"` + // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. + // This is the identity that is going to assume the AWS IAM role. + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"computed"` +} + +func (newState *AwsIamRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRole_SdkV2) { +} + +func (newState *AwsIamRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRole_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRole. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsIamRole_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, AwsIamRole_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsIamRole_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + "unity_catalog_iam_arn": o.UnityCatalogIamArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsIamRole_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_id": types.StringType, + "role_arn": types.StringType, + "unity_catalog_iam_arn": types.StringType, + }, + } +} + +type AwsIamRoleRequest_SdkV2 struct { + // The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access. + RoleArn types.String `tfsdk:"role_arn" tf:""` +} + +func (newState *AwsIamRoleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRoleRequest_SdkV2) { +} + +func (newState *AwsIamRoleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsIamRoleRequest_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, AwsIamRoleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsIamRoleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "role_arn": o.RoleArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsIamRoleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "role_arn": types.StringType, + }, + } +} + +type AwsIamRoleResponse_SdkV2 struct { + // The external ID used in role assumption to prevent confused deputy + // problem.. + ExternalId types.String `tfsdk:"external_id" tf:"optional"` + // The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access. + RoleArn types.String `tfsdk:"role_arn" tf:""` + // The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks. + // This is the identity that is going to assume the AWS IAM role. + UnityCatalogIamArn types.String `tfsdk:"unity_catalog_iam_arn" tf:"optional"` +} + +func (newState *AwsIamRoleResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsIamRoleResponse_SdkV2) { +} + +func (newState *AwsIamRoleResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsIamRoleResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsIamRoleResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsIamRoleResponse_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, AwsIamRoleResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsIamRoleResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + "unity_catalog_iam_arn": o.UnityCatalogIamArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsIamRoleResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_id": types.StringType, + "role_arn": types.StringType, + "unity_catalog_iam_arn": types.StringType, + }, + } +} + +// 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 +type AzureActiveDirectoryToken_SdkV2 struct { + // Opaque token that contains claims that you can use in Azure Active + // Directory to access cloud services. + AadToken types.String `tfsdk:"aad_token" tf:"optional"` +} + +func (newState *AzureActiveDirectoryToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureActiveDirectoryToken_SdkV2) { +} + +func (newState *AzureActiveDirectoryToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureActiveDirectoryToken_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureActiveDirectoryToken. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureActiveDirectoryToken_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, AzureActiveDirectoryToken_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureActiveDirectoryToken_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aad_token": o.AadToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureActiveDirectoryToken_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aad_token": types.StringType, + }, + } +} + +// The Azure managed identity configuration. +type AzureManagedIdentity_SdkV2 struct { + // The Azure resource ID of the Azure Databricks Access Connector. Use the + // format + // `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`. + AccessConnectorId types.String `tfsdk:"access_connector_id" tf:""` + // The Databricks internal ID that represents this managed identity. This + // field is only used to persist the credential_id once it is fetched from + // the credentials manager - as we only use the protobuf serializer to store + // credentials, this ID gets persisted to the database. . + CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + // The Azure resource ID of the managed identity. Use the format, + // `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}` + // This is only available for user-assgined identities. For system-assigned + // identities, the access_connector_id is used to identify the identity. If + // this field is not provided, then we assume the AzureManagedIdentity is + // using the system-assigned identity. + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` +} + +func (newState *AzureManagedIdentity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentity_SdkV2) { +} + +func (newState *AzureManagedIdentity_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentity_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentity. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureManagedIdentity_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, AzureManagedIdentity_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentity_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_connector_id": o.AccessConnectorId, + "credential_id": o.CredentialId, + "managed_identity_id": o.ManagedIdentityId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureManagedIdentity_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_connector_id": types.StringType, + "credential_id": types.StringType, + "managed_identity_id": types.StringType, + }, + } +} + +type AzureManagedIdentityRequest_SdkV2 struct { + // The Azure resource ID of the Azure Databricks Access Connector. Use the + // format + // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}. + AccessConnectorId types.String `tfsdk:"access_connector_id" tf:""` + // The Azure resource ID of the managed identity. Use the format + // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}. + // This is only available for user-assgined identities. For system-assigned + // identities, the access_connector_id is used to identify the identity. If + // this field is not provided, then we assume the AzureManagedIdentity is + // for a system-assigned identity. + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` +} + +func (newState *AzureManagedIdentityRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityRequest_SdkV2) { +} + +func (newState *AzureManagedIdentityRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureManagedIdentityRequest_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, AzureManagedIdentityRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentityRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_connector_id": o.AccessConnectorId, + "managed_identity_id": o.ManagedIdentityId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureManagedIdentityRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_connector_id": types.StringType, + "managed_identity_id": types.StringType, + }, + } +} + +type AzureManagedIdentityResponse_SdkV2 struct { + // The Azure resource ID of the Azure Databricks Access Connector. Use the + // format + // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}. + AccessConnectorId types.String `tfsdk:"access_connector_id" tf:""` + // The Databricks internal ID that represents this managed identity. + CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + // The Azure resource ID of the managed identity. Use the format + // /subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name}. + // This is only available for user-assgined identities. For system-assigned + // identities, the access_connector_id is used to identify the identity. If + // this field is not provided, then we assume the AzureManagedIdentity is + // for a system-assigned identity. + ManagedIdentityId types.String `tfsdk:"managed_identity_id" tf:"optional"` +} + +func (newState *AzureManagedIdentityResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureManagedIdentityResponse_SdkV2) { +} + +func (newState *AzureManagedIdentityResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureManagedIdentityResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureManagedIdentityResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureManagedIdentityResponse_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, AzureManagedIdentityResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentityResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_connector_id": o.AccessConnectorId, + "credential_id": o.CredentialId, + "managed_identity_id": o.ManagedIdentityId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureManagedIdentityResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_connector_id": types.StringType, + "credential_id": types.StringType, + "managed_identity_id": types.StringType, + }, + } +} + +// The Azure service principal configuration. Only applicable when purpose is +// **STORAGE**. +type AzureServicePrincipal_SdkV2 struct { + // The application ID of the application registration within the referenced + // AAD tenant. + ApplicationId types.String `tfsdk:"application_id" tf:""` + // The client secret generated for the above app ID in AAD. + ClientSecret types.String `tfsdk:"client_secret" tf:""` + // The directory ID corresponding to the Azure Active Directory (AAD) tenant + // of the application. + DirectoryId types.String `tfsdk:"directory_id" tf:""` +} + +func (newState *AzureServicePrincipal_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureServicePrincipal_SdkV2) { +} + +func (newState *AzureServicePrincipal_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureServicePrincipal_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureServicePrincipal. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureServicePrincipal_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, AzureServicePrincipal_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureServicePrincipal_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "application_id": o.ApplicationId, + "client_secret": o.ClientSecret, + "directory_id": o.DirectoryId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureServicePrincipal_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "application_id": types.StringType, + "client_secret": types.StringType, + "directory_id": types.StringType, + }, + } +} + +// Azure temporary credentials for API authentication. Read more at +// https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas +type AzureUserDelegationSas_SdkV2 struct { + // The signed URI (SAS Token) used to access blob services for a given path + SasToken types.String `tfsdk:"sas_token" tf:"optional"` +} + +func (newState *AzureUserDelegationSas_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureUserDelegationSas_SdkV2) { +} + +func (newState *AzureUserDelegationSas_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureUserDelegationSas_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureUserDelegationSas. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureUserDelegationSas_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, AzureUserDelegationSas_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureUserDelegationSas_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sas_token": o.SasToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureUserDelegationSas_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sas_token": types.StringType, + }, + } +} + +// Cancel refresh +type CancelRefreshRequest_SdkV2 struct { + // ID of the refresh. + RefreshId types.String `tfsdk:"-"` + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *CancelRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshRequest_SdkV2) { +} + +func (newState *CancelRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRefreshRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelRefreshRequest_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, CancelRefreshRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelRefreshRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "refresh_id": o.RefreshId, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CancelRefreshRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "refresh_id": types.StringType, + "table_name": types.StringType, + }, + } +} + +type CancelRefreshResponse_SdkV2 struct { +} + +func (newState *CancelRefreshResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRefreshResponse_SdkV2) { +} + +func (newState *CancelRefreshResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRefreshResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRefreshResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelRefreshResponse_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, CancelRefreshResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelRefreshResponse_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 CancelRefreshResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type CatalogInfo_SdkV2 struct { + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // The type of the catalog. + CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the connection to an external data source. + ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + // Time at which this catalog was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of catalog creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + // The full name of the catalog. Corresponds with the name field. + FullName types.String `tfsdk:"full_name" tf:"optional"` + // Whether the current securable is accessible from all workspaces or a + // specific set of workspaces. + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of catalog. + Name types.String `tfsdk:"name" tf:"optional"` + // A map of key-value properties attached to the securable. + Options types.Map `tfsdk:"options" tf:"optional"` + // Username of current owner of catalog. + Owner types.String `tfsdk:"owner" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // The name of delta sharing provider. + // + // A Delta Sharing catalog is a catalog that is based on a Delta share on a + // remote sharing server. + ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + // Status of an asynchronously provisioned resource. + ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + // Kind of catalog securable. + SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + + SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + // The name of the share under the share provider. + ShareName types.String `tfsdk:"share_name" tf:"optional"` + // Storage Location URL (full path) for managed tables within catalog. + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + // Storage root URL for managed tables within catalog. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // Time at which this catalog was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified catalog. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *CatalogInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CatalogInfo_SdkV2) { +} + +func (newState *CatalogInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CatalogInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CatalogInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CatalogInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "effective_predictive_optimization_flag": reflect.TypeOf(EffectivePredictiveOptimizationFlag_SdkV2{}), + "options": reflect.TypeOf(types.String{}), + "properties": reflect.TypeOf(types.String{}), + "provisioning_info": reflect.TypeOf(ProvisioningInfo_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, CatalogInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CatalogInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "browse_only": o.BrowseOnly, + "catalog_type": o.CatalogType, + "comment": o.Comment, + "connection_name": o.ConnectionName, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "effective_predictive_optimization_flag": o.EffectivePredictiveOptimizationFlag, + "enable_predictive_optimization": o.EnablePredictiveOptimization, + "full_name": o.FullName, + "isolation_mode": o.IsolationMode, + "metastore_id": o.MetastoreId, + "name": o.Name, + "options": o.Options, + "owner": o.Owner, + "properties": o.Properties, + "provider_name": o.ProviderName, + "provisioning_info": o.ProvisioningInfo, + "securable_kind": o.SecurableKind, + "securable_type": o.SecurableType, + "share_name": o.ShareName, + "storage_location": o.StorageLocation, + "storage_root": o.StorageRoot, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CatalogInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "browse_only": types.BoolType, + "catalog_type": types.StringType, + "comment": types.StringType, + "connection_name": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "effective_predictive_optimization_flag": basetypes.ListType{ + ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + }, + "enable_predictive_optimization": types.StringType, + "full_name": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "options": basetypes.MapType{ + ElemType: types.StringType, + }, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "provider_name": types.StringType, + "provisioning_info": basetypes.ListType{ + ElemType: ProvisioningInfo{}.Type(ctx), + }, + "securable_kind": types.StringType, + "securable_type": types.StringType, + "share_name": types.StringType, + "storage_location": types.StringType, + "storage_root": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetEffectivePredictiveOptimizationFlag returns the value of the EffectivePredictiveOptimizationFlag field in CatalogInfo_SdkV2 as +// a EffectivePredictiveOptimizationFlag_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CatalogInfo_SdkV2) GetEffectivePredictiveOptimizationFlag(ctx context.Context) (EffectivePredictiveOptimizationFlag_SdkV2, bool) { + var e EffectivePredictiveOptimizationFlag_SdkV2 + if o.EffectivePredictiveOptimizationFlag.IsNull() || o.EffectivePredictiveOptimizationFlag.IsUnknown() { + return e, false + } + var v []EffectivePredictiveOptimizationFlag_SdkV2 + d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in CatalogInfo_SdkV2. +func (o *CatalogInfo_SdkV2) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] + o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) +} + +// GetOptions returns the value of the Options field in CatalogInfo_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 *CatalogInfo_SdkV2) GetOptions(ctx context.Context) (map[string]types.String, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v map[string]types.String + 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 CatalogInfo_SdkV2. +func (o *CatalogInfo_SdkV2) SetOptions(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["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.MapValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in CatalogInfo_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 *CatalogInfo_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 CatalogInfo_SdkV2. +func (o *CatalogInfo_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) +} + +// GetProvisioningInfo returns the value of the ProvisioningInfo field in CatalogInfo_SdkV2 as +// a ProvisioningInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CatalogInfo_SdkV2) GetProvisioningInfo(ctx context.Context) (ProvisioningInfo_SdkV2, bool) { + var e ProvisioningInfo_SdkV2 + if o.ProvisioningInfo.IsNull() || o.ProvisioningInfo.IsUnknown() { + return e, false + } + var v []ProvisioningInfo_SdkV2 + d := o.ProvisioningInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvisioningInfo sets the value of the ProvisioningInfo field in CatalogInfo_SdkV2. +func (o *CatalogInfo_SdkV2) SetProvisioningInfo(ctx context.Context, v ProvisioningInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_info"] + o.ProvisioningInfo = types.ListValueMust(t, vs) +} + +type CloudflareApiToken_SdkV2 struct { + // The Cloudflare access key id of the token. + AccessKeyId types.String `tfsdk:"access_key_id" tf:""` + // The account id associated with the API token. + AccountId types.String `tfsdk:"account_id" tf:""` + // The secret access token generated for the access key id + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:""` +} + +func (newState *CloudflareApiToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudflareApiToken_SdkV2) { +} + +func (newState *CloudflareApiToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudflareApiToken_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudflareApiToken. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CloudflareApiToken_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, CloudflareApiToken_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CloudflareApiToken_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_key_id": o.AccessKeyId, + "account_id": o.AccountId, + "secret_access_key": o.SecretAccessKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CloudflareApiToken_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_key_id": types.StringType, + "account_id": types.StringType, + "secret_access_key": types.StringType, + }, + } +} + +type ColumnInfo_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + + Mask types.List `tfsdk:"mask" tf:"optional,object"` + // Name of Column. + Name types.String `tfsdk:"name" tf:"optional"` + // Whether field may be Null (default: true). + Nullable types.Bool `tfsdk:"nullable" tf:"optional"` + // Partition index for column. + PartitionIndex types.Int64 `tfsdk:"partition_index" tf:"optional"` + // Ordinal position of column (starting at position 0). + Position types.Int64 `tfsdk:"position" tf:"optional"` + // Format of IntervalType. + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + // Full data type specification, JSON-serialized. + TypeJson types.String `tfsdk:"type_json" tf:"optional"` + + TypeName types.String `tfsdk:"type_name" tf:"optional"` + // Digits of precision; required for DecimalTypes. + TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + // Digits to right of decimal; Required for DecimalTypes. + TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + // Full data type specification as SQL/catalogString text. + TypeText types.String `tfsdk:"type_text" tf:"optional"` +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ColumnInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "mask": reflect.TypeOf(ColumnMask_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, ColumnInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "mask": o.Mask, + "name": o.Name, + "nullable": o.Nullable, + "partition_index": o.PartitionIndex, + "position": o.Position, + "type_interval_type": o.TypeIntervalType, + "type_json": o.TypeJson, + "type_name": o.TypeName, + "type_precision": o.TypePrecision, + "type_scale": o.TypeScale, + "type_text": o.TypeText, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ColumnInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "mask": basetypes.ListType{ + ElemType: ColumnMask{}.Type(ctx), + }, + "name": types.StringType, + "nullable": types.BoolType, + "partition_index": types.Int64Type, + "position": types.Int64Type, + "type_interval_type": types.StringType, + "type_json": types.StringType, + "type_name": types.StringType, + "type_precision": types.Int64Type, + "type_scale": types.Int64Type, + "type_text": types.StringType, + }, + } +} + +// GetMask returns the value of the Mask field in ColumnInfo_SdkV2 as +// a ColumnMask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ColumnInfo_SdkV2) GetMask(ctx context.Context) (ColumnMask_SdkV2, bool) { + var e ColumnMask_SdkV2 + if o.Mask.IsNull() || o.Mask.IsUnknown() { + return e, false + } + var v []ColumnMask_SdkV2 + d := o.Mask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMask sets the value of the Mask field in ColumnInfo_SdkV2. +func (o *ColumnInfo_SdkV2) SetMask(ctx context.Context, v ColumnMask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["mask"] + o.Mask = types.ListValueMust(t, vs) +} + +type ColumnMask_SdkV2 struct { + // The full name of the column mask SQL UDF. + FunctionName types.String `tfsdk:"function_name" tf:"optional"` + // The list of additional table columns to be passed as input to the column + // mask function. The first arg of the mask function should be of the type + // of the column being masked and the types of the rest of the args should + // match the types of columns in 'using_column_names'. + UsingColumnNames types.List `tfsdk:"using_column_names" tf:"optional"` +} + +func (newState *ColumnMask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnMask_SdkV2) { +} + +func (newState *ColumnMask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnMask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnMask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ColumnMask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "using_column_names": 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, ColumnMask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ColumnMask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "function_name": o.FunctionName, + "using_column_names": o.UsingColumnNames, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ColumnMask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "function_name": types.StringType, + "using_column_names": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetUsingColumnNames returns the value of the UsingColumnNames field in ColumnMask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ColumnMask_SdkV2) GetUsingColumnNames(ctx context.Context) ([]types.String, bool) { + if o.UsingColumnNames.IsNull() || o.UsingColumnNames.IsUnknown() { + return nil, false + } + var v []types.String + d := o.UsingColumnNames.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUsingColumnNames sets the value of the UsingColumnNames field in ColumnMask_SdkV2. +func (o *ColumnMask_SdkV2) SetUsingColumnNames(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["using_column_names"] + t = t.(attr.TypeWithElementType).ElementType() + o.UsingColumnNames = types.ListValueMust(t, vs) +} + +type ConnectionInfo_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Unique identifier of the Connection. + ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + // The type of connection. + ConnectionType types.String `tfsdk:"connection_type" tf:"optional"` + // Time at which this connection was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of connection creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The type of credential. + CredentialType types.String `tfsdk:"credential_type" tf:"optional"` + // Full name of connection. + FullName types.String `tfsdk:"full_name" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of the connection. + Name types.String `tfsdk:"name" tf:"optional"` + // A map of key-value properties attached to the securable. + Options types.Map `tfsdk:"options" tf:"optional"` + // Username of current owner of the connection. + Owner types.String `tfsdk:"owner" tf:"optional"` + // An object containing map of key-value properties attached to the + // connection. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // Status of an asynchronously provisioned resource. + ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + // If the connection is read only. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Kind of connection securable. + SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` + + SecurableType types.String `tfsdk:"securable_type" tf:"optional"` + // Time at which this connection was updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified connection. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // URL of the remote data source, extracted from options. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *ConnectionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConnectionInfo_SdkV2) { +} + +func (newState *ConnectionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConnectionInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ConnectionInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ConnectionInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(types.String{}), + "properties": reflect.TypeOf(types.String{}), + "provisioning_info": reflect.TypeOf(ProvisioningInfo_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, ConnectionInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ConnectionInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "connection_id": o.ConnectionId, + "connection_type": o.ConnectionType, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "credential_type": o.CredentialType, + "full_name": o.FullName, + "metastore_id": o.MetastoreId, + "name": o.Name, + "options": o.Options, + "owner": o.Owner, + "properties": o.Properties, + "provisioning_info": o.ProvisioningInfo, + "read_only": o.ReadOnly, + "securable_kind": o.SecurableKind, + "securable_type": o.SecurableType, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ConnectionInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "connection_id": types.StringType, + "connection_type": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "credential_type": types.StringType, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "options": basetypes.MapType{ + ElemType: types.StringType, + }, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "provisioning_info": basetypes.ListType{ + ElemType: ProvisioningInfo{}.Type(ctx), + }, + "read_only": types.BoolType, + "securable_kind": types.StringType, + "securable_type": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "url": types.StringType, + }, + } +} + +// GetOptions returns the value of the Options field in ConnectionInfo_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 *ConnectionInfo_SdkV2) GetOptions(ctx context.Context) (map[string]types.String, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v map[string]types.String + 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 ConnectionInfo_SdkV2. +func (o *ConnectionInfo_SdkV2) SetOptions(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["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.MapValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in ConnectionInfo_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 *ConnectionInfo_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 ConnectionInfo_SdkV2. +func (o *ConnectionInfo_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) +} + +// GetProvisioningInfo returns the value of the ProvisioningInfo field in ConnectionInfo_SdkV2 as +// a ProvisioningInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ConnectionInfo_SdkV2) GetProvisioningInfo(ctx context.Context) (ProvisioningInfo_SdkV2, bool) { + var e ProvisioningInfo_SdkV2 + if o.ProvisioningInfo.IsNull() || o.ProvisioningInfo.IsUnknown() { + return e, false + } + var v []ProvisioningInfo_SdkV2 + d := o.ProvisioningInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvisioningInfo sets the value of the ProvisioningInfo field in ConnectionInfo_SdkV2. +func (o *ConnectionInfo_SdkV2) SetProvisioningInfo(ctx context.Context, v ProvisioningInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_info"] + o.ProvisioningInfo = types.ListValueMust(t, vs) +} + +// Detailed status of an online table. Shown if the online table is in the +// ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. +type ContinuousUpdateStatus_SdkV2 struct { + // Progress of the initial data synchronization. + InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + // The last source table Delta version that was synced to the online table. + // Note that this Delta version may not be completely synced to the online + // table yet. + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + // The timestamp of the last time any data was synchronized from the source + // table to the online table. + Timestamp types.String `tfsdk:"timestamp" tf:"optional"` +} + +func (newState *ContinuousUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContinuousUpdateStatus_SdkV2) { +} + +func (newState *ContinuousUpdateStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContinuousUpdateStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ContinuousUpdateStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ContinuousUpdateStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "initial_pipeline_sync_progress": reflect.TypeOf(PipelineProgress_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, ContinuousUpdateStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ContinuousUpdateStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "initial_pipeline_sync_progress": o.InitialPipelineSyncProgress, + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ContinuousUpdateStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "initial_pipeline_sync_progress": basetypes.ListType{ + ElemType: PipelineProgress{}.Type(ctx), + }, + "last_processed_commit_version": types.Int64Type, + "timestamp": types.StringType, + }, + } +} + +// GetInitialPipelineSyncProgress returns the value of the InitialPipelineSyncProgress field in ContinuousUpdateStatus_SdkV2 as +// a PipelineProgress_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ContinuousUpdateStatus_SdkV2) GetInitialPipelineSyncProgress(ctx context.Context) (PipelineProgress_SdkV2, bool) { + var e PipelineProgress_SdkV2 + if o.InitialPipelineSyncProgress.IsNull() || o.InitialPipelineSyncProgress.IsUnknown() { + return e, false + } + var v []PipelineProgress_SdkV2 + d := o.InitialPipelineSyncProgress.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInitialPipelineSyncProgress sets the value of the InitialPipelineSyncProgress field in ContinuousUpdateStatus_SdkV2. +func (o *ContinuousUpdateStatus_SdkV2) SetInitialPipelineSyncProgress(ctx context.Context, v PipelineProgress_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["initial_pipeline_sync_progress"] + o.InitialPipelineSyncProgress = types.ListValueMust(t, vs) +} + +type CreateCatalog_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the connection to an external data source. + ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + // Name of catalog. + Name types.String `tfsdk:"name" tf:""` + // A map of key-value properties attached to the securable. + Options types.Map `tfsdk:"options" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // The name of delta sharing provider. + // + // A Delta Sharing catalog is a catalog that is based on a Delta share on a + // remote sharing server. + ProviderName types.String `tfsdk:"provider_name" tf:"optional"` + // The name of the share under the share provider. + ShareName types.String `tfsdk:"share_name" tf:"optional"` + // Storage root URL for managed tables within catalog. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` +} + +func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCatalog_SdkV2) { +} + +func (newState *CreateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCatalog_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCatalog_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": 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, CreateCatalog_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCatalog_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "connection_name": o.ConnectionName, + "name": o.Name, + "options": o.Options, + "properties": o.Properties, + "provider_name": o.ProviderName, + "share_name": o.ShareName, + "storage_root": o.StorageRoot, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCatalog_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "connection_name": types.StringType, + "name": types.StringType, + "options": basetypes.MapType{ + ElemType: types.StringType, + }, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "provider_name": types.StringType, + "share_name": types.StringType, + "storage_root": types.StringType, + }, + } +} + +// GetOptions returns the value of the Options field in CreateCatalog_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 *CreateCatalog_SdkV2) GetOptions(ctx context.Context) (map[string]types.String, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v map[string]types.String + 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 CreateCatalog_SdkV2. +func (o *CreateCatalog_SdkV2) SetOptions(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["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.MapValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in CreateCatalog_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 *CreateCatalog_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 CreateCatalog_SdkV2. +func (o *CreateCatalog_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) +} + +type CreateConnection_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The type of connection. + ConnectionType types.String `tfsdk:"connection_type" tf:""` + // Name of the connection. + Name types.String `tfsdk:"name" tf:""` + // A map of key-value properties attached to the securable. + Options types.Map `tfsdk:"options" tf:""` + // An object containing map of key-value properties attached to the + // connection. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // If the connection is read only. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` +} + +func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateConnection_SdkV2) { +} + +func (newState *CreateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateConnection_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateConnection_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": 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, CreateConnection_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateConnection_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "connection_type": o.ConnectionType, + "name": o.Name, + "options": o.Options, + "properties": o.Properties, + "read_only": o.ReadOnly, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateConnection_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "connection_type": types.StringType, + "name": types.StringType, + "options": basetypes.MapType{ + ElemType: types.StringType, + }, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "read_only": types.BoolType, + }, + } +} + +// GetOptions returns the value of the Options field in CreateConnection_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 *CreateConnection_SdkV2) GetOptions(ctx context.Context) (map[string]types.String, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v map[string]types.String + 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 CreateConnection_SdkV2. +func (o *CreateConnection_SdkV2) SetOptions(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["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.MapValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in CreateConnection_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 *CreateConnection_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 CreateConnection_SdkV2. +func (o *CreateConnection_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) +} + +type CreateCredentialRequest_SdkV2 struct { + // The AWS IAM role configuration + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. Only applicable when purpose + // is **STORAGE**. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // GCP long-lived credential. Databricks-created Google Cloud Storage + // service account. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // The credential name. The name must be unique among storage and service + // credentials within the metastore. + Name types.String `tfsdk:"name" tf:""` + // Indicates the purpose of the credential. + Purpose types.String `tfsdk:"purpose" tf:"optional"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Optional. Supplying true to this argument skips validation of the created + // set of credentials. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` +} + +func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest_SdkV2) { +} + +func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRole_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentity_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccount_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, CreateCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "comment": o.Comment, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "name": o.Name, + "purpose": o.Purpose, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRole{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentity{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "comment": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + }, + "name": types.StringType, + "purpose": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in CreateCredentialRequest_SdkV2 as +// a AwsIamRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialRequest_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRole_SdkV2, bool) { + var e AwsIamRole_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRole_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in CreateCredentialRequest_SdkV2. +func (o *CreateCredentialRequest_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CreateCredentialRequest_SdkV2 as +// a AzureManagedIdentity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialRequest_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentity_SdkV2, bool) { + var e AzureManagedIdentity_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentity_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CreateCredentialRequest_SdkV2. +func (o *CreateCredentialRequest_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CreateCredentialRequest_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialRequest_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CreateCredentialRequest_SdkV2. +func (o *CreateCredentialRequest_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CreateCredentialRequest_SdkV2 as +// a DatabricksGcpServiceAccount_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialRequest_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccount_SdkV2, bool) { + var e DatabricksGcpServiceAccount_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccount_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CreateCredentialRequest_SdkV2. +func (o *CreateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +type CreateExternalLocation_SdkV2 struct { + // The AWS access point to use when accesing s3 for this external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the storage credential used with this location. + CredentialName types.String `tfsdk:"credential_name" tf:""` + // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + // Indicates whether fallback mode is enabled for this external location. + // When fallback mode is enabled, the access to the location falls back to + // cluster credentials if UC credentials are not sufficient. + Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + // Name of the external location. + Name types.String `tfsdk:"name" tf:""` + // Indicates whether the external location is read-only. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Skips validation of the storage credential associated with the external + // location. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + // Path URL of the external location. + Url types.String `tfsdk:"url" tf:""` +} + +func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExternalLocation_SdkV2) { +} + +func (newState *CreateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExternalLocation_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{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, CreateExternalLocation_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExternalLocation_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_point": o.AccessPoint, + "comment": o.Comment, + "credential_name": o.CredentialName, + "encryption_details": o.EncryptionDetails, + "fallback": o.Fallback, + "name": o.Name, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExternalLocation_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_point": types.StringType, + "comment": types.StringType, + "credential_name": types.StringType, + "encryption_details": basetypes.ListType{ + ElemType: EncryptionDetails{}.Type(ctx), + }, + "fallback": types.BoolType, + "name": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + "url": types.StringType, + }, + } +} + +// GetEncryptionDetails returns the value of the EncryptionDetails field in CreateExternalLocation_SdkV2 as +// a EncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExternalLocation_SdkV2) GetEncryptionDetails(ctx context.Context) (EncryptionDetails_SdkV2, bool) { + var e EncryptionDetails_SdkV2 + if o.EncryptionDetails.IsNull() || o.EncryptionDetails.IsUnknown() { + return e, false + } + var v []EncryptionDetails_SdkV2 + d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEncryptionDetails sets the value of the EncryptionDetails field in CreateExternalLocation_SdkV2. +func (o *CreateExternalLocation_SdkV2) SetEncryptionDetails(ctx context.Context, v EncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] + o.EncryptionDetails = types.ListValueMust(t, vs) +} + +type CreateFunction_SdkV2 struct { + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:""` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Scalar function return data type. + DataType types.String `tfsdk:"data_type" tf:""` + // External function language. + ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + // External function name. + ExternalName types.String `tfsdk:"external_name" tf:"optional"` + // Pretty printed function data type. + FullDataType types.String `tfsdk:"full_data_type" tf:""` + + InputParams types.List `tfsdk:"input_params" tf:"object"` + // Whether the function is deterministic. + IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:""` + // Function null call. + IsNullCall types.Bool `tfsdk:"is_null_call" tf:""` + // Name of function, relative to parent schema. + Name types.String `tfsdk:"name" tf:""` + // Function parameter style. **S** is the value for SQL. + ParameterStyle types.String `tfsdk:"parameter_style" tf:""` + // JSON-serialized key-value pair map, encoded (escaped) as a string. + Properties types.String `tfsdk:"properties" tf:"optional"` + // Table function return parameters. + ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + // Function language. When **EXTERNAL** is used, the language of the routine + // function should be specified in the __external_language__ field, and the + // __return_params__ of the function cannot be used (as **TABLE** return + // type is not supported), and the __sql_data_access__ field must be + // **NO_SQL**. + RoutineBody types.String `tfsdk:"routine_body" tf:""` + // Function body. + RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` + // Function dependencies. + RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + // Name of parent schema relative to its parent catalog. + SchemaName types.String `tfsdk:"schema_name" tf:""` + // Function security type. + SecurityType types.String `tfsdk:"security_type" tf:""` + // Specific name of the function; Reserved for future use. + SpecificName types.String `tfsdk:"specific_name" tf:""` + // Function SQL data access. + SqlDataAccess types.String `tfsdk:"sql_data_access" tf:""` + // List of schemes whose objects can be referenced without qualification. + SqlPath types.String `tfsdk:"sql_path" tf:"optional"` +} + +func (newState *CreateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunction_SdkV2) { +} + +func (newState *CreateFunction_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFunction_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFunction. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateFunction_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "input_params": reflect.TypeOf(FunctionParameterInfos_SdkV2{}), + "return_params": reflect.TypeOf(FunctionParameterInfos_SdkV2{}), + "routine_dependencies": reflect.TypeOf(DependencyList_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, CreateFunction_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateFunction_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "comment": o.Comment, + "data_type": o.DataType, + "external_language": o.ExternalLanguage, + "external_name": o.ExternalName, + "full_data_type": o.FullDataType, + "input_params": o.InputParams, + "is_deterministic": o.IsDeterministic, + "is_null_call": o.IsNullCall, + "name": o.Name, + "parameter_style": o.ParameterStyle, + "properties": o.Properties, + "return_params": o.ReturnParams, + "routine_body": o.RoutineBody, + "routine_definition": o.RoutineDefinition, + "routine_dependencies": o.RoutineDependencies, + "schema_name": o.SchemaName, + "security_type": o.SecurityType, + "specific_name": o.SpecificName, + "sql_data_access": o.SqlDataAccess, + "sql_path": o.SqlPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFunction_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "comment": types.StringType, + "data_type": types.StringType, + "external_language": types.StringType, + "external_name": types.StringType, + "full_data_type": types.StringType, + "input_params": basetypes.ListType{ + ElemType: FunctionParameterInfos{}.Type(ctx), + }, + "is_deterministic": types.BoolType, + "is_null_call": types.BoolType, + "name": types.StringType, + "parameter_style": types.StringType, + "properties": types.StringType, + "return_params": basetypes.ListType{ + ElemType: FunctionParameterInfos{}.Type(ctx), + }, + "routine_body": types.StringType, + "routine_definition": types.StringType, + "routine_dependencies": basetypes.ListType{ + ElemType: DependencyList{}.Type(ctx), + }, + "schema_name": types.StringType, + "security_type": types.StringType, + "specific_name": types.StringType, + "sql_data_access": types.StringType, + "sql_path": types.StringType, + }, + } +} + +// GetInputParams returns the value of the InputParams field in CreateFunction_SdkV2 as +// a FunctionParameterInfos_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFunction_SdkV2) GetInputParams(ctx context.Context) (FunctionParameterInfos_SdkV2, bool) { + var e FunctionParameterInfos_SdkV2 + if o.InputParams.IsNull() || o.InputParams.IsUnknown() { + return e, false + } + var v []FunctionParameterInfos_SdkV2 + d := o.InputParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInputParams sets the value of the InputParams field in CreateFunction_SdkV2. +func (o *CreateFunction_SdkV2) SetInputParams(ctx context.Context, v FunctionParameterInfos_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input_params"] + o.InputParams = types.ListValueMust(t, vs) +} + +// GetReturnParams returns the value of the ReturnParams field in CreateFunction_SdkV2 as +// a FunctionParameterInfos_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFunction_SdkV2) GetReturnParams(ctx context.Context) (FunctionParameterInfos_SdkV2, bool) { + var e FunctionParameterInfos_SdkV2 + if o.ReturnParams.IsNull() || o.ReturnParams.IsUnknown() { + return e, false + } + var v []FunctionParameterInfos_SdkV2 + d := o.ReturnParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetReturnParams sets the value of the ReturnParams field in CreateFunction_SdkV2. +func (o *CreateFunction_SdkV2) SetReturnParams(ctx context.Context, v FunctionParameterInfos_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["return_params"] + o.ReturnParams = types.ListValueMust(t, vs) +} + +// GetRoutineDependencies returns the value of the RoutineDependencies field in CreateFunction_SdkV2 as +// a DependencyList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFunction_SdkV2) GetRoutineDependencies(ctx context.Context) (DependencyList_SdkV2, bool) { + var e DependencyList_SdkV2 + if o.RoutineDependencies.IsNull() || o.RoutineDependencies.IsUnknown() { + return e, false + } + var v []DependencyList_SdkV2 + d := o.RoutineDependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRoutineDependencies sets the value of the RoutineDependencies field in CreateFunction_SdkV2. +func (o *CreateFunction_SdkV2) SetRoutineDependencies(ctx context.Context, v DependencyList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["routine_dependencies"] + o.RoutineDependencies = types.ListValueMust(t, vs) +} + +type CreateFunctionRequest_SdkV2 struct { + // Partial __FunctionInfo__ specifying the function to be created. + FunctionInfo types.List `tfsdk:"function_info" tf:"object"` +} + +func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunctionRequest_SdkV2) { +} + +func (newState *CreateFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFunctionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateFunctionRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "function_info": reflect.TypeOf(CreateFunction_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, CreateFunctionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateFunctionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "function_info": o.FunctionInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFunctionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "function_info": basetypes.ListType{ + ElemType: CreateFunction{}.Type(ctx), + }, + }, + } +} + +// GetFunctionInfo returns the value of the FunctionInfo field in CreateFunctionRequest_SdkV2 as +// a CreateFunction_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFunctionRequest_SdkV2) GetFunctionInfo(ctx context.Context) (CreateFunction_SdkV2, bool) { + var e CreateFunction_SdkV2 + if o.FunctionInfo.IsNull() || o.FunctionInfo.IsUnknown() { + return e, false + } + var v []CreateFunction_SdkV2 + d := o.FunctionInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFunctionInfo sets the value of the FunctionInfo field in CreateFunctionRequest_SdkV2. +func (o *CreateFunctionRequest_SdkV2) SetFunctionInfo(ctx context.Context, v CreateFunction_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["function_info"] + o.FunctionInfo = types.ListValueMust(t, vs) +} + +type CreateMetastore_SdkV2 struct { + // The user-specified name of the metastore. + Name types.String `tfsdk:"name" tf:""` + // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). + // The field can be omitted in the __workspace-level__ __API__ but not in + // the __account-level__ __API__. If this field is omitted, the region of + // the workspace receiving the request will be used. + Region types.String `tfsdk:"region" tf:"optional"` + // The storage root URL for metastore + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` +} + +func (newState *CreateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMetastore_SdkV2) { +} + +func (newState *CreateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMetastore_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastore. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateMetastore_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, CreateMetastore_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateMetastore_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "region": o.Region, + "storage_root": o.StorageRoot, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateMetastore_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "region": types.StringType, + "storage_root": types.StringType, + }, + } +} + +type CreateMetastoreAssignment_SdkV2 struct { + // The name of the default catalog in the metastore. This field is + // depracted. Please use "Default Namespace API" to configure the default + // catalog for a Databricks workspace. + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:""` + // The unique ID of the metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:""` + // A workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *CreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMetastoreAssignment_SdkV2) { +} + +func (newState *CreateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMetastoreAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateMetastoreAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateMetastoreAssignment_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, CreateMetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateMetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default_catalog_name": types.StringType, + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type CreateMonitor_SdkV2 struct { + // The directory to store monitoring assets (e.g. dashboard, metric tables). + AssetsDir types.String `tfsdk:"assets_dir" tf:""` + // Name of the baseline table from which drift metrics are computed from. + // Columns in the monitored table should also be present in the baseline + // table. + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + // Custom metrics to compute on the monitored table. These can be aggregate + // metrics, derived metrics (from already computed aggregate metrics), or + // drift metrics (comparing metrics across time windows). + CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + // The data classification config for the monitor. + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + // Configuration for monitoring inference logs. + InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + // The notification settings for the monitor. + Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + // Schema where output metric tables are created. + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` + // The schedule for automatically updating and refreshing metric tables. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // Whether to skip creating a default dashboard summarizing data quality + // metrics. + SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:"optional"` + // List of column expressions to slice data with for targeted analysis. The + // data is grouped by each expression independently, resulting in a separate + // slice for each predicate and its complements. For high-cardinality + // columns, only the top 100 unique values by frequency will generate + // slices. + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + // Configuration for monitoring snapshot tables. + Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + // Full name of the table. + TableName types.String `tfsdk:"-"` + // Configuration for monitoring time series tables. + TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + // Optional argument to specify the warehouse for dashboard creation. If not + // specified, the first running warehouse will be used. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateMonitor_SdkV2) { +} + +func (newState *CreateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateMonitor_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateMonitor_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_metrics": reflect.TypeOf(MonitorMetric_SdkV2{}), + "data_classification_config": reflect.TypeOf(MonitorDataClassificationConfig_SdkV2{}), + "inference_log": reflect.TypeOf(MonitorInferenceLog_SdkV2{}), + "notifications": reflect.TypeOf(MonitorNotifications_SdkV2{}), + "schedule": reflect.TypeOf(MonitorCronSchedule_SdkV2{}), + "slicing_exprs": reflect.TypeOf(types.String{}), + "snapshot": reflect.TypeOf(MonitorSnapshot_SdkV2{}), + "time_series": reflect.TypeOf(MonitorTimeSeries_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, CreateMonitor_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateMonitor_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets_dir": o.AssetsDir, + "baseline_table_name": o.BaselineTableName, + "custom_metrics": o.CustomMetrics, + "data_classification_config": o.DataClassificationConfig, + "inference_log": o.InferenceLog, + "notifications": o.Notifications, + "output_schema_name": o.OutputSchemaName, + "schedule": o.Schedule, + "skip_builtin_dashboard": o.SkipBuiltinDashboard, + "slicing_exprs": o.SlicingExprs, + "snapshot": o.Snapshot, + "table_name": o.TableName, + "time_series": o.TimeSeries, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateMonitor_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets_dir": types.StringType, + "baseline_table_name": types.StringType, + "custom_metrics": basetypes.ListType{ + ElemType: MonitorMetric{}.Type(ctx), + }, + "data_classification_config": basetypes.ListType{ + ElemType: MonitorDataClassificationConfig{}.Type(ctx), + }, + "inference_log": basetypes.ListType{ + ElemType: MonitorInferenceLog{}.Type(ctx), + }, + "notifications": basetypes.ListType{ + ElemType: MonitorNotifications{}.Type(ctx), + }, + "output_schema_name": types.StringType, + "schedule": basetypes.ListType{ + ElemType: MonitorCronSchedule{}.Type(ctx), + }, + "skip_builtin_dashboard": types.BoolType, + "slicing_exprs": basetypes.ListType{ + ElemType: types.StringType, + }, + "snapshot": basetypes.ListType{ + ElemType: MonitorSnapshot{}.Type(ctx), + }, + "table_name": types.StringType, + "time_series": basetypes.ListType{ + ElemType: MonitorTimeSeries{}.Type(ctx), + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetCustomMetrics returns the value of the CustomMetrics field in CreateMonitor_SdkV2 as +// a slice of MonitorMetric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetCustomMetrics(ctx context.Context) ([]MonitorMetric_SdkV2, bool) { + if o.CustomMetrics.IsNull() || o.CustomMetrics.IsUnknown() { + return nil, false + } + var v []MonitorMetric_SdkV2 + d := o.CustomMetrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomMetrics sets the value of the CustomMetrics field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetCustomMetrics(ctx context.Context, v []MonitorMetric_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["custom_metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomMetrics = types.ListValueMust(t, vs) +} + +// GetDataClassificationConfig returns the value of the DataClassificationConfig field in CreateMonitor_SdkV2 as +// a MonitorDataClassificationConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetDataClassificationConfig(ctx context.Context) (MonitorDataClassificationConfig_SdkV2, bool) { + var e MonitorDataClassificationConfig_SdkV2 + if o.DataClassificationConfig.IsNull() || o.DataClassificationConfig.IsUnknown() { + return e, false + } + var v []MonitorDataClassificationConfig_SdkV2 + d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataClassificationConfig sets the value of the DataClassificationConfig field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] + o.DataClassificationConfig = types.ListValueMust(t, vs) +} + +// GetInferenceLog returns the value of the InferenceLog field in CreateMonitor_SdkV2 as +// a MonitorInferenceLog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetInferenceLog(ctx context.Context) (MonitorInferenceLog_SdkV2, bool) { + var e MonitorInferenceLog_SdkV2 + if o.InferenceLog.IsNull() || o.InferenceLog.IsUnknown() { + return e, false + } + var v []MonitorInferenceLog_SdkV2 + d := o.InferenceLog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceLog sets the value of the InferenceLog field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetInferenceLog(ctx context.Context, v MonitorInferenceLog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] + o.InferenceLog = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in CreateMonitor_SdkV2 as +// a MonitorNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetNotifications(ctx context.Context) (MonitorNotifications_SdkV2, bool) { + var e MonitorNotifications_SdkV2 + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return e, false + } + var v []MonitorNotifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotifications sets the value of the Notifications field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetNotifications(ctx context.Context, v MonitorNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] + o.Notifications = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in CreateMonitor_SdkV2 as +// a MonitorCronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetSchedule(ctx context.Context) (MonitorCronSchedule_SdkV2, bool) { + var e MonitorCronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []MonitorCronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetSchedule(ctx context.Context, v MonitorCronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetSlicingExprs returns the value of the SlicingExprs field in CreateMonitor_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetSlicingExprs(ctx context.Context) ([]types.String, bool) { + if o.SlicingExprs.IsNull() || o.SlicingExprs.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SlicingExprs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSlicingExprs sets the value of the SlicingExprs field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetSlicingExprs(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["slicing_exprs"] + t = t.(attr.TypeWithElementType).ElementType() + o.SlicingExprs = types.ListValueMust(t, vs) +} + +// GetSnapshot returns the value of the Snapshot field in CreateMonitor_SdkV2 as +// a MonitorSnapshot_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetSnapshot(ctx context.Context) (MonitorSnapshot_SdkV2, bool) { + var e MonitorSnapshot_SdkV2 + if o.Snapshot.IsNull() || o.Snapshot.IsUnknown() { + return e, false + } + var v []MonitorSnapshot_SdkV2 + d := o.Snapshot.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSnapshot sets the value of the Snapshot field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetSnapshot(ctx context.Context, v MonitorSnapshot_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] + o.Snapshot = types.ListValueMust(t, vs) +} + +// GetTimeSeries returns the value of the TimeSeries field in CreateMonitor_SdkV2 as +// a MonitorTimeSeries_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateMonitor_SdkV2) GetTimeSeries(ctx context.Context) (MonitorTimeSeries_SdkV2, bool) { + var e MonitorTimeSeries_SdkV2 + if o.TimeSeries.IsNull() || o.TimeSeries.IsUnknown() { + return e, false + } + var v []MonitorTimeSeries_SdkV2 + d := o.TimeSeries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTimeSeries sets the value of the TimeSeries field in CreateMonitor_SdkV2. +func (o *CreateMonitor_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSeries_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] + o.TimeSeries = types.ListValueMust(t, vs) +} + +// Create an Online Table +type CreateOnlineTableRequest_SdkV2 struct { + // Online Table information. + Table types.List `tfsdk:"table" tf:"optional,object"` +} + +func (newState *CreateOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOnlineTableRequest_SdkV2) { +} + +func (newState *CreateOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOnlineTableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOnlineTableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateOnlineTableRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "table": reflect.TypeOf(OnlineTable_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, CreateOnlineTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateOnlineTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table": o.Table, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateOnlineTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table": basetypes.ListType{ + ElemType: OnlineTable{}.Type(ctx), + }, + }, + } +} + +// GetTable returns the value of the Table field in CreateOnlineTableRequest_SdkV2 as +// a OnlineTable_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateOnlineTableRequest_SdkV2) GetTable(ctx context.Context) (OnlineTable_SdkV2, bool) { + var e OnlineTable_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []OnlineTable_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 CreateOnlineTableRequest_SdkV2. +func (o *CreateOnlineTableRequest_SdkV2) SetTable(ctx context.Context, v OnlineTable_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +type CreateRegisteredModelRequest_SdkV2 struct { + // The name of the catalog where the schema and the registered model reside + CatalogName types.String `tfsdk:"catalog_name" tf:""` + // The comment attached to the registered model + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the registered model + Name types.String `tfsdk:"name" tf:""` + // The name of the schema where the registered model resides + SchemaName types.String `tfsdk:"schema_name" tf:""` + // The storage location on the cloud under which model version data files + // are stored + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` +} + +func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegisteredModelRequest_SdkV2) { +} + +func (newState *CreateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegisteredModelRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRegisteredModelRequest_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, CreateRegisteredModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRegisteredModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "comment": o.Comment, + "name": o.Name, + "schema_name": o.SchemaName, + "storage_location": o.StorageLocation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "schema_name": types.StringType, + "storage_location": types.StringType, + }, + } +} + +type CreateResponse_SdkV2 struct { +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateResponse_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, CreateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateResponse_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 CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type CreateSchema_SdkV2 struct { + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:""` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of schema, relative to parent catalog. + Name types.String `tfsdk:"name" tf:""` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // Storage root URL for managed tables within schema. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` +} + +func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSchema_SdkV2) { +} + +func (newState *CreateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateSchema_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateSchema_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "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, CreateSchema_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateSchema_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "comment": o.Comment, + "name": o.Name, + "properties": o.Properties, + "storage_root": o.StorageRoot, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateSchema_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "storage_root": types.StringType, + }, + } +} + +// GetProperties returns the value of the Properties field in CreateSchema_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 *CreateSchema_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 CreateSchema_SdkV2. +func (o *CreateSchema_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) +} + +type CreateStorageCredential_SdkV2 struct { + // The AWS IAM role configuration. + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // The Cloudflare API token configuration. + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The Databricks managed GCP service account configuration. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // The credential name. The name must be unique within the metastore. + Name types.String `tfsdk:"name" tf:""` + // Whether the storage credential is only usable for read operations. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Supplying true to this argument skips validation of the created + // credential. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` +} + +func (newState *CreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageCredential_SdkV2) { +} + +func (newState *CreateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateStorageCredential_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateStorageCredential. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateStorageCredential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRoleRequest_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentityRequest_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountRequest_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, CreateStorageCredential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateStorageCredential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "cloudflare_api_token": o.CloudflareApiToken, + "comment": o.Comment, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "name": o.Name, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRoleRequest{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentityRequest{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "cloudflare_api_token": basetypes.ListType{ + ElemType: CloudflareApiToken{}.Type(ctx), + }, + "comment": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + }, + "name": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in CreateStorageCredential_SdkV2 as +// a AwsIamRoleRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageCredential_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRoleRequest_SdkV2, bool) { + var e AwsIamRoleRequest_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRoleRequest_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in CreateStorageCredential_SdkV2. +func (o *CreateStorageCredential_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CreateStorageCredential_SdkV2 as +// a AzureManagedIdentityRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageCredential_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentityRequest_SdkV2, bool) { + var e AzureManagedIdentityRequest_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentityRequest_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CreateStorageCredential_SdkV2. +func (o *CreateStorageCredential_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CreateStorageCredential_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageCredential_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CreateStorageCredential_SdkV2. +func (o *CreateStorageCredential_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetCloudflareApiToken returns the value of the CloudflareApiToken field in CreateStorageCredential_SdkV2 as +// a CloudflareApiToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageCredential_SdkV2) GetCloudflareApiToken(ctx context.Context) (CloudflareApiToken_SdkV2, bool) { + var e CloudflareApiToken_SdkV2 + if o.CloudflareApiToken.IsNull() || o.CloudflareApiToken.IsUnknown() { + return e, false + } + var v []CloudflareApiToken_SdkV2 + d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudflareApiToken sets the value of the CloudflareApiToken field in CreateStorageCredential_SdkV2. +func (o *CreateStorageCredential_SdkV2) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] + o.CloudflareApiToken = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CreateStorageCredential_SdkV2 as +// a DatabricksGcpServiceAccountRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageCredential_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccountRequest_SdkV2, bool) { + var e DatabricksGcpServiceAccountRequest_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccountRequest_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CreateStorageCredential_SdkV2. +func (o *CreateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +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" tf:"object"` + // The full name of the table referenced by the constraint. + FullNameArg types.String `tfsdk:"full_name_arg" tf:""` +} + +func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTableConstraint_SdkV2) { +} + +func (newState *CreateTableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTableConstraint_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateTableConstraint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "constraint": reflect.TypeOf(TableConstraint_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, CreateTableConstraint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateTableConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "constraint": o.Constraint, + "full_name_arg": o.FullNameArg, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateTableConstraint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "constraint": basetypes.ListType{ + ElemType: TableConstraint{}.Type(ctx), + }, + "full_name_arg": types.StringType, + }, + } +} + +// GetConstraint returns the value of the Constraint field in CreateTableConstraint_SdkV2 as +// a TableConstraint_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateTableConstraint_SdkV2) GetConstraint(ctx context.Context) (TableConstraint_SdkV2, bool) { + var e TableConstraint_SdkV2 + if o.Constraint.IsNull() || o.Constraint.IsUnknown() { + return e, false + } + var v []TableConstraint_SdkV2 + d := o.Constraint.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConstraint sets the value of the Constraint field in CreateTableConstraint_SdkV2. +func (o *CreateTableConstraint_SdkV2) SetConstraint(ctx context.Context, v TableConstraint_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["constraint"] + o.Constraint = types.ListValueMust(t, vs) +} + +type CreateVolumeRequestContent_SdkV2 struct { + // The name of the catalog where the schema and the volume are + CatalogName types.String `tfsdk:"catalog_name" tf:""` + // The comment attached to the volume + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the volume + Name types.String `tfsdk:"name" tf:""` + // The name of the schema where the volume is + SchemaName types.String `tfsdk:"schema_name" tf:""` + // The storage location on the cloud + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + + VolumeType types.String `tfsdk:"volume_type" tf:""` +} + +func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVolumeRequestContent_SdkV2) { +} + +func (newState *CreateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVolumeRequestContent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVolumeRequestContent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVolumeRequestContent_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, CreateVolumeRequestContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVolumeRequestContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "comment": o.Comment, + "name": o.Name, + "schema_name": o.SchemaName, + "storage_location": o.StorageLocation, + "volume_type": o.VolumeType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVolumeRequestContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "schema_name": types.StringType, + "storage_location": types.StringType, + "volume_type": types.StringType, + }, + } +} + +type CredentialInfo_SdkV2 struct { + // The AWS IAM role configuration + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. Only applicable when purpose + // is **STORAGE**. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this credential was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of credential creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // GCP long-lived credential. Databricks-created Google Cloud Storage + // service account. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // The full name of the credential. + FullName types.String `tfsdk:"full_name" tf:"optional"` + // The unique identifier of the credential. + Id types.String `tfsdk:"id" tf:"optional"` + // Whether the current securable is accessible from all workspaces or a + // specific set of workspaces. + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Unique identifier of the parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The credential name. The name must be unique among storage and service + // credentials within the metastore. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of current owner of credential. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Indicates the purpose of the credential. + Purpose types.String `tfsdk:"purpose" tf:"optional"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Time at which this credential was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the credential. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // Whether this credential is the current metastore's root storage + // credential. Only applicable when purpose is **STORAGE**. + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` +} + +func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo_SdkV2) { +} + +func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CredentialInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRole_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentity_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccount_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, CredentialInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CredentialInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "full_name": o.FullName, + "id": o.Id, + "isolation_mode": o.IsolationMode, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "purpose": o.Purpose, + "read_only": o.ReadOnly, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "used_for_managed_storage": o.UsedForManagedStorage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRole{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentity{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + }, + "full_name": types.StringType, + "id": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "purpose": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "used_for_managed_storage": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in CredentialInfo_SdkV2 as +// a AwsIamRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CredentialInfo_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRole_SdkV2, bool) { + var e AwsIamRole_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRole_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in CredentialInfo_SdkV2. +func (o *CredentialInfo_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CredentialInfo_SdkV2 as +// a AzureManagedIdentity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CredentialInfo_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentity_SdkV2, bool) { + var e AzureManagedIdentity_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentity_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CredentialInfo_SdkV2. +func (o *CredentialInfo_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CredentialInfo_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CredentialInfo_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CredentialInfo_SdkV2. +func (o *CredentialInfo_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CredentialInfo_SdkV2 as +// a DatabricksGcpServiceAccount_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CredentialInfo_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccount_SdkV2, bool) { + var e DatabricksGcpServiceAccount_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccount_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CredentialInfo_SdkV2. +func (o *CredentialInfo_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +type CredentialValidationResult_SdkV2 struct { + // Error message would exist when the result does not equal to **PASS**. + Message types.String `tfsdk:"message" tf:"optional"` + // The results of the tested operation. + Result types.String `tfsdk:"result" tf:"optional"` +} + +func (newState *CredentialValidationResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialValidationResult_SdkV2) { +} + +func (newState *CredentialValidationResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialValidationResult_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialValidationResult. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CredentialValidationResult_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, CredentialValidationResult_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CredentialValidationResult_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "result": o.Result, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CredentialValidationResult_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "result": types.StringType, + }, + } +} + +// Currently assigned workspaces +type CurrentWorkspaceBindings_SdkV2 struct { + // A list of workspace IDs. + Workspaces types.List `tfsdk:"workspaces" tf:"optional"` +} + +func (newState *CurrentWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CurrentWorkspaceBindings_SdkV2) { +} + +func (newState *CurrentWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringRead(existingState CurrentWorkspaceBindings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CurrentWorkspaceBindings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CurrentWorkspaceBindings_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "workspaces": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, CurrentWorkspaceBindings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CurrentWorkspaceBindings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspaces": o.Workspaces, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CurrentWorkspaceBindings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspaces": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetWorkspaces returns the value of the Workspaces field in CurrentWorkspaceBindings_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CurrentWorkspaceBindings_SdkV2) GetWorkspaces(ctx context.Context) ([]types.Int64, bool) { + if o.Workspaces.IsNull() || o.Workspaces.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.Workspaces.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWorkspaces sets the value of the Workspaces field in CurrentWorkspaceBindings_SdkV2. +func (o *CurrentWorkspaceBindings_SdkV2) SetWorkspaces(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspaces"] + t = t.(attr.TypeWithElementType).ElementType() + o.Workspaces = types.ListValueMust(t, vs) +} + +// GCP long-lived credential. Databricks-created Google Cloud Storage service +// account. +type DatabricksGcpServiceAccount_SdkV2 struct { + // The Databricks internal ID that represents this managed identity. This + // field is only used to persist the credential_id once it is fetched from + // the credentials manager - as we only use the protobuf serializer to store + // credentials, this ID gets persisted to the database + CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + // The email of the service account. + Email types.String `tfsdk:"email" tf:"optional"` + // The ID that represents the private key for this Service Account + PrivateKeyId types.String `tfsdk:"private_key_id" tf:"optional"` +} + +func (newState *DatabricksGcpServiceAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccount_SdkV2) { +} + +func (newState *DatabricksGcpServiceAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccount_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccount. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DatabricksGcpServiceAccount_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, DatabricksGcpServiceAccount_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabricksGcpServiceAccount_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "email": o.Email, + "private_key_id": o.PrivateKeyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabricksGcpServiceAccount_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.StringType, + "email": types.StringType, + "private_key_id": types.StringType, + }, + } +} + +type DatabricksGcpServiceAccountRequest_SdkV2 struct { +} + +func (newState *DatabricksGcpServiceAccountRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccountRequest_SdkV2) { +} + +func (newState *DatabricksGcpServiceAccountRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DatabricksGcpServiceAccountRequest_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, DatabricksGcpServiceAccountRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabricksGcpServiceAccountRequest_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 DatabricksGcpServiceAccountRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DatabricksGcpServiceAccountResponse_SdkV2 struct { + // The Databricks internal ID that represents this service account. This is + // an output-only field. + CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + // The email of the service account. This is an output-only field. + Email types.String `tfsdk:"email" tf:"optional"` +} + +func (newState *DatabricksGcpServiceAccountResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksGcpServiceAccountResponse_SdkV2) { +} + +func (newState *DatabricksGcpServiceAccountResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksGcpServiceAccountResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksGcpServiceAccountResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DatabricksGcpServiceAccountResponse_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, DatabricksGcpServiceAccountResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabricksGcpServiceAccountResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "email": o.Email, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabricksGcpServiceAccountResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.StringType, + "email": types.StringType, + }, + } +} + +// Delete a metastore assignment +type DeleteAccountMetastoreAssignmentRequest_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreAssignmentRequest_SdkV2) { +} + +func (newState *DeleteAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreAssignmentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreAssignmentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountMetastoreAssignmentRequest_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, DeleteAccountMetastoreAssignmentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountMetastoreAssignmentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountMetastoreAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +// Delete a metastore +type DeleteAccountMetastoreRequest_SdkV2 struct { + // Force deletion even if the metastore is not empty. Default is false. + Force types.Bool `tfsdk:"-"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountMetastoreRequest_SdkV2) { +} + +func (newState *DeleteAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountMetastoreRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountMetastoreRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountMetastoreRequest_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, DeleteAccountMetastoreRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountMetastoreRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountMetastoreRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "metastore_id": types.StringType, + }, + } +} + +// Delete a storage credential +type DeleteAccountStorageCredentialRequest_SdkV2 struct { + // Force deletion even if the Storage Credential is not empty. Default is + // false. + Force types.Bool `tfsdk:"-"` + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Name of the storage credential. + StorageCredentialName types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountStorageCredentialRequest_SdkV2) { +} + +func (newState *DeleteAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountStorageCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountStorageCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountStorageCredentialRequest_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, DeleteAccountStorageCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountStorageCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountStorageCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "metastore_id": types.StringType, + "storage_credential_name": types.StringType, + }, + } +} + +// Delete a Registered Model Alias +type DeleteAliasRequest_SdkV2 struct { + // The name of the alias + Alias types.String `tfsdk:"-"` + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"-"` +} + +func (newState *DeleteAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasRequest_SdkV2) { +} + +func (newState *DeleteAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAliasRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAliasRequest_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, DeleteAliasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAliasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAliasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alias": types.StringType, + "full_name": types.StringType, + }, + } +} + +type DeleteAliasResponse_SdkV2 struct { +} + +func (newState *DeleteAliasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAliasResponse_SdkV2) { +} + +func (newState *DeleteAliasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAliasResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAliasResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAliasResponse_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, DeleteAliasResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAliasResponse_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 DeleteAliasResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a catalog +type DeleteCatalogRequest_SdkV2 struct { + // Force deletion even if the catalog is not empty. + Force types.Bool `tfsdk:"-"` + // The name of the catalog. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCatalogRequest_SdkV2) { +} + +func (newState *DeleteCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCatalogRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCatalogRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCatalogRequest_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, DeleteCatalogRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCatalogRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name": types.StringType, + }, + } +} + +// Delete a connection +type DeleteConnectionRequest_SdkV2 struct { + // The name of the connection to be deleted. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteConnectionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteConnectionRequest_SdkV2) { +} + +func (newState *DeleteConnectionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteConnectionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteConnectionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteConnectionRequest_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, DeleteConnectionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteConnectionRequest_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 DeleteConnectionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Delete a credential +type DeleteCredentialRequest_SdkV2 struct { + // Force an update even if there are dependent services (when purpose is + // **SERVICE**) or dependent external locations and external tables (when + // purpose is **STORAGE**). + Force types.Bool `tfsdk:"-"` + // Name of the credential. + NameArg types.String `tfsdk:"-"` +} + +func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest_SdkV2) { +} + +func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCredentialRequest_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, DeleteCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "name_arg": o.NameArg, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name_arg": types.StringType, + }, + } +} + +type DeleteCredentialResponse_SdkV2 struct { +} + +func (newState *DeleteCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialResponse_SdkV2) { +} + +func (newState *DeleteCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCredentialResponse_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, DeleteCredentialResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialResponse_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 DeleteCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete an external location +type DeleteExternalLocationRequest_SdkV2 struct { + // Force deletion even if there are dependent external tables or mounts. + Force types.Bool `tfsdk:"-"` + // Name of the external location. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExternalLocationRequest_SdkV2) { +} + +func (newState *DeleteExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExternalLocationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExternalLocationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExternalLocationRequest_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, DeleteExternalLocationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExternalLocationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExternalLocationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name": types.StringType, + }, + } +} + +// Delete a function +type DeleteFunctionRequest_SdkV2 struct { + // Force deletion even if the function is notempty. + Force types.Bool `tfsdk:"-"` + // The fully-qualified name of the function (of the form + // __catalog_name__.__schema_name__.__function__name__). + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFunctionRequest_SdkV2) { +} + +func (newState *DeleteFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFunctionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFunctionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteFunctionRequest_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, DeleteFunctionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteFunctionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteFunctionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name": types.StringType, + }, + } +} + +// Delete a metastore +type DeleteMetastoreRequest_SdkV2 struct { + // Force deletion even if the metastore is not empty. Default is false. + Force types.Bool `tfsdk:"-"` + // Unique ID of the metastore. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteMetastoreRequest_SdkV2) { +} + +func (newState *DeleteMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteMetastoreRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteMetastoreRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteMetastoreRequest_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, DeleteMetastoreRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteMetastoreRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteMetastoreRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "id": types.StringType, + }, + } +} + +// Delete a Model Version +type DeleteModelVersionRequest_SdkV2 struct { + // The three-level (fully qualified) name of the model version + FullName types.String `tfsdk:"-"` + // The integer version number of the model version + Version types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest_SdkV2) { +} + +func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelVersionRequest_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, DeleteModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "version": types.Int64Type, + }, + } +} + +// Delete an Online Table +type DeleteOnlineTableRequest_SdkV2 struct { + // Full three-part (catalog, schema, table) name of the table. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteOnlineTableRequest_SdkV2) { +} + +func (newState *DeleteOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteOnlineTableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteOnlineTableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteOnlineTableRequest_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, DeleteOnlineTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteOnlineTableRequest_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 DeleteOnlineTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Delete a table monitor +type DeleteQualityMonitorRequest_SdkV2 struct { + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *DeleteQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQualityMonitorRequest_SdkV2) { +} + +func (newState *DeleteQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQualityMonitorRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQualityMonitorRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteQualityMonitorRequest_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, DeleteQualityMonitorRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteQualityMonitorRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteQualityMonitorRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + }, + } +} + +// Delete a Registered Model +type DeleteRegisteredModelRequest_SdkV2 struct { + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"-"` +} + +func (newState *DeleteRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRegisteredModelRequest_SdkV2) { +} + +func (newState *DeleteRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRegisteredModelRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRegisteredModelRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRegisteredModelRequest_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, DeleteRegisteredModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRegisteredModelRequest_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 DeleteRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete a schema +type DeleteSchemaRequest_SdkV2 struct { + // Force deletion even if the schema is not empty. + Force types.Bool `tfsdk:"-"` + // Full name of the schema. + FullName types.String `tfsdk:"-"` +} + +func (newState *DeleteSchemaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSchemaRequest_SdkV2) { +} + +func (newState *DeleteSchemaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSchemaRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSchemaRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteSchemaRequest_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, DeleteSchemaRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteSchemaRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "full_name": o.FullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteSchemaRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "full_name": types.StringType, + }, + } +} + +// Delete a credential +type DeleteStorageCredentialRequest_SdkV2 struct { + // Force deletion even if there are dependent external locations or external + // tables. + Force types.Bool `tfsdk:"-"` + // Name of the storage credential. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageCredentialRequest_SdkV2) { +} + +func (newState *DeleteStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteStorageCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteStorageCredentialRequest_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, DeleteStorageCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteStorageCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteStorageCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name": types.StringType, + }, + } +} + +// Delete a table constraint +type DeleteTableConstraintRequest_SdkV2 struct { + // If true, try deleting all child constraints of the current constraint. If + // false, reject this operation if the current constraint has any child + // constraints. + Cascade types.Bool `tfsdk:"-"` + // The name of the constraint to delete. + ConstraintName types.String `tfsdk:"-"` + // Full name of the table referenced by the constraint. + FullName types.String `tfsdk:"-"` +} + +func (newState *DeleteTableConstraintRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableConstraintRequest_SdkV2) { +} + +func (newState *DeleteTableConstraintRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTableConstraintRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableConstraintRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTableConstraintRequest_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, DeleteTableConstraintRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTableConstraintRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cascade": o.Cascade, + "constraint_name": o.ConstraintName, + "full_name": o.FullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteTableConstraintRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cascade": types.BoolType, + "constraint_name": types.StringType, + "full_name": types.StringType, + }, + } +} + +// Delete a table +type DeleteTableRequest_SdkV2 struct { + // Full name of the table. + FullName types.String `tfsdk:"-"` +} + +func (newState *DeleteTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTableRequest_SdkV2) { +} + +func (newState *DeleteTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTableRequest_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, DeleteTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTableRequest_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 DeleteTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + }, + } +} + +// Delete a Volume +type DeleteVolumeRequest_SdkV2 struct { + // The three-level (fully qualified) name of the volume + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteVolumeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVolumeRequest_SdkV2) { +} + +func (newState *DeleteVolumeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVolumeRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVolumeRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteVolumeRequest_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, DeleteVolumeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteVolumeRequest_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 DeleteVolumeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Properties pertaining to the current state of the delta table as given by the +// commit server. This does not contain **delta.*** (input) properties in +// __TableInfo.properties__. +type DeltaRuntimePropertiesKvPairs_SdkV2 struct { + // A map of key-value properties attached to the securable. + DeltaRuntimeProperties types.Map `tfsdk:"delta_runtime_properties" tf:""` +} + +func (newState *DeltaRuntimePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaRuntimePropertiesKvPairs_SdkV2) { +} + +func (newState *DeltaRuntimePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaRuntimePropertiesKvPairs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaRuntimePropertiesKvPairs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeltaRuntimePropertiesKvPairs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "delta_runtime_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, DeltaRuntimePropertiesKvPairs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeltaRuntimePropertiesKvPairs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "delta_runtime_properties": o.DeltaRuntimeProperties, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeltaRuntimePropertiesKvPairs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "delta_runtime_properties": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDeltaRuntimeProperties returns the value of the DeltaRuntimeProperties field in DeltaRuntimePropertiesKvPairs_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 *DeltaRuntimePropertiesKvPairs_SdkV2) GetDeltaRuntimeProperties(ctx context.Context) (map[string]types.String, bool) { + if o.DeltaRuntimeProperties.IsNull() || o.DeltaRuntimeProperties.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.DeltaRuntimeProperties.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDeltaRuntimeProperties sets the value of the DeltaRuntimeProperties field in DeltaRuntimePropertiesKvPairs_SdkV2. +func (o *DeltaRuntimePropertiesKvPairs_SdkV2) SetDeltaRuntimeProperties(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["delta_runtime_properties"] + t = t.(attr.TypeWithElementType).ElementType() + o.DeltaRuntimeProperties = types.MapValueMust(t, vs) +} + +// A dependency of a SQL object. Either the __table__ field or the __function__ +// field must be defined. +type Dependency_SdkV2 struct { + // A function that is dependent on a SQL object. + Function types.List `tfsdk:"function" tf:"optional,object"` + // A table that is dependent on a SQL object. + Table types.List `tfsdk:"table" tf:"optional,object"` +} + +func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dependency_SdkV2) { +} + +func (newState *Dependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dependency_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Dependency. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// 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{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, Dependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Dependency_SdkV2) 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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Dependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "function": basetypes.ListType{ + ElemType: FunctionDependency{}.Type(ctx), + }, + "table": basetypes.ListType{ + ElemType: TableDependency{}.Type(ctx), + }, + }, + } +} + +// 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. +func (o *Dependency_SdkV2) GetFunction(ctx context.Context) (FunctionDependency_SdkV2, bool) { + var e FunctionDependency_SdkV2 + if o.Function.IsNull() || o.Function.IsUnknown() { + return e, false + } + var v []FunctionDependency_SdkV2 + d := o.Function.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFunction sets the value of the Function field in Dependency_SdkV2. +func (o *Dependency_SdkV2) SetFunction(ctx context.Context, v FunctionDependency_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["function"] + o.Function = types.ListValueMust(t, vs) +} + +// GetTable returns the value of the Table field in Dependency_SdkV2 as +// a TableDependency_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dependency_SdkV2) GetTable(ctx context.Context) (TableDependency_SdkV2, bool) { + var e TableDependency_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []TableDependency_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 Dependency_SdkV2. +func (o *Dependency_SdkV2) SetTable(ctx context.Context, v TableDependency_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +// A list of dependencies. +type DependencyList_SdkV2 struct { + // Array of dependencies. + Dependencies types.List `tfsdk:"dependencies" tf:"optional"` +} + +func (newState *DependencyList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DependencyList_SdkV2) { +} + +func (newState *DependencyList_SdkV2) SyncEffectiveFieldsDuringRead(existingState DependencyList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DependencyList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DependencyList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dependencies": reflect.TypeOf(Dependency_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, DependencyList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DependencyList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dependencies": o.Dependencies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DependencyList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dependencies": basetypes.ListType{ + ElemType: Dependency{}.Type(ctx), + }, + }, + } +} + +// GetDependencies returns the value of the Dependencies field in DependencyList_SdkV2 as +// a slice of Dependency_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DependencyList_SdkV2) GetDependencies(ctx context.Context) ([]Dependency_SdkV2, bool) { + if o.Dependencies.IsNull() || o.Dependencies.IsUnknown() { + return nil, false + } + var v []Dependency_SdkV2 + d := o.Dependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDependencies sets the value of the Dependencies field in DependencyList_SdkV2. +func (o *DependencyList_SdkV2) SetDependencies(ctx context.Context, v []Dependency_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["dependencies"] + t = t.(attr.TypeWithElementType).ElementType() + o.Dependencies = types.ListValueMust(t, vs) +} + +// Disable a system schema +type DisableRequest_SdkV2 struct { + // The metastore ID under which the system schema lives. + MetastoreId types.String `tfsdk:"-"` + // Full name of the system schema. + SchemaName types.String `tfsdk:"-"` +} + +func (newState *DisableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableRequest_SdkV2) { +} + +func (newState *DisableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DisableRequest_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, DisableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DisableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DisableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type DisableResponse_SdkV2 struct { +} + +func (newState *DisableResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableResponse_SdkV2) { +} + +func (newState *DisableResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DisableResponse_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, DisableResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DisableResponse_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 DisableResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EffectivePermissionsList_SdkV2 struct { + // The privileges conveyed to each principal (either directly or via + // inheritance) + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` +} + +func (newState *EffectivePermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePermissionsList_SdkV2) { +} + +func (newState *EffectivePermissionsList_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePermissionsList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePermissionsList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EffectivePermissionsList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privilege_assignments": reflect.TypeOf(EffectivePrivilegeAssignment_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, EffectivePermissionsList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EffectivePermissionsList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EffectivePermissionsList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "privilege_assignments": basetypes.ListType{ + ElemType: EffectivePrivilegeAssignment{}.Type(ctx), + }, + }, + } +} + +// GetPrivilegeAssignments returns the value of the PrivilegeAssignments field in EffectivePermissionsList_SdkV2 as +// a slice of EffectivePrivilegeAssignment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EffectivePermissionsList_SdkV2) GetPrivilegeAssignments(ctx context.Context) ([]EffectivePrivilegeAssignment_SdkV2, bool) { + if o.PrivilegeAssignments.IsNull() || o.PrivilegeAssignments.IsUnknown() { + return nil, false + } + var v []EffectivePrivilegeAssignment_SdkV2 + d := o.PrivilegeAssignments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivilegeAssignments sets the value of the PrivilegeAssignments field in EffectivePermissionsList_SdkV2. +func (o *EffectivePermissionsList_SdkV2) SetPrivilegeAssignments(ctx context.Context, v []EffectivePrivilegeAssignment_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["privilege_assignments"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrivilegeAssignments = types.ListValueMust(t, vs) +} + +type EffectivePredictiveOptimizationFlag_SdkV2 struct { + // The name of the object from which the flag was inherited. If there was no + // inheritance, this field is left blank. + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + // The type of the object from which the flag was inherited. If there was no + // inheritance, this field is left blank. + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + Value types.String `tfsdk:"value" tf:""` +} + +func (newState *EffectivePredictiveOptimizationFlag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePredictiveOptimizationFlag_SdkV2) { +} + +func (newState *EffectivePredictiveOptimizationFlag_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePredictiveOptimizationFlag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePredictiveOptimizationFlag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EffectivePredictiveOptimizationFlag_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, EffectivePredictiveOptimizationFlag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EffectivePredictiveOptimizationFlag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited_from_name": o.InheritedFromName, + "inherited_from_type": o.InheritedFromType, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EffectivePredictiveOptimizationFlag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited_from_name": types.StringType, + "inherited_from_type": types.StringType, + "value": types.StringType, + }, + } +} + +type EffectivePrivilege_SdkV2 struct { + // The full name of the object that conveys this privilege via inheritance. + // This field is omitted when privilege is not inherited (it's assigned to + // the securable itself). + InheritedFromName types.String `tfsdk:"inherited_from_name" tf:"optional"` + // The type of the object that conveys this privilege via inheritance. This + // field is omitted when privilege is not inherited (it's assigned to the + // securable itself). + InheritedFromType types.String `tfsdk:"inherited_from_type" tf:"optional"` + // The privilege assigned to the principal. + Privilege types.String `tfsdk:"privilege" tf:"optional"` +} + +func (newState *EffectivePrivilege_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilege_SdkV2) { +} + +func (newState *EffectivePrivilege_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilege_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilege. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EffectivePrivilege_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, EffectivePrivilege_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EffectivePrivilege_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited_from_name": o.InheritedFromName, + "inherited_from_type": o.InheritedFromType, + "privilege": o.Privilege, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EffectivePrivilege_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited_from_name": types.StringType, + "inherited_from_type": types.StringType, + "privilege": types.StringType, + }, + } +} + +type EffectivePrivilegeAssignment_SdkV2 struct { + // The principal (user email address or group name). + Principal types.String `tfsdk:"principal" tf:"optional"` + // The privileges conveyed to the principal (either directly or via + // inheritance). + Privileges types.List `tfsdk:"privileges" tf:"optional"` +} + +func (newState *EffectivePrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EffectivePrivilegeAssignment_SdkV2) { +} + +func (newState *EffectivePrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState EffectivePrivilegeAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EffectivePrivilegeAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EffectivePrivilegeAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privileges": reflect.TypeOf(EffectivePrivilege_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, EffectivePrivilegeAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EffectivePrivilegeAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EffectivePrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal": types.StringType, + "privileges": basetypes.ListType{ + ElemType: EffectivePrivilege{}.Type(ctx), + }, + }, + } +} + +// GetPrivileges returns the value of the Privileges field in EffectivePrivilegeAssignment_SdkV2 as +// a slice of EffectivePrivilege_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EffectivePrivilegeAssignment_SdkV2) GetPrivileges(ctx context.Context) ([]EffectivePrivilege_SdkV2, bool) { + if o.Privileges.IsNull() || o.Privileges.IsUnknown() { + return nil, false + } + var v []EffectivePrivilege_SdkV2 + d := o.Privileges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivileges sets the value of the Privileges field in EffectivePrivilegeAssignment_SdkV2. +func (o *EffectivePrivilegeAssignment_SdkV2) SetPrivileges(ctx context.Context, v []EffectivePrivilege_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["privileges"] + t = t.(attr.TypeWithElementType).ElementType() + o.Privileges = types.ListValueMust(t, vs) +} + +// Enable a system schema +type EnableRequest_SdkV2 struct { + // The metastore ID under which the system schema lives. + MetastoreId types.String `tfsdk:"-"` + // Full name of the system schema. + SchemaName types.String `tfsdk:"-"` +} + +func (newState *EnableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableRequest_SdkV2) { +} + +func (newState *EnableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnableRequest_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, EnableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type EnableResponse_SdkV2 struct { +} + +func (newState *EnableResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnableResponse_SdkV2) { +} + +func (newState *EnableResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnableResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnableResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnableResponse_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, EnableResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnableResponse_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 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" tf:"optional,object"` +} + +func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails_SdkV2) { +} + +func (newState *EncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EncryptionDetails_SdkV2) { +} + +// 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{}.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) +} + +// Get boolean reflecting if table exists +type ExistsRequest_SdkV2 struct { + // Full name of the table. + FullName types.String `tfsdk:"-"` +} + +func (newState *ExistsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExistsRequest_SdkV2) { +} + +func (newState *ExistsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExistsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExistsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 ExternalLocationInfo_SdkV2 struct { + // The AWS access point to use when accesing s3 for this external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this external location was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of external location creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Unique ID of the location's storage credential. + CredentialId types.String `tfsdk:"credential_id" tf:"optional"` + // Name of the storage credential used with this location. + CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + // Indicates whether fallback mode is enabled for this external location. + // When fallback mode is enabled, the access to the location falls back to + // cluster credentials if UC credentials are not sufficient. + Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Unique identifier of metastore hosting the external location. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of the external location. + Name types.String `tfsdk:"name" tf:"optional"` + // The owner of the external location. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Indicates whether the external location is read-only. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Time at which external location this was last modified, in epoch + // milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the external location. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // Path URL of the external location. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *ExternalLocationInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLocationInfo_SdkV2) { +} + +func (newState *ExternalLocationInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLocationInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLocationInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExternalLocationInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "encryption_details": reflect.TypeOf(EncryptionDetails_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, ExternalLocationInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLocationInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_point": o.AccessPoint, + "browse_only": o.BrowseOnly, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "credential_id": o.CredentialId, + "credential_name": o.CredentialName, + "encryption_details": o.EncryptionDetails, + "fallback": o.Fallback, + "isolation_mode": o.IsolationMode, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "read_only": o.ReadOnly, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLocationInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_point": types.StringType, + "browse_only": types.BoolType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "credential_id": types.StringType, + "credential_name": types.StringType, + "encryption_details": basetypes.ListType{ + ElemType: EncryptionDetails{}.Type(ctx), + }, + "fallback": types.BoolType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "url": types.StringType, + }, + } +} + +// GetEncryptionDetails returns the value of the EncryptionDetails field in ExternalLocationInfo_SdkV2 as +// a EncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalLocationInfo_SdkV2) GetEncryptionDetails(ctx context.Context) (EncryptionDetails_SdkV2, bool) { + var e EncryptionDetails_SdkV2 + if o.EncryptionDetails.IsNull() || o.EncryptionDetails.IsUnknown() { + return e, false + } + var v []EncryptionDetails_SdkV2 + d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEncryptionDetails sets the value of the EncryptionDetails field in ExternalLocationInfo_SdkV2. +func (o *ExternalLocationInfo_SdkV2) SetEncryptionDetails(ctx context.Context, v EncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] + o.EncryptionDetails = types.ListValueMust(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 { + // The last source table Delta version that was synced to the online table. + // Note that this Delta version may only be partially synced to the online + // table. Only populated if the table is still online and available for + // serving. + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + // The timestamp of the last time any data was synchronized from the source + // table to the online table. Only populated if the table is still online + // and available for serving. + Timestamp types.String `tfsdk:"timestamp" tf:"optional"` +} + +func (newState *FailedStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FailedStatus_SdkV2) { +} + +func (newState *FailedStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState FailedStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FailedStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FailedStatus_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, FailedStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FailedStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FailedStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "last_processed_commit_version": types.Int64Type, + "timestamp": types.StringType, + }, + } +} + +type ForeignKeyConstraint_SdkV2 struct { + // Column names for this constraint. + ChildColumns types.List `tfsdk:"child_columns" tf:""` + // The name of the constraint. + Name types.String `tfsdk:"name" tf:""` + // Column names for this constraint. + ParentColumns types.List `tfsdk:"parent_columns" tf:""` + // The full name of the parent constraint. + ParentTable types.String `tfsdk:"parent_table" tf:""` +} + +func (newState *ForeignKeyConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForeignKeyConstraint_SdkV2) { +} + +func (newState *ForeignKeyConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForeignKeyConstraint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ForeignKeyConstraint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ForeignKeyConstraint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "child_columns": reflect.TypeOf(types.String{}), + "parent_columns": 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, ForeignKeyConstraint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ForeignKeyConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "child_columns": o.ChildColumns, + "name": o.Name, + "parent_columns": o.ParentColumns, + "parent_table": o.ParentTable, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ForeignKeyConstraint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "child_columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "name": types.StringType, + "parent_columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "parent_table": types.StringType, + }, + } +} + +// GetChildColumns returns the value of the ChildColumns field in ForeignKeyConstraint_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ForeignKeyConstraint_SdkV2) GetChildColumns(ctx context.Context) ([]types.String, bool) { + if o.ChildColumns.IsNull() || o.ChildColumns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ChildColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChildColumns sets the value of the ChildColumns field in ForeignKeyConstraint_SdkV2. +func (o *ForeignKeyConstraint_SdkV2) SetChildColumns(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["child_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.ChildColumns = types.ListValueMust(t, vs) +} + +// GetParentColumns returns the value of the ParentColumns field in ForeignKeyConstraint_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ForeignKeyConstraint_SdkV2) GetParentColumns(ctx context.Context) ([]types.String, bool) { + if o.ParentColumns.IsNull() || o.ParentColumns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ParentColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParentColumns sets the value of the ParentColumns field in ForeignKeyConstraint_SdkV2. +func (o *ForeignKeyConstraint_SdkV2) SetParentColumns(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["parent_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.ParentColumns = types.ListValueMust(t, vs) +} + +// A function that is dependent on a SQL object. +type FunctionDependency_SdkV2 struct { + // Full name of the dependent function, in the form of + // __catalog_name__.__schema_name__.__function_name__. + FunctionFullName types.String `tfsdk:"function_full_name" tf:""` +} + +func (newState *FunctionDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionDependency_SdkV2) { +} + +func (newState *FunctionDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionDependency_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionDependency. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FunctionDependency_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, FunctionDependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FunctionDependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "function_full_name": o.FunctionFullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FunctionDependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "function_full_name": types.StringType, + }, + } +} + +type FunctionInfo_SdkV2 struct { + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this function was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of function creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Scalar function return data type. + DataType types.String `tfsdk:"data_type" tf:"optional"` + // External function language. + ExternalLanguage types.String `tfsdk:"external_language" tf:"optional"` + // External function name. + ExternalName types.String `tfsdk:"external_name" tf:"optional"` + // Pretty printed function data type. + FullDataType types.String `tfsdk:"full_data_type" tf:"optional"` + // Full name of function, in form of + // __catalog_name__.__schema_name__.__function__name__ + FullName types.String `tfsdk:"full_name" tf:"optional"` + // Id of Function, relative to parent schema. + FunctionId types.String `tfsdk:"function_id" tf:"optional"` + + InputParams types.List `tfsdk:"input_params" tf:"optional,object"` + // Whether the function is deterministic. + IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:"optional"` + // Function null call. + IsNullCall types.Bool `tfsdk:"is_null_call" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of function, relative to parent schema. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of current owner of function. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Function parameter style. **S** is the value for SQL. + ParameterStyle types.String `tfsdk:"parameter_style" tf:"optional"` + // JSON-serialized key-value pair map, encoded (escaped) as a string. + Properties types.String `tfsdk:"properties" tf:"optional"` + // Table function return parameters. + ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + // Function language. When **EXTERNAL** is used, the language of the routine + // function should be specified in the __external_language__ field, and the + // __return_params__ of the function cannot be used (as **TABLE** return + // type is not supported), and the __sql_data_access__ field must be + // **NO_SQL**. + RoutineBody types.String `tfsdk:"routine_body" tf:"optional"` + // Function body. + RoutineDefinition types.String `tfsdk:"routine_definition" tf:"optional"` + // Function dependencies. + RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + // Name of parent schema relative to its parent catalog. + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // Function security type. + SecurityType types.String `tfsdk:"security_type" tf:"optional"` + // Specific name of the function; Reserved for future use. + SpecificName types.String `tfsdk:"specific_name" tf:"optional"` + // Function SQL data access. + SqlDataAccess types.String `tfsdk:"sql_data_access" tf:"optional"` + // List of schemes whose objects can be referenced without qualification. + SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + // Time at which this function was created, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified function. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *FunctionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionInfo_SdkV2) { +} + +func (newState *FunctionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FunctionInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "input_params": reflect.TypeOf(FunctionParameterInfos_SdkV2{}), + "return_params": reflect.TypeOf(FunctionParameterInfos_SdkV2{}), + "routine_dependencies": reflect.TypeOf(DependencyList_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, FunctionInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FunctionInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "data_type": o.DataType, + "external_language": o.ExternalLanguage, + "external_name": o.ExternalName, + "full_data_type": o.FullDataType, + "full_name": o.FullName, + "function_id": o.FunctionId, + "input_params": o.InputParams, + "is_deterministic": o.IsDeterministic, + "is_null_call": o.IsNullCall, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "parameter_style": o.ParameterStyle, + "properties": o.Properties, + "return_params": o.ReturnParams, + "routine_body": o.RoutineBody, + "routine_definition": o.RoutineDefinition, + "routine_dependencies": o.RoutineDependencies, + "schema_name": o.SchemaName, + "security_type": o.SecurityType, + "specific_name": o.SpecificName, + "sql_data_access": o.SqlDataAccess, + "sql_path": o.SqlPath, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FunctionInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_type": types.StringType, + "external_language": types.StringType, + "external_name": types.StringType, + "full_data_type": types.StringType, + "full_name": types.StringType, + "function_id": types.StringType, + "input_params": basetypes.ListType{ + ElemType: FunctionParameterInfos{}.Type(ctx), + }, + "is_deterministic": types.BoolType, + "is_null_call": types.BoolType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "parameter_style": types.StringType, + "properties": types.StringType, + "return_params": basetypes.ListType{ + ElemType: FunctionParameterInfos{}.Type(ctx), + }, + "routine_body": types.StringType, + "routine_definition": types.StringType, + "routine_dependencies": basetypes.ListType{ + ElemType: DependencyList{}.Type(ctx), + }, + "schema_name": types.StringType, + "security_type": types.StringType, + "specific_name": types.StringType, + "sql_data_access": types.StringType, + "sql_path": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetInputParams returns the value of the InputParams field in FunctionInfo_SdkV2 as +// a FunctionParameterInfos_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FunctionInfo_SdkV2) GetInputParams(ctx context.Context) (FunctionParameterInfos_SdkV2, bool) { + var e FunctionParameterInfos_SdkV2 + if o.InputParams.IsNull() || o.InputParams.IsUnknown() { + return e, false + } + var v []FunctionParameterInfos_SdkV2 + d := o.InputParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInputParams sets the value of the InputParams field in FunctionInfo_SdkV2. +func (o *FunctionInfo_SdkV2) SetInputParams(ctx context.Context, v FunctionParameterInfos_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input_params"] + o.InputParams = types.ListValueMust(t, vs) +} + +// GetReturnParams returns the value of the ReturnParams field in FunctionInfo_SdkV2 as +// a FunctionParameterInfos_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FunctionInfo_SdkV2) GetReturnParams(ctx context.Context) (FunctionParameterInfos_SdkV2, bool) { + var e FunctionParameterInfos_SdkV2 + if o.ReturnParams.IsNull() || o.ReturnParams.IsUnknown() { + return e, false + } + var v []FunctionParameterInfos_SdkV2 + d := o.ReturnParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetReturnParams sets the value of the ReturnParams field in FunctionInfo_SdkV2. +func (o *FunctionInfo_SdkV2) SetReturnParams(ctx context.Context, v FunctionParameterInfos_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["return_params"] + o.ReturnParams = types.ListValueMust(t, vs) +} + +// GetRoutineDependencies returns the value of the RoutineDependencies field in FunctionInfo_SdkV2 as +// a DependencyList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FunctionInfo_SdkV2) GetRoutineDependencies(ctx context.Context) (DependencyList_SdkV2, bool) { + var e DependencyList_SdkV2 + if o.RoutineDependencies.IsNull() || o.RoutineDependencies.IsUnknown() { + return e, false + } + var v []DependencyList_SdkV2 + d := o.RoutineDependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRoutineDependencies sets the value of the RoutineDependencies field in FunctionInfo_SdkV2. +func (o *FunctionInfo_SdkV2) SetRoutineDependencies(ctx context.Context, v DependencyList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["routine_dependencies"] + o.RoutineDependencies = types.ListValueMust(t, vs) +} + +type FunctionParameterInfo_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of parameter. + Name types.String `tfsdk:"name" tf:""` + // Default value of the parameter. + ParameterDefault types.String `tfsdk:"parameter_default" tf:"optional"` + // The mode of the function parameter. + ParameterMode types.String `tfsdk:"parameter_mode" tf:"optional"` + // The type of function parameter. + ParameterType types.String `tfsdk:"parameter_type" tf:"optional"` + // Ordinal position of column (starting at position 0). + Position types.Int64 `tfsdk:"position" tf:""` + // Format of IntervalType. + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + // Full data type spec, JSON-serialized. + TypeJson types.String `tfsdk:"type_json" tf:"optional"` + + TypeName types.String `tfsdk:"type_name" tf:""` + // Digits of precision; required on Create for DecimalTypes. + TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + // Digits to right of decimal; Required on Create for DecimalTypes. + TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + // Full data type spec, SQL/catalogString text. + TypeText types.String `tfsdk:"type_text" tf:""` +} + +func (newState *FunctionParameterInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionParameterInfo_SdkV2) { +} + +func (newState *FunctionParameterInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FunctionParameterInfo_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, FunctionParameterInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FunctionParameterInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "parameter_default": o.ParameterDefault, + "parameter_mode": o.ParameterMode, + "parameter_type": o.ParameterType, + "position": o.Position, + "type_interval_type": o.TypeIntervalType, + "type_json": o.TypeJson, + "type_name": o.TypeName, + "type_precision": o.TypePrecision, + "type_scale": o.TypeScale, + "type_text": o.TypeText, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FunctionParameterInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "parameter_default": types.StringType, + "parameter_mode": types.StringType, + "parameter_type": types.StringType, + "position": types.Int64Type, + "type_interval_type": types.StringType, + "type_json": types.StringType, + "type_name": types.StringType, + "type_precision": types.Int64Type, + "type_scale": types.Int64Type, + "type_text": types.StringType, + }, + } +} + +type FunctionParameterInfos_SdkV2 struct { + // The array of __FunctionParameterInfo__ definitions of the function's + // parameters. + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *FunctionParameterInfos_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FunctionParameterInfos_SdkV2) { +} + +func (newState *FunctionParameterInfos_SdkV2) SyncEffectiveFieldsDuringRead(existingState FunctionParameterInfos_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FunctionParameterInfos. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FunctionParameterInfos_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(FunctionParameterInfo_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, FunctionParameterInfos_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FunctionParameterInfos_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FunctionParameterInfos_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parameters": basetypes.ListType{ + ElemType: FunctionParameterInfo{}.Type(ctx), + }, + }, + } +} + +// GetParameters returns the value of the Parameters field in FunctionParameterInfos_SdkV2 as +// a slice of FunctionParameterInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *FunctionParameterInfos_SdkV2) GetParameters(ctx context.Context) ([]FunctionParameterInfo_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []FunctionParameterInfo_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in FunctionParameterInfos_SdkV2. +func (o *FunctionParameterInfos_SdkV2) SetParameters(ctx context.Context, v []FunctionParameterInfo_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GCP temporary credentials for API authentication. Read more at +// https://developers.google.com/identity/protocols/oauth2/service-account +type GcpOauthToken_SdkV2 struct { + OauthToken types.String `tfsdk:"oauth_token" tf:"optional"` +} + +func (newState *GcpOauthToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpOauthToken_SdkV2) { +} + +func (newState *GcpOauthToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpOauthToken_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpOauthToken. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpOauthToken_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, GcpOauthToken_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpOauthToken_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "oauth_token": o.OauthToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpOauthToken_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "oauth_token": types.StringType, + }, + } +} + +// The Azure cloud options to customize the requested temporary credential +type GenerateTemporaryServiceCredentialAzureOptions_SdkV2 struct { + // The resources to which the temporary Azure credential should apply. These + // resources are the scopes that are passed to the token provider (see + // https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python) + Resources types.List `tfsdk:"resources" tf:"optional"` +} + +func (newState *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialAzureOptions_SdkV2) { +} + +func (newState *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialAzureOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialAzureOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenerateTemporaryServiceCredentialAzureOptions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "resources": 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, GenerateTemporaryServiceCredentialAzureOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryServiceCredentialAzureOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "resources": o.Resources, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenerateTemporaryServiceCredentialAzureOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "resources": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetResources returns the value of the Resources field in GenerateTemporaryServiceCredentialAzureOptions_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) GetResources(ctx context.Context) ([]types.String, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []types.String + 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 GenerateTemporaryServiceCredentialAzureOptions_SdkV2. +func (o *GenerateTemporaryServiceCredentialAzureOptions_SdkV2) SetResources(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["resources"] + t = t.(attr.TypeWithElementType).ElementType() + o.Resources = types.ListValueMust(t, vs) +} + +// The GCP cloud options to customize the requested temporary credential +type GenerateTemporaryServiceCredentialGcpOptions_SdkV2 struct { + // The scopes to which the temporary GCP credential should apply. These + // resources are the scopes that are passed to the token provider (see + // https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials) + Scopes types.List `tfsdk:"scopes" tf:"optional"` +} + +func (newState *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialGcpOptions_SdkV2) { +} + +func (newState *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialGcpOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialGcpOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenerateTemporaryServiceCredentialGcpOptions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "scopes": 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, GenerateTemporaryServiceCredentialGcpOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryServiceCredentialGcpOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scopes": o.Scopes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenerateTemporaryServiceCredentialGcpOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetScopes returns the value of the Scopes field in GenerateTemporaryServiceCredentialGcpOptions_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in GenerateTemporaryServiceCredentialGcpOptions_SdkV2. +func (o *GenerateTemporaryServiceCredentialGcpOptions_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +type GenerateTemporaryServiceCredentialRequest_SdkV2 struct { + // The Azure cloud options to customize the requested temporary credential + AzureOptions types.List `tfsdk:"azure_options" tf:"optional,object"` + // The name of the service credential used to generate a temporary + // credential + CredentialName types.String `tfsdk:"credential_name" tf:""` + // The GCP cloud options to customize the requested temporary credential + GcpOptions types.List `tfsdk:"gcp_options" tf:"optional,object"` +} + +func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest_SdkV2) { +} + +func (newState *GenerateTemporaryServiceCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryServiceCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryServiceCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenerateTemporaryServiceCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "azure_options": reflect.TypeOf(GenerateTemporaryServiceCredentialAzureOptions_SdkV2{}), + "gcp_options": reflect.TypeOf(GenerateTemporaryServiceCredentialGcpOptions_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, GenerateTemporaryServiceCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryServiceCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "azure_options": o.AzureOptions, + "credential_name": o.CredentialName, + "gcp_options": o.GcpOptions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenerateTemporaryServiceCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "azure_options": basetypes.ListType{ + ElemType: GenerateTemporaryServiceCredentialAzureOptions{}.Type(ctx), + }, + "credential_name": types.StringType, + "gcp_options": basetypes.ListType{ + ElemType: GenerateTemporaryServiceCredentialGcpOptions{}.Type(ctx), + }, + }, + } +} + +// GetAzureOptions returns the value of the AzureOptions field in GenerateTemporaryServiceCredentialRequest_SdkV2 as +// a GenerateTemporaryServiceCredentialAzureOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryServiceCredentialRequest_SdkV2) GetAzureOptions(ctx context.Context) (GenerateTemporaryServiceCredentialAzureOptions_SdkV2, bool) { + var e GenerateTemporaryServiceCredentialAzureOptions_SdkV2 + if o.AzureOptions.IsNull() || o.AzureOptions.IsUnknown() { + return e, false + } + var v []GenerateTemporaryServiceCredentialAzureOptions_SdkV2 + d := o.AzureOptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureOptions sets the value of the AzureOptions field in GenerateTemporaryServiceCredentialRequest_SdkV2. +func (o *GenerateTemporaryServiceCredentialRequest_SdkV2) SetAzureOptions(ctx context.Context, v GenerateTemporaryServiceCredentialAzureOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_options"] + o.AzureOptions = types.ListValueMust(t, vs) +} + +// GetGcpOptions returns the value of the GcpOptions field in GenerateTemporaryServiceCredentialRequest_SdkV2 as +// a GenerateTemporaryServiceCredentialGcpOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryServiceCredentialRequest_SdkV2) GetGcpOptions(ctx context.Context) (GenerateTemporaryServiceCredentialGcpOptions_SdkV2, bool) { + var e GenerateTemporaryServiceCredentialGcpOptions_SdkV2 + if o.GcpOptions.IsNull() || o.GcpOptions.IsUnknown() { + return e, false + } + var v []GenerateTemporaryServiceCredentialGcpOptions_SdkV2 + d := o.GcpOptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpOptions sets the value of the GcpOptions field in GenerateTemporaryServiceCredentialRequest_SdkV2. +func (o *GenerateTemporaryServiceCredentialRequest_SdkV2) SetGcpOptions(ctx context.Context, v GenerateTemporaryServiceCredentialGcpOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_options"] + o.GcpOptions = types.ListValueMust(t, vs) +} + +type GenerateTemporaryTableCredentialRequest_SdkV2 struct { + // The operation performed against the table data, either READ or + // READ_WRITE. If READ_WRITE is specified, the credentials returned will + // have write permissions, otherwise, it will be read only. + Operation types.String `tfsdk:"operation" tf:"optional"` + // UUID of the table to read or write. + TableId types.String `tfsdk:"table_id" tf:"optional"` +} + +func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialRequest_SdkV2) { +} + +func (newState *GenerateTemporaryTableCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenerateTemporaryTableCredentialRequest_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, GenerateTemporaryTableCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryTableCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "operation": o.Operation, + "table_id": o.TableId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenerateTemporaryTableCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "operation": types.StringType, + "table_id": types.StringType, + }, + } +} + +type GenerateTemporaryTableCredentialResponse_SdkV2 struct { + // AWS temporary credentials for API authentication. Read more at + // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. + AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + // Azure Active Directory token, essentially the Oauth token for Azure + // Service Principal or Managed Identity. Read more at + // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token + AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + // Azure temporary credentials for API authentication. Read more at + // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas + AzureUserDelegationSas types.List `tfsdk:"azure_user_delegation_sas" tf:"optional,object"` + // Server time when the credential will expire, in epoch milliseconds. The + // API client is advised to cache the credential given this expiration time. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + // GCP temporary credentials for API authentication. Read more at + // https://developers.google.com/identity/protocols/oauth2/service-account + GcpOauthToken types.List `tfsdk:"gcp_oauth_token" tf:"optional,object"` + // R2 temporary credentials for API authentication. Read more at + // https://developers.cloudflare.com/r2/api/s3/tokens/. + R2TempCredentials types.List `tfsdk:"r2_temp_credentials" tf:"optional,object"` + // The URL of the storage path accessible by the temporary credential. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *GenerateTemporaryTableCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryTableCredentialResponse_SdkV2) { +} + +func (newState *GenerateTemporaryTableCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenerateTemporaryTableCredentialResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenerateTemporaryTableCredentialResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenerateTemporaryTableCredentialResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_temp_credentials": reflect.TypeOf(AwsCredentials_SdkV2{}), + "azure_aad": reflect.TypeOf(AzureActiveDirectoryToken_SdkV2{}), + "azure_user_delegation_sas": reflect.TypeOf(AzureUserDelegationSas_SdkV2{}), + "gcp_oauth_token": reflect.TypeOf(GcpOauthToken_SdkV2{}), + "r2_temp_credentials": reflect.TypeOf(R2Credentials_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, GenerateTemporaryTableCredentialResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryTableCredentialResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_temp_credentials": o.AwsTempCredentials, + "azure_aad": o.AzureAad, + "azure_user_delegation_sas": o.AzureUserDelegationSas, + "expiration_time": o.ExpirationTime, + "gcp_oauth_token": o.GcpOauthToken, + "r2_temp_credentials": o.R2TempCredentials, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenerateTemporaryTableCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_temp_credentials": basetypes.ListType{ + ElemType: AwsCredentials{}.Type(ctx), + }, + "azure_aad": basetypes.ListType{ + ElemType: AzureActiveDirectoryToken{}.Type(ctx), + }, + "azure_user_delegation_sas": basetypes.ListType{ + ElemType: AzureUserDelegationSas{}.Type(ctx), + }, + "expiration_time": types.Int64Type, + "gcp_oauth_token": basetypes.ListType{ + ElemType: GcpOauthToken{}.Type(ctx), + }, + "r2_temp_credentials": basetypes.ListType{ + ElemType: R2Credentials{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetAwsTempCredentials returns the value of the AwsTempCredentials field in GenerateTemporaryTableCredentialResponse_SdkV2 as +// a AwsCredentials_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) GetAwsTempCredentials(ctx context.Context) (AwsCredentials_SdkV2, bool) { + var e AwsCredentials_SdkV2 + if o.AwsTempCredentials.IsNull() || o.AwsTempCredentials.IsUnknown() { + return e, false + } + var v []AwsCredentials_SdkV2 + d := o.AwsTempCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsTempCredentials sets the value of the AwsTempCredentials field in GenerateTemporaryTableCredentialResponse_SdkV2. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) SetAwsTempCredentials(ctx context.Context, v AwsCredentials_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_temp_credentials"] + o.AwsTempCredentials = types.ListValueMust(t, vs) +} + +// GetAzureAad returns the value of the AzureAad field in GenerateTemporaryTableCredentialResponse_SdkV2 as +// a AzureActiveDirectoryToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) GetAzureAad(ctx context.Context) (AzureActiveDirectoryToken_SdkV2, bool) { + var e AzureActiveDirectoryToken_SdkV2 + if o.AzureAad.IsNull() || o.AzureAad.IsUnknown() { + return e, false + } + var v []AzureActiveDirectoryToken_SdkV2 + d := o.AzureAad.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAad sets the value of the AzureAad field in GenerateTemporaryTableCredentialResponse_SdkV2. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) SetAzureAad(ctx context.Context, v AzureActiveDirectoryToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_aad"] + o.AzureAad = types.ListValueMust(t, vs) +} + +// GetAzureUserDelegationSas returns the value of the AzureUserDelegationSas field in GenerateTemporaryTableCredentialResponse_SdkV2 as +// a AzureUserDelegationSas_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) GetAzureUserDelegationSas(ctx context.Context) (AzureUserDelegationSas_SdkV2, bool) { + var e AzureUserDelegationSas_SdkV2 + if o.AzureUserDelegationSas.IsNull() || o.AzureUserDelegationSas.IsUnknown() { + return e, false + } + var v []AzureUserDelegationSas_SdkV2 + d := o.AzureUserDelegationSas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureUserDelegationSas sets the value of the AzureUserDelegationSas field in GenerateTemporaryTableCredentialResponse_SdkV2. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) SetAzureUserDelegationSas(ctx context.Context, v AzureUserDelegationSas_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_user_delegation_sas"] + o.AzureUserDelegationSas = types.ListValueMust(t, vs) +} + +// GetGcpOauthToken returns the value of the GcpOauthToken field in GenerateTemporaryTableCredentialResponse_SdkV2 as +// a GcpOauthToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) GetGcpOauthToken(ctx context.Context) (GcpOauthToken_SdkV2, bool) { + var e GcpOauthToken_SdkV2 + if o.GcpOauthToken.IsNull() || o.GcpOauthToken.IsUnknown() { + return e, false + } + var v []GcpOauthToken_SdkV2 + d := o.GcpOauthToken.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpOauthToken sets the value of the GcpOauthToken field in GenerateTemporaryTableCredentialResponse_SdkV2. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) SetGcpOauthToken(ctx context.Context, v GcpOauthToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_oauth_token"] + o.GcpOauthToken = types.ListValueMust(t, vs) +} + +// GetR2TempCredentials returns the value of the R2TempCredentials field in GenerateTemporaryTableCredentialResponse_SdkV2 as +// a R2Credentials_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) GetR2TempCredentials(ctx context.Context) (R2Credentials_SdkV2, bool) { + var e R2Credentials_SdkV2 + if o.R2TempCredentials.IsNull() || o.R2TempCredentials.IsUnknown() { + return e, false + } + var v []R2Credentials_SdkV2 + d := o.R2TempCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetR2TempCredentials sets the value of the R2TempCredentials field in GenerateTemporaryTableCredentialResponse_SdkV2. +func (o *GenerateTemporaryTableCredentialResponse_SdkV2) SetR2TempCredentials(ctx context.Context, v R2Credentials_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["r2_temp_credentials"] + o.R2TempCredentials = types.ListValueMust(t, vs) +} + +// Gets the metastore assignment for a workspace +type GetAccountMetastoreAssignmentRequest_SdkV2 struct { + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *GetAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreAssignmentRequest_SdkV2) { +} + +func (newState *GetAccountMetastoreAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreAssignmentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreAssignmentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountMetastoreAssignmentRequest_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, GetAccountMetastoreAssignmentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountMetastoreAssignmentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountMetastoreAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_id": types.Int64Type, + }, + } +} + +// Get a metastore +type GetAccountMetastoreRequest_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` +} + +func (newState *GetAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountMetastoreRequest_SdkV2) { +} + +func (newState *GetAccountMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountMetastoreRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountMetastoreRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountMetastoreRequest_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, GetAccountMetastoreRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountMetastoreRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountMetastoreRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + }, + } +} + +// Gets the named storage credential +type GetAccountStorageCredentialRequest_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` + // Name of the storage credential. + StorageCredentialName types.String `tfsdk:"-"` +} + +func (newState *GetAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountStorageCredentialRequest_SdkV2) { +} + +func (newState *GetAccountStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountStorageCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountStorageCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountStorageCredentialRequest_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, GetAccountStorageCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountStorageCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountStorageCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "storage_credential_name": types.StringType, + }, + } +} + +// Get an artifact allowlist +type GetArtifactAllowlistRequest_SdkV2 struct { + // The artifact type of the allowlist. + ArtifactType types.String `tfsdk:"-"` +} + +func (newState *GetArtifactAllowlistRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetArtifactAllowlistRequest_SdkV2) { +} + +func (newState *GetArtifactAllowlistRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetArtifactAllowlistRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetArtifactAllowlistRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetArtifactAllowlistRequest_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, GetArtifactAllowlistRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetArtifactAllowlistRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_type": o.ArtifactType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetArtifactAllowlistRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_type": types.StringType, + }, + } +} + +// Get securable workspace bindings +type GetBindingsRequest_SdkV2 struct { + // Maximum number of workspace bindings to return. - When set to 0, the page + // length is set to a server configured value (recommended); - When set to a + // value greater than 0, the page length is the minimum of this value and a + // server configured value; - When set to a value less than 0, an invalid + // parameter error is returned; - If not set, all the workspace bindings are + // returned (not recommended). + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` + // The name of the securable. + SecurableName types.String `tfsdk:"-"` + // The type of the securable to bind to a workspace. + SecurableType types.String `tfsdk:"-"` +} + +func (newState *GetBindingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetBindingsRequest_SdkV2) { +} + +func (newState *GetBindingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetBindingsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetBindingsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetBindingsRequest_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, GetBindingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetBindingsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetBindingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + "securable_name": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// Get Model Version By Alias +type GetByAliasRequest_SdkV2 struct { + // The name of the alias + Alias types.String `tfsdk:"-"` + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"-"` + // Whether to include aliases associated with the model version in the + // response + IncludeAliases types.Bool `tfsdk:"-"` +} + +func (newState *GetByAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByAliasRequest_SdkV2) { +} + +func (newState *GetByAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetByAliasRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByAliasRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetByAliasRequest_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, GetByAliasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetByAliasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetByAliasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alias": types.StringType, + "full_name": types.StringType, + "include_aliases": types.BoolType, + }, + } +} + +// Get a catalog +type GetCatalogRequest_SdkV2 struct { + // Whether to include catalogs in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // The name of the catalog. + Name types.String `tfsdk:"-"` +} + +func (newState *GetCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCatalogRequest_SdkV2) { +} + +func (newState *GetCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCatalogRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCatalogRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCatalogRequest_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, GetCatalogRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCatalogRequest_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 GetCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "name": types.StringType, + }, + } +} + +// Get a connection +type GetConnectionRequest_SdkV2 struct { + // Name of the connection. + Name types.String `tfsdk:"-"` +} + +func (newState *GetConnectionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetConnectionRequest_SdkV2) { +} + +func (newState *GetConnectionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetConnectionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetConnectionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetConnectionRequest_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, GetConnectionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetConnectionRequest_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 GetConnectionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get a credential +type GetCredentialRequest_SdkV2 struct { + // Name of the credential. + NameArg types.String `tfsdk:"-"` +} + +func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest_SdkV2) { +} + +func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCredentialRequest_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, GetCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name_arg": o.NameArg, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name_arg": types.StringType, + }, + } +} + +// Get effective permissions +type GetEffectiveRequest_SdkV2 struct { + // Full name of securable. + FullName types.String `tfsdk:"-"` + // If provided, only the effective permissions for the specified principal + // (user or group) are returned. + Principal types.String `tfsdk:"-"` + // Type of securable. + SecurableType types.String `tfsdk:"-"` +} + +func (newState *GetEffectiveRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEffectiveRequest_SdkV2) { +} + +func (newState *GetEffectiveRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEffectiveRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEffectiveRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEffectiveRequest_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, GetEffectiveRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEffectiveRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "principal": o.Principal, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEffectiveRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "principal": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// Get an external location +type GetExternalLocationRequest_SdkV2 struct { + // Whether to include external locations in the response for which the + // principal can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Name of the external location. + Name types.String `tfsdk:"-"` +} + +func (newState *GetExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExternalLocationRequest_SdkV2) { +} + +func (newState *GetExternalLocationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExternalLocationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExternalLocationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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, + }, + } +} + +// Get a function +type GetFunctionRequest_SdkV2 struct { + // Whether to include functions in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // The fully-qualified name of the function (of the form + // __catalog_name__.__schema_name__.__function__name__). + Name types.String `tfsdk:"-"` +} + +func (newState *GetFunctionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFunctionRequest_SdkV2) { +} + +func (newState *GetFunctionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFunctionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFunctionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetFunctionRequest_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, GetFunctionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetFunctionRequest_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 GetFunctionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "name": types.StringType, + }, + } +} + +// Get permissions +type GetGrantRequest_SdkV2 struct { + // Full name of securable. + FullName types.String `tfsdk:"-"` + // If provided, only the permissions for the specified principal (user or + // group) are returned. + Principal types.String `tfsdk:"-"` + // Type of securable. + SecurableType types.String `tfsdk:"-"` +} + +func (newState *GetGrantRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGrantRequest_SdkV2) { +} + +func (newState *GetGrantRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGrantRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGrantRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetGrantRequest_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, GetGrantRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetGrantRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "principal": o.Principal, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetGrantRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "principal": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// Get a metastore +type GetMetastoreRequest_SdkV2 struct { + // Unique ID of the metastore. + Id types.String `tfsdk:"-"` +} + +func (newState *GetMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreRequest_SdkV2) { +} + +func (newState *GetMetastoreRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetastoreRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetMetastoreRequest_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, GetMetastoreRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetMetastoreRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetMetastoreRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetMetastoreSummaryResponse_SdkV2 struct { + // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // Time at which this metastore was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of metastore creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Unique identifier of the metastore's (Default) Data Access Configuration. + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + // The organization name of a Delta Sharing entity, to be used in + // Databricks-to-Databricks Delta Sharing as the official name. + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + // The lifetime of delta sharing recipient token in seconds. + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + // The scope of Delta Sharing enabled for the metastore. + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + // Whether to allow non-DBR clients to directly access entities under the + // metastore. + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + // Globally unique metastore ID across clouds and regions, of the form + // `cloud:region:metastore_id`. + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + // Unique identifier of metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The user-specified name of the metastore. + Name types.String `tfsdk:"name" tf:"optional"` + // The owner of the metastore. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Privilege model version of the metastore, of the form `major.minor` + // (e.g., `1.0`). + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). + Region types.String `tfsdk:"region" tf:"optional"` + // The storage root URL for metastore + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // UUID of storage credential to access the metastore storage_root. + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + // Name of the storage credential to access the metastore storage_root. + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + // Time at which the metastore was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the metastore. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *GetMetastoreSummaryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetastoreSummaryResponse_SdkV2) { +} + +func (newState *GetMetastoreSummaryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetastoreSummaryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetastoreSummaryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetMetastoreSummaryResponse_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, GetMetastoreSummaryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetMetastoreSummaryResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cloud": o.Cloud, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "default_data_access_config_id": o.DefaultDataAccessConfigId, + "delta_sharing_organization_name": o.DeltaSharingOrganizationName, + "delta_sharing_recipient_token_lifetime_in_seconds": o.DeltaSharingRecipientTokenLifetimeInSeconds, + "delta_sharing_scope": o.DeltaSharingScope, + "external_access_enabled": o.ExternalAccessEnabled, + "global_metastore_id": o.GlobalMetastoreId, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "privilege_model_version": o.PrivilegeModelVersion, + "region": o.Region, + "storage_root": o.StorageRoot, + "storage_root_credential_id": o.StorageRootCredentialId, + "storage_root_credential_name": o.StorageRootCredentialName, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetMetastoreSummaryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cloud": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "default_data_access_config_id": types.StringType, + "delta_sharing_organization_name": types.StringType, + "delta_sharing_recipient_token_lifetime_in_seconds": types.Int64Type, + "delta_sharing_scope": types.StringType, + "external_access_enabled": types.BoolType, + "global_metastore_id": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "privilege_model_version": types.StringType, + "region": types.StringType, + "storage_root": types.StringType, + "storage_root_credential_id": types.StringType, + "storage_root_credential_name": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// Get a Model Version +type GetModelVersionRequest_SdkV2 struct { + // The three-level (fully qualified) name of the model version + FullName types.String `tfsdk:"-"` + // Whether to include aliases associated with the model version in the + // response + IncludeAliases types.Bool `tfsdk:"-"` + // Whether to include model versions in the response for which the principal + // can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // The integer version number of the model version + Version types.Int64 `tfsdk:"-"` +} + +func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest_SdkV2) { +} + +func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelVersionRequest_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, GetModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + "include_browse": o.IncludeBrowse, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "include_aliases": types.BoolType, + "include_browse": types.BoolType, + "version": types.Int64Type, + }, + } +} + +// Get an Online Table +type GetOnlineTableRequest_SdkV2 struct { + // Full three-part (catalog, schema, table) name of the table. + Name types.String `tfsdk:"-"` +} + +func (newState *GetOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOnlineTableRequest_SdkV2) { +} + +func (newState *GetOnlineTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOnlineTableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOnlineTableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetOnlineTableRequest_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, GetOnlineTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetOnlineTableRequest_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 GetOnlineTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get a table monitor +type GetQualityMonitorRequest_SdkV2 struct { + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *GetQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQualityMonitorRequest_SdkV2) { +} + +func (newState *GetQualityMonitorRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQualityMonitorRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQualityMonitorRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetQualityMonitorRequest_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, GetQualityMonitorRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetQualityMonitorRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetQualityMonitorRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + }, + } +} + +// Get information for a single resource quota. +type GetQuotaRequest_SdkV2 struct { + // Full name of the parent resource. Provide the metastore ID if the parent + // is a metastore. + ParentFullName types.String `tfsdk:"-"` + // Securable type of the quota parent. + ParentSecurableType types.String `tfsdk:"-"` + // Name of the quota. Follows the pattern of the quota type, with "-quota" + // added as a suffix. + QuotaName types.String `tfsdk:"-"` +} + +func (newState *GetQuotaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaRequest_SdkV2) { +} + +func (newState *GetQuotaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQuotaRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetQuotaRequest_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, GetQuotaRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetQuotaRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parent_full_name": o.ParentFullName, + "parent_securable_type": o.ParentSecurableType, + "quota_name": o.QuotaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetQuotaRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parent_full_name": types.StringType, + "parent_securable_type": types.StringType, + "quota_name": types.StringType, + }, + } +} + +type GetQuotaResponse_SdkV2 struct { + // The returned QuotaInfo. + QuotaInfo types.List `tfsdk:"quota_info" tf:"optional,object"` +} + +func (newState *GetQuotaResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaResponse_SdkV2) { +} + +func (newState *GetQuotaResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQuotaResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQuotaResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetQuotaResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "quota_info": reflect.TypeOf(QuotaInfo_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, GetQuotaResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetQuotaResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "quota_info": o.QuotaInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetQuotaResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "quota_info": basetypes.ListType{ + ElemType: QuotaInfo{}.Type(ctx), + }, + }, + } +} + +// GetQuotaInfo returns the value of the QuotaInfo field in GetQuotaResponse_SdkV2 as +// a QuotaInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetQuotaResponse_SdkV2) GetQuotaInfo(ctx context.Context) (QuotaInfo_SdkV2, bool) { + var e QuotaInfo_SdkV2 + if o.QuotaInfo.IsNull() || o.QuotaInfo.IsUnknown() { + return e, false + } + var v []QuotaInfo_SdkV2 + d := o.QuotaInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuotaInfo sets the value of the QuotaInfo field in GetQuotaResponse_SdkV2. +func (o *GetQuotaResponse_SdkV2) SetQuotaInfo(ctx context.Context, v QuotaInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["quota_info"] + o.QuotaInfo = types.ListValueMust(t, vs) +} + +// Get refresh +type GetRefreshRequest_SdkV2 struct { + // ID of the refresh. + RefreshId types.String `tfsdk:"-"` + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *GetRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRefreshRequest_SdkV2) { +} + +func (newState *GetRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRefreshRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRefreshRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRefreshRequest_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, GetRefreshRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRefreshRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "refresh_id": o.RefreshId, + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRefreshRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "refresh_id": types.StringType, + "table_name": types.StringType, + }, + } +} + +// Get a Registered Model +type GetRegisteredModelRequest_SdkV2 struct { + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"-"` + // Whether to include registered model aliases in the response + IncludeAliases types.Bool `tfsdk:"-"` + // Whether to include registered models in the response for which the + // principal can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` +} + +func (newState *GetRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelRequest_SdkV2) { +} + +func (newState *GetRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRegisteredModelRequest_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, GetRegisteredModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + "include_browse": o.IncludeBrowse, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "include_aliases": types.BoolType, + "include_browse": types.BoolType, + }, + } +} + +// Get a schema +type GetSchemaRequest_SdkV2 struct { + // Full name of the schema. + FullName types.String `tfsdk:"-"` + // Whether to include schemas in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` +} + +func (newState *GetSchemaRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSchemaRequest_SdkV2) { +} + +func (newState *GetSchemaRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSchemaRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSchemaRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetSchemaRequest_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, GetSchemaRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetSchemaRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "include_browse": o.IncludeBrowse, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetSchemaRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "include_browse": types.BoolType, + }, + } +} + +// Get a credential +type GetStorageCredentialRequest_SdkV2 struct { + // Name of the storage credential. + Name types.String `tfsdk:"-"` +} + +func (newState *GetStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageCredentialRequest_SdkV2) { +} + +func (newState *GetStorageCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStorageCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStorageCredentialRequest_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, GetStorageCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStorageCredentialRequest_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 GetStorageCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get a table +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 + 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. + IncludeManifestCapabilities types.Bool `tfsdk:"-"` +} + +func (newState *GetTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTableRequest_SdkV2) { +} + +func (newState *GetTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTableRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTableRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetTableRequest_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, GetTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "include_browse": o.IncludeBrowse, + "include_delta_metadata": o.IncludeDeltaMetadata, + "include_manifest_capabilities": o.IncludeManifestCapabilities, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "include_browse": types.BoolType, + "include_delta_metadata": types.BoolType, + "include_manifest_capabilities": types.BoolType, + }, + } +} + +// Get catalog workspace bindings +type GetWorkspaceBindingRequest_SdkV2 struct { + // The name of the catalog. + Name types.String `tfsdk:"-"` +} + +func (newState *GetWorkspaceBindingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceBindingRequest_SdkV2) { +} + +func (newState *GetWorkspaceBindingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceBindingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceBindingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceBindingRequest_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, GetWorkspaceBindingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceBindingRequest_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 GetWorkspaceBindingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get all workspaces assigned to a metastore +type ListAccountMetastoreAssignmentsRequest_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` +} + +func (newState *ListAccountMetastoreAssignmentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsRequest_SdkV2) { +} + +func (newState *ListAccountMetastoreAssignmentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountMetastoreAssignmentsRequest_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, ListAccountMetastoreAssignmentsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoreAssignmentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountMetastoreAssignmentsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + }, + } +} + +// The list of workspaces to which the given metastore is assigned. +type ListAccountMetastoreAssignmentsResponse_SdkV2 struct { + WorkspaceIds types.List `tfsdk:"workspace_ids" tf:"optional"` +} + +func (newState *ListAccountMetastoreAssignmentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountMetastoreAssignmentsResponse_SdkV2) { +} + +func (newState *ListAccountMetastoreAssignmentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountMetastoreAssignmentsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountMetastoreAssignmentsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountMetastoreAssignmentsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "workspace_ids": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListAccountMetastoreAssignmentsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoreAssignmentsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_ids": o.WorkspaceIds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountMetastoreAssignmentsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_ids": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetWorkspaceIds returns the value of the WorkspaceIds field in ListAccountMetastoreAssignmentsResponse_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAccountMetastoreAssignmentsResponse_SdkV2) GetWorkspaceIds(ctx context.Context) ([]types.Int64, bool) { + if o.WorkspaceIds.IsNull() || o.WorkspaceIds.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.WorkspaceIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWorkspaceIds sets the value of the WorkspaceIds field in ListAccountMetastoreAssignmentsResponse_SdkV2. +func (o *ListAccountMetastoreAssignmentsResponse_SdkV2) SetWorkspaceIds(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.WorkspaceIds = types.ListValueMust(t, vs) +} + +// Get all storage credentials assigned to a metastore +type ListAccountStorageCredentialsRequest_SdkV2 struct { + // Unity Catalog metastore ID + MetastoreId types.String `tfsdk:"-"` +} + +func (newState *ListAccountStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsRequest_SdkV2) { +} + +func (newState *ListAccountStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountStorageCredentialsRequest_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, ListAccountStorageCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountStorageCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountStorageCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + }, + } +} + +type ListAccountStorageCredentialsResponse_SdkV2 struct { + // An array of metastore storage credentials. + StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` +} + +func (newState *ListAccountStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountStorageCredentialsResponse_SdkV2) { +} + +func (newState *ListAccountStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountStorageCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountStorageCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountStorageCredentialsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "storage_credentials": reflect.TypeOf(StorageCredentialInfo_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, ListAccountStorageCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountStorageCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "storage_credentials": o.StorageCredentials, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountStorageCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "storage_credentials": basetypes.ListType{ + ElemType: StorageCredentialInfo{}.Type(ctx), + }, + }, + } +} + +// GetStorageCredentials returns the value of the StorageCredentials field in ListAccountStorageCredentialsResponse_SdkV2 as +// a slice of StorageCredentialInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAccountStorageCredentialsResponse_SdkV2) GetStorageCredentials(ctx context.Context) ([]StorageCredentialInfo_SdkV2, bool) { + if o.StorageCredentials.IsNull() || o.StorageCredentials.IsUnknown() { + return nil, false + } + var v []StorageCredentialInfo_SdkV2 + d := o.StorageCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStorageCredentials sets the value of the StorageCredentials field in ListAccountStorageCredentialsResponse_SdkV2. +func (o *ListAccountStorageCredentialsResponse_SdkV2) SetStorageCredentials(ctx context.Context, v []StorageCredentialInfo_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["storage_credentials"] + t = t.(attr.TypeWithElementType).ElementType() + o.StorageCredentials = types.ListValueMust(t, vs) +} + +// List catalogs +type ListCatalogsRequest_SdkV2 struct { + // Whether to include catalogs in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of catalogs to return. - when set to 0, the page length is + // set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid catalogs are returned (not + // recommended). - Note: The number of returned catalogs might be less than + // the specified max_results size, even zero. The only definitive indication + // that no further catalogs can be fetched is when the next_page_token is + // unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCatalogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsRequest_SdkV2) { +} + +func (newState *ListCatalogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCatalogsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCatalogsRequest_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, ListCatalogsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCatalogsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + 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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCatalogsRequest_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 ListCatalogsResponse_SdkV2 struct { + // An array of catalog information objects. + Catalogs types.List `tfsdk:"catalogs" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListCatalogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCatalogsResponse_SdkV2) { +} + +func (newState *ListCatalogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCatalogsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCatalogsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCatalogsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "catalogs": reflect.TypeOf(CatalogInfo_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, ListCatalogsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCatalogsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalogs": o.Catalogs, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCatalogsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalogs": basetypes.ListType{ + ElemType: CatalogInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetCatalogs returns the value of the Catalogs field in ListCatalogsResponse_SdkV2 as +// a slice of CatalogInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCatalogsResponse_SdkV2) GetCatalogs(ctx context.Context) ([]CatalogInfo_SdkV2, bool) { + if o.Catalogs.IsNull() || o.Catalogs.IsUnknown() { + return nil, false + } + var v []CatalogInfo_SdkV2 + d := o.Catalogs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCatalogs sets the value of the Catalogs field in ListCatalogsResponse_SdkV2. +func (o *ListCatalogsResponse_SdkV2) SetCatalogs(ctx context.Context, v []CatalogInfo_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["catalogs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Catalogs = types.ListValueMust(t, vs) +} + +// List connections +type ListConnectionsRequest_SdkV2 struct { + // Maximum number of connections to return. - If not set, all connections + // are returned (not recommended). - when set to a value greater than 0, the + // page length is the minimum of this value and a server configured value; - + // when set to 0, the page length is set to a server configured value + // (recommended); - when set to a value less than 0, an invalid parameter + // error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListConnectionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsRequest_SdkV2) { +} + +func (newState *ListConnectionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListConnectionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListConnectionsRequest_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, ListConnectionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListConnectionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListConnectionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListConnectionsResponse_SdkV2 struct { + // An array of connection information objects. + Connections types.List `tfsdk:"connections" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListConnectionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListConnectionsResponse_SdkV2) { +} + +func (newState *ListConnectionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListConnectionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListConnectionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListConnectionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "connections": reflect.TypeOf(ConnectionInfo_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, ListConnectionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListConnectionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connections": o.Connections, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListConnectionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connections": basetypes.ListType{ + ElemType: ConnectionInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetConnections returns the value of the Connections field in ListConnectionsResponse_SdkV2 as +// a slice of ConnectionInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListConnectionsResponse_SdkV2) GetConnections(ctx context.Context) ([]ConnectionInfo_SdkV2, bool) { + if o.Connections.IsNull() || o.Connections.IsUnknown() { + return nil, false + } + var v []ConnectionInfo_SdkV2 + d := o.Connections.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConnections sets the value of the Connections field in ListConnectionsResponse_SdkV2. +func (o *ListConnectionsResponse_SdkV2) SetConnections(ctx context.Context, v []ConnectionInfo_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["connections"] + t = t.(attr.TypeWithElementType).ElementType() + o.Connections = types.ListValueMust(t, vs) +} + +// List credentials +type ListCredentialsRequest_SdkV2 struct { + // Maximum number of credentials to return. - If not set, the default max + // page size is used. - When set to a value greater than 0, the page length + // is the minimum of this value and a server-configured value. - When set to + // 0, the page length is set to a server-configured value (recommended). - + // When set to a value less than 0, an invalid parameter error is returned. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque token to retrieve the next page of results. + PageToken types.String `tfsdk:"-"` + // Return only credentials for the specified purpose. + Purpose types.String `tfsdk:"-"` +} + +func (newState *ListCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsRequest_SdkV2) { +} + +func (newState *ListCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "purpose": o.Purpose, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + "purpose": types.StringType, + }, + } +} + +type ListCredentialsResponse_SdkV2 struct { + Credentials types.List `tfsdk:"credentials" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse_SdkV2) { +} + +func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCredentialsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "credentials": reflect.TypeOf(CredentialInfo_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, ListCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credentials": o.Credentials, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credentials": basetypes.ListType{ + ElemType: CredentialInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetCredentials returns the value of the Credentials field in ListCredentialsResponse_SdkV2 as +// a slice of CredentialInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCredentialsResponse_SdkV2) GetCredentials(ctx context.Context) ([]CredentialInfo_SdkV2, bool) { + if o.Credentials.IsNull() || o.Credentials.IsUnknown() { + return nil, false + } + var v []CredentialInfo_SdkV2 + d := o.Credentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCredentials sets the value of the Credentials field in ListCredentialsResponse_SdkV2. +func (o *ListCredentialsResponse_SdkV2) SetCredentials(ctx context.Context, v []CredentialInfo_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["credentials"] + t = t.(attr.TypeWithElementType).ElementType() + o.Credentials = types.ListValueMust(t, vs) +} + +// List external locations +type ListExternalLocationsRequest_SdkV2 struct { + // Whether to include external locations in the response for which the + // principal can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of external locations to return. If not set, all the + // external locations are returned (not recommended). - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to 0, the page length is set to a server + // configured value (recommended); - when set to a value less than 0, an + // invalid parameter error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListExternalLocationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsRequest_SdkV2) { +} + +func (newState *ListExternalLocationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExternalLocationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExternalLocationsRequest_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, ListExternalLocationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExternalLocationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + 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, + }) +} + +// Type implements basetypes.ObjectValuable. +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" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExternalLocationsResponse_SdkV2) { +} + +func (newState *ListExternalLocationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExternalLocationsResponse_SdkV2) { +} + +// 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{}.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) +} + +// List functions +type ListFunctionsRequest_SdkV2 struct { + // Name of parent catalog for functions of interest. + CatalogName types.String `tfsdk:"-"` + // Whether to include functions in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of functions to return. If not set, all the functions are + // returned (not recommended). - when set to a value greater than 0, the + // page length is the minimum of this value and a server configured value; - + // when set to 0, the page length is set to a server configured value + // (recommended); - when set to a value less than 0, an invalid parameter + // error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` + // Parent schema of functions. + SchemaName types.String `tfsdk:"-"` +} + +func (newState *ListFunctionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsRequest_SdkV2) { +} + +func (newState *ListFunctionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFunctionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFunctionsRequest_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, ListFunctionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFunctionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFunctionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type ListFunctionsResponse_SdkV2 struct { + // An array of function information objects. + Functions types.List `tfsdk:"functions" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListFunctionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFunctionsResponse_SdkV2) { +} + +func (newState *ListFunctionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFunctionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFunctionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFunctionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "functions": reflect.TypeOf(FunctionInfo_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, ListFunctionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFunctionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "functions": o.Functions, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFunctionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "functions": basetypes.ListType{ + ElemType: FunctionInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetFunctions returns the value of the Functions field in ListFunctionsResponse_SdkV2 as +// a slice of FunctionInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListFunctionsResponse_SdkV2) GetFunctions(ctx context.Context) ([]FunctionInfo_SdkV2, bool) { + if o.Functions.IsNull() || o.Functions.IsUnknown() { + return nil, false + } + var v []FunctionInfo_SdkV2 + d := o.Functions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFunctions sets the value of the Functions field in ListFunctionsResponse_SdkV2. +func (o *ListFunctionsResponse_SdkV2) SetFunctions(ctx context.Context, v []FunctionInfo_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["functions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Functions = types.ListValueMust(t, vs) +} + +type ListMetastoresResponse_SdkV2 struct { + // An array of metastore information objects. + Metastores types.List `tfsdk:"metastores" tf:"optional"` +} + +func (newState *ListMetastoresResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListMetastoresResponse_SdkV2) { +} + +func (newState *ListMetastoresResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListMetastoresResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListMetastoresResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListMetastoresResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metastores": reflect.TypeOf(MetastoreInfo_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, ListMetastoresResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListMetastoresResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastores": o.Metastores, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListMetastoresResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastores": basetypes.ListType{ + ElemType: MetastoreInfo{}.Type(ctx), + }, + }, + } +} + +// GetMetastores returns the value of the Metastores field in ListMetastoresResponse_SdkV2 as +// a slice of MetastoreInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListMetastoresResponse_SdkV2) GetMetastores(ctx context.Context) ([]MetastoreInfo_SdkV2, bool) { + if o.Metastores.IsNull() || o.Metastores.IsUnknown() { + return nil, false + } + var v []MetastoreInfo_SdkV2 + d := o.Metastores.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMetastores sets the value of the Metastores field in ListMetastoresResponse_SdkV2. +func (o *ListMetastoresResponse_SdkV2) SetMetastores(ctx context.Context, v []MetastoreInfo_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["metastores"] + t = t.(attr.TypeWithElementType).ElementType() + o.Metastores = types.ListValueMust(t, vs) +} + +// List Model Versions +type ListModelVersionsRequest_SdkV2 struct { + // The full three-level name of the registered model under which to list + // model versions + FullName types.String `tfsdk:"-"` + // Whether to include model versions in the response for which the principal + // can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of model versions to return. If not set, the page length + // is set to a server configured value (100, as of 1/3/2024). - when set to + // a value greater than 0, the page length is the minimum of this value and + // a server configured value(1000, as of 1/3/2024); - when set to 0, the + // page length is set to a server configured value (100, as of 1/3/2024) + // (recommended); - when set to a value less than 0, an invalid parameter + // error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsRequest_SdkV2) { +} + +func (newState *ListModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListModelVersionsRequest_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, ListModelVersionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListModelVersionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListModelVersionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListModelVersionsResponse_SdkV2 struct { + ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelVersionsResponse_SdkV2) { +} + +func (newState *ListModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelVersionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelVersionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListModelVersionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "model_versions": reflect.TypeOf(ModelVersionInfo_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, ListModelVersionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListModelVersionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_versions": o.ModelVersions, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListModelVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_versions": basetypes.ListType{ + ElemType: ModelVersionInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetModelVersions returns the value of the ModelVersions field in ListModelVersionsResponse_SdkV2 as +// a slice of ModelVersionInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListModelVersionsResponse_SdkV2) GetModelVersions(ctx context.Context) ([]ModelVersionInfo_SdkV2, bool) { + if o.ModelVersions.IsNull() || o.ModelVersions.IsUnknown() { + return nil, false + } + var v []ModelVersionInfo_SdkV2 + d := o.ModelVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetModelVersions sets the value of the ModelVersions field in ListModelVersionsResponse_SdkV2. +func (o *ListModelVersionsResponse_SdkV2) SetModelVersions(ctx context.Context, v []ModelVersionInfo_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["model_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.ModelVersions = types.ListValueMust(t, vs) +} + +// List all resource quotas under a metastore. +type ListQuotasRequest_SdkV2 struct { + // The number of quotas to return. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque token for the next page of results. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListQuotasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasRequest_SdkV2) { +} + +func (newState *ListQuotasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQuotasRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQuotasRequest_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, ListQuotasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQuotasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQuotasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListQuotasResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of returned QuotaInfos. + Quotas types.List `tfsdk:"quotas" tf:"optional"` +} + +func (newState *ListQuotasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQuotasResponse_SdkV2) { +} + +func (newState *ListQuotasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQuotasResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQuotasResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQuotasResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "quotas": reflect.TypeOf(QuotaInfo_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, ListQuotasResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQuotasResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "quotas": o.Quotas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQuotasResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "quotas": basetypes.ListType{ + ElemType: QuotaInfo{}.Type(ctx), + }, + }, + } +} + +// GetQuotas returns the value of the Quotas field in ListQuotasResponse_SdkV2 as +// a slice of QuotaInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQuotasResponse_SdkV2) GetQuotas(ctx context.Context) ([]QuotaInfo_SdkV2, bool) { + if o.Quotas.IsNull() || o.Quotas.IsUnknown() { + return nil, false + } + var v []QuotaInfo_SdkV2 + d := o.Quotas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetQuotas sets the value of the Quotas field in ListQuotasResponse_SdkV2. +func (o *ListQuotasResponse_SdkV2) SetQuotas(ctx context.Context, v []QuotaInfo_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["quotas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Quotas = types.ListValueMust(t, vs) +} + +// List refreshes +type ListRefreshesRequest_SdkV2 struct { + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *ListRefreshesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRefreshesRequest_SdkV2) { +} + +func (newState *ListRefreshesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRefreshesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRefreshesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRefreshesRequest_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, ListRefreshesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRefreshesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRefreshesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + }, + } +} + +// List Registered Models +type ListRegisteredModelsRequest_SdkV2 struct { + // The identifier of the catalog under which to list registered models. If + // specified, schema_name must be specified. + CatalogName types.String `tfsdk:"-"` + // Whether to include registered models in the response for which the + // principal can only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Max number of registered models to return. + // + // If both catalog and schema are specified: - when max_results is not + // specified, the page length is set to a server configured value (10000, as + // of 4/2/2024). - when set to a value greater than 0, the page length is + // the minimum of this value and a server configured value (10000, as of + // 4/2/2024); - when set to 0, the page length is set to a server configured + // value (10000, as of 4/2/2024); - when set to a value less than 0, an + // invalid parameter error is returned; + // + // If neither schema nor catalog is specified: - when max_results is not + // specified, the page length is set to a server configured value (100, as + // of 4/2/2024). - when set to a value greater than 0, the page length is + // the minimum of this value and a server configured value (1000, as of + // 4/2/2024); - when set to 0, the page length is set to a server configured + // value (100, as of 4/2/2024); - when set to a value less than 0, an + // invalid parameter error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque token to send for the next page of results (pagination). + PageToken types.String `tfsdk:"-"` + // The identifier of the schema under which to list registered models. If + // specified, catalog_name must be specified. + SchemaName types.String `tfsdk:"-"` +} + +func (newState *ListRegisteredModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsRequest_SdkV2) { +} + +func (newState *ListRegisteredModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRegisteredModelsRequest_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, ListRegisteredModelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRegisteredModelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRegisteredModelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type ListRegisteredModelsResponse_SdkV2 struct { + // Opaque token for pagination. Omitted if there are no more results. + // page_token should be set to this value for fetching the next page. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` +} + +func (newState *ListRegisteredModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegisteredModelsResponse_SdkV2) { +} + +func (newState *ListRegisteredModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegisteredModelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegisteredModelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRegisteredModelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "registered_models": reflect.TypeOf(RegisteredModelInfo_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, ListRegisteredModelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRegisteredModelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRegisteredModelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "registered_models": basetypes.ListType{ + ElemType: RegisteredModelInfo{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModels returns the value of the RegisteredModels field in ListRegisteredModelsResponse_SdkV2 as +// a slice of RegisteredModelInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListRegisteredModelsResponse_SdkV2) GetRegisteredModels(ctx context.Context) ([]RegisteredModelInfo_SdkV2, bool) { + if o.RegisteredModels.IsNull() || o.RegisteredModels.IsUnknown() { + return nil, false + } + var v []RegisteredModelInfo_SdkV2 + d := o.RegisteredModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRegisteredModels sets the value of the RegisteredModels field in ListRegisteredModelsResponse_SdkV2. +func (o *ListRegisteredModelsResponse_SdkV2) SetRegisteredModels(ctx context.Context, v []RegisteredModelInfo_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["registered_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.RegisteredModels = types.ListValueMust(t, vs) +} + +// List schemas +type ListSchemasRequest_SdkV2 struct { + // Parent catalog for schemas of interest. + CatalogName types.String `tfsdk:"-"` + // Whether to include schemas in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of schemas to return. If not set, all the schemas are + // returned (not recommended). - when set to a value greater than 0, the + // page length is the minimum of this value and a server configured value; - + // when set to 0, the page length is set to a server configured value + // (recommended); - when set to a value less than 0, an invalid parameter + // error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListSchemasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasRequest_SdkV2) { +} + +func (newState *ListSchemasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchemasRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSchemasRequest_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, ListSchemasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSchemasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSchemasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListSchemasResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of schema information objects. + Schemas types.List `tfsdk:"schemas" tf:"optional"` +} + +func (newState *ListSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchemasResponse_SdkV2) { +} + +func (newState *ListSchemasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchemasResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchemasResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSchemasResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "schemas": reflect.TypeOf(SchemaInfo_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, ListSchemasResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSchemasResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schemas": o.Schemas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSchemasResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "schemas": basetypes.ListType{ + ElemType: SchemaInfo{}.Type(ctx), + }, + }, + } +} + +// GetSchemas returns the value of the Schemas field in ListSchemasResponse_SdkV2 as +// a slice of SchemaInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSchemasResponse_SdkV2) GetSchemas(ctx context.Context) ([]SchemaInfo_SdkV2, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []SchemaInfo_SdkV2 + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ListSchemasResponse_SdkV2. +func (o *ListSchemasResponse_SdkV2) SetSchemas(ctx context.Context, v []SchemaInfo_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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +// List credentials +type ListStorageCredentialsRequest_SdkV2 struct { + // Maximum number of storage credentials to return. If not set, all the + // storage credentials are returned (not recommended). - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to 0, the page length is set to a server + // configured value (recommended); - when set to a value less than 0, an + // invalid parameter error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsRequest_SdkV2) { +} + +func (newState *ListStorageCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListStorageCredentialsRequest_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, ListStorageCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListStorageCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListStorageCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListStorageCredentialsResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + StorageCredentials types.List `tfsdk:"storage_credentials" tf:"optional"` +} + +func (newState *ListStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStorageCredentialsResponse_SdkV2) { +} + +func (newState *ListStorageCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStorageCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStorageCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListStorageCredentialsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "storage_credentials": reflect.TypeOf(StorageCredentialInfo_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, ListStorageCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListStorageCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "storage_credentials": o.StorageCredentials, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListStorageCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "storage_credentials": basetypes.ListType{ + ElemType: StorageCredentialInfo{}.Type(ctx), + }, + }, + } +} + +// GetStorageCredentials returns the value of the StorageCredentials field in ListStorageCredentialsResponse_SdkV2 as +// a slice of StorageCredentialInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListStorageCredentialsResponse_SdkV2) GetStorageCredentials(ctx context.Context) ([]StorageCredentialInfo_SdkV2, bool) { + if o.StorageCredentials.IsNull() || o.StorageCredentials.IsUnknown() { + return nil, false + } + var v []StorageCredentialInfo_SdkV2 + d := o.StorageCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStorageCredentials sets the value of the StorageCredentials field in ListStorageCredentialsResponse_SdkV2. +func (o *ListStorageCredentialsResponse_SdkV2) SetStorageCredentials(ctx context.Context, v []StorageCredentialInfo_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["storage_credentials"] + t = t.(attr.TypeWithElementType).ElementType() + o.StorageCredentials = types.ListValueMust(t, vs) +} + +// List table summaries +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. + 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). - + // when set to a value greater than 0, the page length is the minimum of + // this value and a server configured value (10000, as of 1/5/2024); - when + // set to 0, the page length is set to a server configured value (10000, as + // of 1/5/2024) (recommended); - when set to a value less than 0, an invalid + // parameter error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` + // A sql LIKE pattern (% and _) for schema names. All schemas will be + // returned if not set or empty. + SchemaNamePattern types.String `tfsdk:"-"` + // A sql LIKE pattern (% and _) for table names. All tables will be returned + // if not set or empty. + TableNamePattern types.String `tfsdk:"-"` +} + +func (newState *ListSummariesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSummariesRequest_SdkV2) { +} + +func (newState *ListSummariesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSummariesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSummariesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSummariesRequest_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, ListSummariesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSummariesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_manifest_capabilities": o.IncludeManifestCapabilities, + "max_results": o.MaxResults, + "page_token": o.PageToken, + "schema_name_pattern": o.SchemaNamePattern, + "table_name_pattern": o.TableNamePattern, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSummariesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "include_manifest_capabilities": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + "schema_name_pattern": types.StringType, + "table_name_pattern": types.StringType, + }, + } +} + +// List system schemas +type ListSystemSchemasRequest_SdkV2 struct { + // Maximum number of schemas to return. - When set to 0, the page length is + // set to a server configured value (recommended); - When set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - When set to a value less than 0, an invalid parameter + // error is returned; - If not set, all the schemas are returned (not + // recommended). + MaxResults types.Int64 `tfsdk:"-"` + // The ID for the metastore in which the system schema resides. + MetastoreId types.String `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListSystemSchemasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasRequest_SdkV2) { +} + +func (newState *ListSystemSchemasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSystemSchemasRequest_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, ListSystemSchemasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSystemSchemasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "metastore_id": o.MetastoreId, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSystemSchemasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "metastore_id": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ListSystemSchemasResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of system schema information objects. + Schemas types.List `tfsdk:"schemas" tf:"optional"` +} + +func (newState *ListSystemSchemasResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSystemSchemasResponse_SdkV2) { +} + +func (newState *ListSystemSchemasResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSystemSchemasResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSystemSchemasResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSystemSchemasResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "schemas": reflect.TypeOf(SystemSchemaInfo_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, ListSystemSchemasResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSystemSchemasResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schemas": o.Schemas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSystemSchemasResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "schemas": basetypes.ListType{ + ElemType: SystemSchemaInfo{}.Type(ctx), + }, + }, + } +} + +// GetSchemas returns the value of the Schemas field in ListSystemSchemasResponse_SdkV2 as +// a slice of SystemSchemaInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSystemSchemasResponse_SdkV2) GetSchemas(ctx context.Context) ([]SystemSchemaInfo_SdkV2, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []SystemSchemaInfo_SdkV2 + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ListSystemSchemasResponse_SdkV2. +func (o *ListSystemSchemasResponse_SdkV2) SetSchemas(ctx context.Context, v []SystemSchemaInfo_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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +type ListTableSummariesResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // List of table summaries. + Tables types.List `tfsdk:"tables" tf:"optional"` +} + +func (newState *ListTableSummariesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTableSummariesResponse_SdkV2) { +} + +func (newState *ListTableSummariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTableSummariesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTableSummariesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTableSummariesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tables": reflect.TypeOf(TableSummary_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, ListTableSummariesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTableSummariesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "tables": o.Tables, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTableSummariesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "tables": basetypes.ListType{ + ElemType: TableSummary{}.Type(ctx), + }, + }, + } +} + +// GetTables returns the value of the Tables field in ListTableSummariesResponse_SdkV2 as +// a slice of TableSummary_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListTableSummariesResponse_SdkV2) GetTables(ctx context.Context) ([]TableSummary_SdkV2, bool) { + if o.Tables.IsNull() || o.Tables.IsUnknown() { + return nil, false + } + var v []TableSummary_SdkV2 + d := o.Tables.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTables sets the value of the Tables field in ListTableSummariesResponse_SdkV2. +func (o *ListTableSummariesResponse_SdkV2) SetTables(ctx context.Context, v []TableSummary_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["tables"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tables = types.ListValueMust(t, vs) +} + +// List tables +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 + 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. + 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 + // page length is the minimum of this value and a server configured value; - + // when set to 0, the page length is set to a server configured value + // (recommended); - when set to a value less than 0, an invalid parameter + // error is returned; + MaxResults types.Int64 `tfsdk:"-"` + // Whether to omit the columns of the table from the response or not. + OmitColumns types.Bool `tfsdk:"-"` + // Whether to omit the properties of the table from the response or not. + OmitProperties types.Bool `tfsdk:"-"` + // Whether to omit the username of the table (e.g. owner, updated_by, + // created_by) from the response or not. + OmitUsername types.Bool `tfsdk:"-"` + // Opaque token to send for the next page of results (pagination). + PageToken types.String `tfsdk:"-"` + // Parent schema of tables. + SchemaName types.String `tfsdk:"-"` +} + +func (newState *ListTablesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesRequest_SdkV2) { +} + +func (newState *ListTablesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTablesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTablesRequest_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, ListTablesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTablesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + 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, + "omit_properties": o.OmitProperties, + "omit_username": o.OmitUsername, + "page_token": o.PageToken, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTablesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + 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, + "omit_properties": types.BoolType, + "omit_username": types.BoolType, + "page_token": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type ListTablesResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of table information objects. + Tables types.List `tfsdk:"tables" tf:"optional"` +} + +func (newState *ListTablesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTablesResponse_SdkV2) { +} + +func (newState *ListTablesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTablesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTablesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTablesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tables": reflect.TypeOf(TableInfo_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, ListTablesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTablesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "tables": o.Tables, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTablesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "tables": basetypes.ListType{ + ElemType: TableInfo{}.Type(ctx), + }, + }, + } +} + +// GetTables returns the value of the Tables field in ListTablesResponse_SdkV2 as +// a slice of TableInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListTablesResponse_SdkV2) GetTables(ctx context.Context) ([]TableInfo_SdkV2, bool) { + if o.Tables.IsNull() || o.Tables.IsUnknown() { + return nil, false + } + var v []TableInfo_SdkV2 + d := o.Tables.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTables sets the value of the Tables field in ListTablesResponse_SdkV2. +func (o *ListTablesResponse_SdkV2) SetTables(ctx context.Context, v []TableInfo_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["tables"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tables = types.ListValueMust(t, vs) +} + +// List Volumes +type ListVolumesRequest_SdkV2 struct { + // The identifier of the catalog + CatalogName types.String `tfsdk:"-"` + // Whether to include volumes in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // Maximum number of volumes to return (page length). + // + // If not set, the page length is set to a server configured value (10000, + // as of 1/29/2024). - when set to a value greater than 0, the page length + // is the minimum of this value and a server configured value (10000, as of + // 1/29/2024); - when set to 0, the page length is set to a server + // configured value (10000, as of 1/29/2024) (recommended); - when set to a + // value less than 0, an invalid parameter error is returned; + // + // Note: this parameter controls only the maximum number of volumes to + // return. The actual number of volumes returned in a page may be smaller + // than this value, including 0, even if there are more pages. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque token returned by a previous request. It must be included in the + // request to retrieve the next page of results (pagination). + PageToken types.String `tfsdk:"-"` + // The identifier of the schema + SchemaName types.String `tfsdk:"-"` +} + +func (newState *ListVolumesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesRequest_SdkV2) { +} + +func (newState *ListVolumesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVolumesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListVolumesRequest_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, ListVolumesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVolumesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + "schema_name": o.SchemaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVolumesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "include_browse": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + "schema_name": types.StringType, + }, + } +} + +type ListVolumesResponseContent_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request to retrieve the next page of results. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Volumes types.List `tfsdk:"volumes" tf:"optional"` +} + +func (newState *ListVolumesResponseContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVolumesResponseContent_SdkV2) { +} + +func (newState *ListVolumesResponseContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVolumesResponseContent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVolumesResponseContent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListVolumesResponseContent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "volumes": reflect.TypeOf(VolumeInfo_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, ListVolumesResponseContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVolumesResponseContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "volumes": o.Volumes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVolumesResponseContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "volumes": basetypes.ListType{ + ElemType: VolumeInfo{}.Type(ctx), + }, + }, + } +} + +// GetVolumes returns the value of the Volumes field in ListVolumesResponseContent_SdkV2 as +// a slice of VolumeInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListVolumesResponseContent_SdkV2) GetVolumes(ctx context.Context) ([]VolumeInfo_SdkV2, bool) { + if o.Volumes.IsNull() || o.Volumes.IsUnknown() { + return nil, false + } + var v []VolumeInfo_SdkV2 + d := o.Volumes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetVolumes sets the value of the Volumes field in ListVolumesResponseContent_SdkV2. +func (o *ListVolumesResponseContent_SdkV2) SetVolumes(ctx context.Context, v []VolumeInfo_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["volumes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Volumes = types.ListValueMust(t, vs) +} + +type MetastoreAssignment_SdkV2 struct { + // The name of the default catalog in the metastore. + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + // The unique ID of the metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:""` + // The unique ID of the Databricks workspace. + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` +} + +func (newState *MetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MetastoreAssignment_SdkV2) { +} + +func (newState *MetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState MetastoreAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MetastoreAssignment_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, MetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default_catalog_name": types.StringType, + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type MetastoreInfo_SdkV2 struct { + // Cloud vendor of the metastore home shard (e.g., `aws`, `azure`, `gcp`). + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // Time at which this metastore was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of metastore creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Unique identifier of the metastore's (Default) Data Access Configuration. + DefaultDataAccessConfigId types.String `tfsdk:"default_data_access_config_id" tf:"optional"` + // The organization name of a Delta Sharing entity, to be used in + // Databricks-to-Databricks Delta Sharing as the official name. + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + // The lifetime of delta sharing recipient token in seconds. + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + // The scope of Delta Sharing enabled for the metastore. + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + // Whether to allow non-DBR clients to directly access entities under the + // metastore. + ExternalAccessEnabled types.Bool `tfsdk:"external_access_enabled" tf:"optional"` + // Globally unique metastore ID across clouds and regions, of the form + // `cloud:region:metastore_id`. + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + // Unique identifier of metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The user-specified name of the metastore. + Name types.String `tfsdk:"name" tf:"optional"` + // The owner of the metastore. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Privilege model version of the metastore, of the form `major.minor` + // (e.g., `1.0`). + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + // Cloud region which the metastore serves (e.g., `us-west-2`, `westus`). + Region types.String `tfsdk:"region" tf:"optional"` + // The storage root URL for metastore + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // UUID of storage credential to access the metastore storage_root. + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` + // Name of the storage credential to access the metastore storage_root. + StorageRootCredentialName types.String `tfsdk:"storage_root_credential_name" tf:"optional"` + // Time at which the metastore was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the metastore. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *MetastoreInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MetastoreInfo_SdkV2) { +} + +func (newState *MetastoreInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MetastoreInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MetastoreInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MetastoreInfo_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, MetastoreInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MetastoreInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cloud": o.Cloud, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "default_data_access_config_id": o.DefaultDataAccessConfigId, + "delta_sharing_organization_name": o.DeltaSharingOrganizationName, + "delta_sharing_recipient_token_lifetime_in_seconds": o.DeltaSharingRecipientTokenLifetimeInSeconds, + "delta_sharing_scope": o.DeltaSharingScope, + "external_access_enabled": o.ExternalAccessEnabled, + "global_metastore_id": o.GlobalMetastoreId, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "privilege_model_version": o.PrivilegeModelVersion, + "region": o.Region, + "storage_root": o.StorageRoot, + "storage_root_credential_id": o.StorageRootCredentialId, + "storage_root_credential_name": o.StorageRootCredentialName, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MetastoreInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cloud": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "default_data_access_config_id": types.StringType, + "delta_sharing_organization_name": types.StringType, + "delta_sharing_recipient_token_lifetime_in_seconds": types.Int64Type, + "delta_sharing_scope": types.StringType, + "external_access_enabled": types.BoolType, + "global_metastore_id": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "privilege_model_version": types.StringType, + "region": types.StringType, + "storage_root": types.StringType, + "storage_root_credential_id": types.StringType, + "storage_root_credential_name": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +type ModelVersionInfo_SdkV2 struct { + // List of aliases associated with the model version + Aliases types.List `tfsdk:"aliases" tf:"optional"` + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // The name of the catalog containing the model version + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // The comment attached to the model version + Comment types.String `tfsdk:"comment" tf:"optional"` + + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The identifier of the user who created the model version + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The unique identifier of the model version + Id types.String `tfsdk:"id" tf:"optional"` + // The unique identifier of the metastore containing the model version + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The name of the parent registered model of the model version, relative to + // parent schema + ModelName types.String `tfsdk:"model_name" tf:"optional"` + // Model version dependencies, for feature-store packaged models + ModelVersionDependencies types.List `tfsdk:"model_version_dependencies" tf:"optional,object"` + // MLflow run ID used when creating the model version, if ``source`` was + // generated by an experiment run stored in an MLflow tracking server + RunId types.String `tfsdk:"run_id" tf:"optional"` + // ID of the Databricks workspace containing the MLflow run that generated + // this model version, if applicable + RunWorkspaceId types.Int64 `tfsdk:"run_workspace_id" tf:"optional"` + // The name of the schema containing the model version, relative to parent + // catalog + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // URI indicating the location of the source artifacts (files) for the model + // version + Source types.String `tfsdk:"source" tf:"optional"` + // Current status of the model version. Newly created model versions start + // in PENDING_REGISTRATION status, then move to READY status once the model + // version files are uploaded and the model version is finalized. Only model + // versions in READY status can be loaded for inference or served. + Status types.String `tfsdk:"status" tf:"optional"` + // The storage location on the cloud under which model version data files + // are stored + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // The identifier of the user who updated the model version last time + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // Integer model version number, used to reference the model version in API + // requests. + Version types.Int64 `tfsdk:"version" tf:"optional"` +} + +func (newState *ModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionInfo_SdkV2) { +} + +func (newState *ModelVersionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelVersionInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aliases": reflect.TypeOf(RegisteredModelAlias_SdkV2{}), + "model_version_dependencies": reflect.TypeOf(DependencyList_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, ModelVersionInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelVersionInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aliases": o.Aliases, + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "id": o.Id, + "metastore_id": o.MetastoreId, + "model_name": o.ModelName, + "model_version_dependencies": o.ModelVersionDependencies, + "run_id": o.RunId, + "run_workspace_id": o.RunWorkspaceId, + "schema_name": o.SchemaName, + "source": o.Source, + "status": o.Status, + "storage_location": o.StorageLocation, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ModelVersionInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aliases": basetypes.ListType{ + ElemType: RegisteredModelAlias{}.Type(ctx), + }, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "id": types.StringType, + "metastore_id": types.StringType, + "model_name": types.StringType, + "model_version_dependencies": basetypes.ListType{ + ElemType: DependencyList{}.Type(ctx), + }, + "run_id": types.StringType, + "run_workspace_id": types.Int64Type, + "schema_name": types.StringType, + "source": types.StringType, + "status": types.StringType, + "storage_location": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "version": types.Int64Type, + }, + } +} + +// GetAliases returns the value of the Aliases field in ModelVersionInfo_SdkV2 as +// a slice of RegisteredModelAlias_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionInfo_SdkV2) GetAliases(ctx context.Context) ([]RegisteredModelAlias_SdkV2, bool) { + if o.Aliases.IsNull() || o.Aliases.IsUnknown() { + return nil, false + } + var v []RegisteredModelAlias_SdkV2 + d := o.Aliases.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAliases sets the value of the Aliases field in ModelVersionInfo_SdkV2. +func (o *ModelVersionInfo_SdkV2) SetAliases(ctx context.Context, v []RegisteredModelAlias_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["aliases"] + t = t.(attr.TypeWithElementType).ElementType() + o.Aliases = types.ListValueMust(t, vs) +} + +// GetModelVersionDependencies returns the value of the ModelVersionDependencies field in ModelVersionInfo_SdkV2 as +// a DependencyList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersionInfo_SdkV2) GetModelVersionDependencies(ctx context.Context) (DependencyList_SdkV2, bool) { + var e DependencyList_SdkV2 + if o.ModelVersionDependencies.IsNull() || o.ModelVersionDependencies.IsUnknown() { + return e, false + } + var v []DependencyList_SdkV2 + d := o.ModelVersionDependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetModelVersionDependencies sets the value of the ModelVersionDependencies field in ModelVersionInfo_SdkV2. +func (o *ModelVersionInfo_SdkV2) SetModelVersionDependencies(ctx context.Context, v DependencyList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version_dependencies"] + o.ModelVersionDependencies = types.ListValueMust(t, vs) +} + +type MonitorCronSchedule_SdkV2 struct { + // Read only field that indicates whether a schedule is paused or not. + PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + // The expression that determines when to run the monitor. See [examples]. + // + // [examples]: https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html + QuartzCronExpression types.String `tfsdk:"quartz_cron_expression" tf:""` + // The timezone id (e.g., ``"PST"``) in which to evaluate the quartz + // expression. + TimezoneId types.String `tfsdk:"timezone_id" tf:""` +} + +func (newState *MonitorCronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorCronSchedule_SdkV2) { +} + +func (newState *MonitorCronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorCronSchedule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorCronSchedule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorCronSchedule_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, MonitorCronSchedule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorCronSchedule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pause_status": o.PauseStatus, + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorCronSchedule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pause_status": types.StringType, + "quartz_cron_expression": types.StringType, + "timezone_id": types.StringType, + }, + } +} + +type MonitorDataClassificationConfig_SdkV2 struct { + // Whether data classification is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` +} + +func (newState *MonitorDataClassificationConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDataClassificationConfig_SdkV2) { +} + +func (newState *MonitorDataClassificationConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorDataClassificationConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDataClassificationConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorDataClassificationConfig_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, MonitorDataClassificationConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorDataClassificationConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorDataClassificationConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + }, + } +} + +type MonitorDestination_SdkV2 struct { + // The list of email addresses to send the notification to. A maximum of 5 + // email addresses is supported. + EmailAddresses types.List `tfsdk:"email_addresses" tf:"optional"` +} + +func (newState *MonitorDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorDestination_SdkV2) { +} + +func (newState *MonitorDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorDestination_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorDestination. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorDestination_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "email_addresses": 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, MonitorDestination_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorDestination_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "email_addresses": o.EmailAddresses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorDestination_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "email_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetEmailAddresses returns the value of the EmailAddresses field in MonitorDestination_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorDestination_SdkV2) GetEmailAddresses(ctx context.Context) ([]types.String, bool) { + if o.EmailAddresses.IsNull() || o.EmailAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.EmailAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmailAddresses sets the value of the EmailAddresses field in MonitorDestination_SdkV2. +func (o *MonitorDestination_SdkV2) SetEmailAddresses(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["email_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmailAddresses = types.ListValueMust(t, vs) +} + +type MonitorInferenceLog_SdkV2 struct { + // Granularities for aggregating data into time windows based on their + // timestamp. Currently the following static granularities are supported: + // {``"5 minutes"``, ``"30 minutes"``, ``"1 hour"``, ``"1 day"``, ``" + // week(s)"``, ``"1 month"``, ``"1 year"``}. + Granularities types.List `tfsdk:"granularities" tf:""` + // Optional column that contains the ground truth for the prediction. + LabelCol types.String `tfsdk:"label_col" tf:"optional"` + // Column that contains the id of the model generating the predictions. + // Metrics will be computed per model id by default, and also across all + // model ids. + ModelIdCol types.String `tfsdk:"model_id_col" tf:""` + // Column that contains the output/prediction from the model. + PredictionCol types.String `tfsdk:"prediction_col" tf:""` + // Optional column that contains the prediction probabilities for each class + // in a classification problem type. The values in this column should be a + // map, mapping each class label to the prediction probability for a given + // sample. The map should be of PySpark MapType(). + PredictionProbaCol types.String `tfsdk:"prediction_proba_col" tf:"optional"` + // Problem type the model aims to solve. Determines the type of + // model-quality metrics that will be computed. + ProblemType types.String `tfsdk:"problem_type" tf:""` + // Column that contains the timestamps of requests. The column must be one + // of the following: - A ``TimestampType`` column - A column whose values + // can be converted to timestamps through the pyspark ``to_timestamp`` + // [function]. + // + // [function]: https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.to_timestamp.html + TimestampCol types.String `tfsdk:"timestamp_col" tf:""` +} + +func (newState *MonitorInferenceLog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorInferenceLog_SdkV2) { +} + +func (newState *MonitorInferenceLog_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorInferenceLog_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInferenceLog. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorInferenceLog_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "granularities": 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, MonitorInferenceLog_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorInferenceLog_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "granularities": o.Granularities, + "label_col": o.LabelCol, + "model_id_col": o.ModelIdCol, + "prediction_col": o.PredictionCol, + "prediction_proba_col": o.PredictionProbaCol, + "problem_type": o.ProblemType, + "timestamp_col": o.TimestampCol, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorInferenceLog_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "granularities": basetypes.ListType{ + ElemType: types.StringType, + }, + "label_col": types.StringType, + "model_id_col": types.StringType, + "prediction_col": types.StringType, + "prediction_proba_col": types.StringType, + "problem_type": types.StringType, + "timestamp_col": types.StringType, + }, + } +} + +// GetGranularities returns the value of the Granularities field in MonitorInferenceLog_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInferenceLog_SdkV2) GetGranularities(ctx context.Context) ([]types.String, bool) { + if o.Granularities.IsNull() || o.Granularities.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Granularities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGranularities sets the value of the Granularities field in MonitorInferenceLog_SdkV2. +func (o *MonitorInferenceLog_SdkV2) SetGranularities(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["granularities"] + t = t.(attr.TypeWithElementType).ElementType() + o.Granularities = types.ListValueMust(t, vs) +} + +type MonitorInfo_SdkV2 struct { + // The directory to store monitoring assets (e.g. dashboard, metric tables). + AssetsDir types.String `tfsdk:"assets_dir" tf:"optional"` + // Name of the baseline table from which drift metrics are computed from. + // Columns in the monitored table should also be present in the baseline + // table. + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + // Custom metrics to compute on the monitored table. These can be aggregate + // metrics, derived metrics (from already computed aggregate metrics), or + // drift metrics (comparing metrics across time windows). + CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + // Id of dashboard that visualizes the computed metrics. This can be empty + // if the monitor is in PENDING state. + DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + // The data classification config for the monitor. + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + // The full name of the drift metrics table. Format: + // __catalog_name__.__schema_name__.__table_name__. + DriftMetricsTableName types.String `tfsdk:"drift_metrics_table_name" tf:""` + // Configuration for monitoring inference logs. + InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + // The latest failure message of the monitor (if any). + LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:"optional"` + // The version of the monitor config (e.g. 1,2,3). If negative, the monitor + // may be corrupted. + MonitorVersion types.String `tfsdk:"monitor_version" tf:""` + // The notification settings for the monitor. + Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + // Schema where output metric tables are created. + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + // The full name of the profile metrics table. Format: + // __catalog_name__.__schema_name__.__table_name__. + ProfileMetricsTableName types.String `tfsdk:"profile_metrics_table_name" tf:""` + // The schedule for automatically updating and refreshing metric tables. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // List of column expressions to slice data with for targeted analysis. The + // data is grouped by each expression independently, resulting in a separate + // slice for each predicate and its complements. For high-cardinality + // columns, only the top 100 unique values by frequency will generate + // slices. + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + // Configuration for monitoring snapshot tables. + Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + // The status of the monitor. + Status types.String `tfsdk:"status" tf:""` + // The full name of the table to monitor. Format: + // __catalog_name__.__schema_name__.__table_name__. + TableName types.String `tfsdk:"table_name" tf:""` + // Configuration for monitoring time series tables. + TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` +} + +func (newState *MonitorInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorInfo_SdkV2) { +} + +func (newState *MonitorInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_metrics": reflect.TypeOf(MonitorMetric_SdkV2{}), + "data_classification_config": reflect.TypeOf(MonitorDataClassificationConfig_SdkV2{}), + "inference_log": reflect.TypeOf(MonitorInferenceLog_SdkV2{}), + "notifications": reflect.TypeOf(MonitorNotifications_SdkV2{}), + "schedule": reflect.TypeOf(MonitorCronSchedule_SdkV2{}), + "slicing_exprs": reflect.TypeOf(types.String{}), + "snapshot": reflect.TypeOf(MonitorSnapshot_SdkV2{}), + "time_series": reflect.TypeOf(MonitorTimeSeries_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, MonitorInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets_dir": o.AssetsDir, + "baseline_table_name": o.BaselineTableName, + "custom_metrics": o.CustomMetrics, + "dashboard_id": o.DashboardId, + "data_classification_config": o.DataClassificationConfig, + "drift_metrics_table_name": o.DriftMetricsTableName, + "inference_log": o.InferenceLog, + "latest_monitor_failure_msg": o.LatestMonitorFailureMsg, + "monitor_version": o.MonitorVersion, + "notifications": o.Notifications, + "output_schema_name": o.OutputSchemaName, + "profile_metrics_table_name": o.ProfileMetricsTableName, + "schedule": o.Schedule, + "slicing_exprs": o.SlicingExprs, + "snapshot": o.Snapshot, + "status": o.Status, + "table_name": o.TableName, + "time_series": o.TimeSeries, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets_dir": types.StringType, + "baseline_table_name": types.StringType, + "custom_metrics": basetypes.ListType{ + ElemType: MonitorMetric{}.Type(ctx), + }, + "dashboard_id": types.StringType, + "data_classification_config": basetypes.ListType{ + ElemType: MonitorDataClassificationConfig{}.Type(ctx), + }, + "drift_metrics_table_name": types.StringType, + "inference_log": basetypes.ListType{ + ElemType: MonitorInferenceLog{}.Type(ctx), + }, + "latest_monitor_failure_msg": types.StringType, + "monitor_version": types.StringType, + "notifications": basetypes.ListType{ + ElemType: MonitorNotifications{}.Type(ctx), + }, + "output_schema_name": types.StringType, + "profile_metrics_table_name": types.StringType, + "schedule": basetypes.ListType{ + ElemType: MonitorCronSchedule{}.Type(ctx), + }, + "slicing_exprs": basetypes.ListType{ + ElemType: types.StringType, + }, + "snapshot": basetypes.ListType{ + ElemType: MonitorSnapshot{}.Type(ctx), + }, + "status": types.StringType, + "table_name": types.StringType, + "time_series": basetypes.ListType{ + ElemType: MonitorTimeSeries{}.Type(ctx), + }, + }, + } +} + +// GetCustomMetrics returns the value of the CustomMetrics field in MonitorInfo_SdkV2 as +// a slice of MonitorMetric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetCustomMetrics(ctx context.Context) ([]MonitorMetric_SdkV2, bool) { + if o.CustomMetrics.IsNull() || o.CustomMetrics.IsUnknown() { + return nil, false + } + var v []MonitorMetric_SdkV2 + d := o.CustomMetrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomMetrics sets the value of the CustomMetrics field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetCustomMetrics(ctx context.Context, v []MonitorMetric_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["custom_metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomMetrics = types.ListValueMust(t, vs) +} + +// GetDataClassificationConfig returns the value of the DataClassificationConfig field in MonitorInfo_SdkV2 as +// a MonitorDataClassificationConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetDataClassificationConfig(ctx context.Context) (MonitorDataClassificationConfig_SdkV2, bool) { + var e MonitorDataClassificationConfig_SdkV2 + if o.DataClassificationConfig.IsNull() || o.DataClassificationConfig.IsUnknown() { + return e, false + } + var v []MonitorDataClassificationConfig_SdkV2 + d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataClassificationConfig sets the value of the DataClassificationConfig field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] + o.DataClassificationConfig = types.ListValueMust(t, vs) +} + +// GetInferenceLog returns the value of the InferenceLog field in MonitorInfo_SdkV2 as +// a MonitorInferenceLog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetInferenceLog(ctx context.Context) (MonitorInferenceLog_SdkV2, bool) { + var e MonitorInferenceLog_SdkV2 + if o.InferenceLog.IsNull() || o.InferenceLog.IsUnknown() { + return e, false + } + var v []MonitorInferenceLog_SdkV2 + d := o.InferenceLog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceLog sets the value of the InferenceLog field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetInferenceLog(ctx context.Context, v MonitorInferenceLog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] + o.InferenceLog = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in MonitorInfo_SdkV2 as +// a MonitorNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetNotifications(ctx context.Context) (MonitorNotifications_SdkV2, bool) { + var e MonitorNotifications_SdkV2 + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return e, false + } + var v []MonitorNotifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotifications sets the value of the Notifications field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetNotifications(ctx context.Context, v MonitorNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] + o.Notifications = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in MonitorInfo_SdkV2 as +// a MonitorCronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetSchedule(ctx context.Context) (MonitorCronSchedule_SdkV2, bool) { + var e MonitorCronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []MonitorCronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetSchedule(ctx context.Context, v MonitorCronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetSlicingExprs returns the value of the SlicingExprs field in MonitorInfo_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetSlicingExprs(ctx context.Context) ([]types.String, bool) { + if o.SlicingExprs.IsNull() || o.SlicingExprs.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SlicingExprs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSlicingExprs sets the value of the SlicingExprs field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetSlicingExprs(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["slicing_exprs"] + t = t.(attr.TypeWithElementType).ElementType() + o.SlicingExprs = types.ListValueMust(t, vs) +} + +// GetSnapshot returns the value of the Snapshot field in MonitorInfo_SdkV2 as +// a MonitorSnapshot_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetSnapshot(ctx context.Context) (MonitorSnapshot_SdkV2, bool) { + var e MonitorSnapshot_SdkV2 + if o.Snapshot.IsNull() || o.Snapshot.IsUnknown() { + return e, false + } + var v []MonitorSnapshot_SdkV2 + d := o.Snapshot.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSnapshot sets the value of the Snapshot field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetSnapshot(ctx context.Context, v MonitorSnapshot_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] + o.Snapshot = types.ListValueMust(t, vs) +} + +// GetTimeSeries returns the value of the TimeSeries field in MonitorInfo_SdkV2 as +// a MonitorTimeSeries_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorInfo_SdkV2) GetTimeSeries(ctx context.Context) (MonitorTimeSeries_SdkV2, bool) { + var e MonitorTimeSeries_SdkV2 + if o.TimeSeries.IsNull() || o.TimeSeries.IsUnknown() { + return e, false + } + var v []MonitorTimeSeries_SdkV2 + d := o.TimeSeries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTimeSeries sets the value of the TimeSeries field in MonitorInfo_SdkV2. +func (o *MonitorInfo_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSeries_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] + o.TimeSeries = types.ListValueMust(t, vs) +} + +type MonitorMetric_SdkV2 struct { + // Jinja template for a SQL expression that specifies how to compute the + // metric. See [create metric definition]. + // + // [create metric definition]: https://docs.databricks.com/en/lakehouse-monitoring/custom-metrics.html#create-definition + Definition types.String `tfsdk:"definition" tf:""` + // A list of column names in the input table the metric should be computed + // for. Can use ``":table"`` to indicate that the metric needs information + // from multiple columns. + InputColumns types.List `tfsdk:"input_columns" tf:""` + // Name of the metric in the output tables. + Name types.String `tfsdk:"name" tf:""` + // The output type of the custom metric. + OutputDataType types.String `tfsdk:"output_data_type" tf:""` + // Can only be one of ``"CUSTOM_METRIC_TYPE_AGGREGATE"``, + // ``"CUSTOM_METRIC_TYPE_DERIVED"``, or ``"CUSTOM_METRIC_TYPE_DRIFT"``. The + // ``"CUSTOM_METRIC_TYPE_AGGREGATE"`` and ``"CUSTOM_METRIC_TYPE_DERIVED"`` + // metrics are computed on a single table, whereas the + // ``"CUSTOM_METRIC_TYPE_DRIFT"`` compare metrics across baseline and input + // table, or across the two consecutive time windows. - + // CUSTOM_METRIC_TYPE_AGGREGATE: only depend on the existing columns in your + // table - CUSTOM_METRIC_TYPE_DERIVED: depend on previously computed + // aggregate metrics - CUSTOM_METRIC_TYPE_DRIFT: depend on previously + // computed aggregate or derived metrics + Type_ types.String `tfsdk:"type" tf:""` +} + +func (newState *MonitorMetric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorMetric_SdkV2) { +} + +func (newState *MonitorMetric_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorMetric_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorMetric. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorMetric_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "input_columns": 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, MonitorMetric_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorMetric_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "definition": o.Definition, + "input_columns": o.InputColumns, + "name": o.Name, + "output_data_type": o.OutputDataType, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorMetric_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "definition": types.StringType, + "input_columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "name": types.StringType, + "output_data_type": types.StringType, + "type": types.StringType, + }, + } +} + +// GetInputColumns returns the value of the InputColumns field in MonitorMetric_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorMetric_SdkV2) GetInputColumns(ctx context.Context) ([]types.String, bool) { + if o.InputColumns.IsNull() || o.InputColumns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InputColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInputColumns sets the value of the InputColumns field in MonitorMetric_SdkV2. +func (o *MonitorMetric_SdkV2) SetInputColumns(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["input_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.InputColumns = types.ListValueMust(t, vs) +} + +type MonitorNotifications_SdkV2 struct { + // Who to send notifications to on monitor failure. + OnFailure types.List `tfsdk:"on_failure" tf:"optional,object"` + // Who to send notifications to when new data classification tags are + // detected. + OnNewClassificationTagDetected types.List `tfsdk:"on_new_classification_tag_detected" tf:"optional,object"` +} + +func (newState *MonitorNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorNotifications_SdkV2) { +} + +func (newState *MonitorNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorNotifications_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorNotifications. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorNotifications_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "on_failure": reflect.TypeOf(MonitorDestination_SdkV2{}), + "on_new_classification_tag_detected": reflect.TypeOf(MonitorDestination_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, MonitorNotifications_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorNotifications_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "on_failure": o.OnFailure, + "on_new_classification_tag_detected": o.OnNewClassificationTagDetected, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorNotifications_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "on_failure": basetypes.ListType{ + ElemType: MonitorDestination{}.Type(ctx), + }, + "on_new_classification_tag_detected": basetypes.ListType{ + ElemType: MonitorDestination{}.Type(ctx), + }, + }, + } +} + +// GetOnFailure returns the value of the OnFailure field in MonitorNotifications_SdkV2 as +// a MonitorDestination_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorNotifications_SdkV2) GetOnFailure(ctx context.Context) (MonitorDestination_SdkV2, bool) { + var e MonitorDestination_SdkV2 + if o.OnFailure.IsNull() || o.OnFailure.IsUnknown() { + return e, false + } + var v []MonitorDestination_SdkV2 + d := o.OnFailure.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOnFailure sets the value of the OnFailure field in MonitorNotifications_SdkV2. +func (o *MonitorNotifications_SdkV2) SetOnFailure(ctx context.Context, v MonitorDestination_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["on_failure"] + o.OnFailure = types.ListValueMust(t, vs) +} + +// GetOnNewClassificationTagDetected returns the value of the OnNewClassificationTagDetected field in MonitorNotifications_SdkV2 as +// a MonitorDestination_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorNotifications_SdkV2) GetOnNewClassificationTagDetected(ctx context.Context) (MonitorDestination_SdkV2, bool) { + var e MonitorDestination_SdkV2 + if o.OnNewClassificationTagDetected.IsNull() || o.OnNewClassificationTagDetected.IsUnknown() { + return e, false + } + var v []MonitorDestination_SdkV2 + d := o.OnNewClassificationTagDetected.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOnNewClassificationTagDetected sets the value of the OnNewClassificationTagDetected field in MonitorNotifications_SdkV2. +func (o *MonitorNotifications_SdkV2) SetOnNewClassificationTagDetected(ctx context.Context, v MonitorDestination_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["on_new_classification_tag_detected"] + o.OnNewClassificationTagDetected = types.ListValueMust(t, vs) +} + +type MonitorRefreshInfo_SdkV2 struct { + // Time at which refresh operation completed (milliseconds since 1/1/1970 + // UTC). + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + // An optional message to give insight into the current state of the job + // (e.g. FAILURE messages). + Message types.String `tfsdk:"message" tf:"optional"` + // Unique id of the refresh operation. + RefreshId types.Int64 `tfsdk:"refresh_id" tf:""` + // Time at which refresh operation was initiated (milliseconds since + // 1/1/1970 UTC). + StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:""` + // The current state of the refresh. + State types.String `tfsdk:"state" tf:""` + // The method by which the refresh was triggered. + Trigger types.String `tfsdk:"trigger" tf:"optional"` +} + +func (newState *MonitorRefreshInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshInfo_SdkV2) { +} + +func (newState *MonitorRefreshInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorRefreshInfo_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, MonitorRefreshInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorRefreshInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_time_ms": o.EndTimeMs, + "message": o.Message, + "refresh_id": o.RefreshId, + "start_time_ms": o.StartTimeMs, + "state": o.State, + "trigger": o.Trigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorRefreshInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_time_ms": types.Int64Type, + "message": types.StringType, + "refresh_id": types.Int64Type, + "start_time_ms": types.Int64Type, + "state": types.StringType, + "trigger": types.StringType, + }, + } +} + +type MonitorRefreshListResponse_SdkV2 struct { + // List of refreshes. + Refreshes types.List `tfsdk:"refreshes" tf:"optional"` +} + +func (newState *MonitorRefreshListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorRefreshListResponse_SdkV2) { +} + +func (newState *MonitorRefreshListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorRefreshListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorRefreshListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorRefreshListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "refreshes": reflect.TypeOf(MonitorRefreshInfo_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, MonitorRefreshListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorRefreshListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "refreshes": o.Refreshes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorRefreshListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "refreshes": basetypes.ListType{ + ElemType: MonitorRefreshInfo{}.Type(ctx), + }, + }, + } +} + +// GetRefreshes returns the value of the Refreshes field in MonitorRefreshListResponse_SdkV2 as +// a slice of MonitorRefreshInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorRefreshListResponse_SdkV2) GetRefreshes(ctx context.Context) ([]MonitorRefreshInfo_SdkV2, bool) { + if o.Refreshes.IsNull() || o.Refreshes.IsUnknown() { + return nil, false + } + var v []MonitorRefreshInfo_SdkV2 + d := o.Refreshes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRefreshes sets the value of the Refreshes field in MonitorRefreshListResponse_SdkV2. +func (o *MonitorRefreshListResponse_SdkV2) SetRefreshes(ctx context.Context, v []MonitorRefreshInfo_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["refreshes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Refreshes = types.ListValueMust(t, vs) +} + +type MonitorSnapshot_SdkV2 struct { +} + +func (newState *MonitorSnapshot_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorSnapshot_SdkV2) { +} + +func (newState *MonitorSnapshot_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorSnapshot_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorSnapshot. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorSnapshot_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, MonitorSnapshot_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorSnapshot_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 MonitorSnapshot_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type MonitorTimeSeries_SdkV2 struct { + // Granularities for aggregating data into time windows based on their + // timestamp. Currently the following static granularities are supported: + // {``"5 minutes"``, ``"30 minutes"``, ``"1 hour"``, ``"1 day"``, ``" + // week(s)"``, ``"1 month"``, ``"1 year"``}. + Granularities types.List `tfsdk:"granularities" tf:""` + // Column that contains the timestamps of requests. The column must be one + // of the following: - A ``TimestampType`` column - A column whose values + // can be converted to timestamps through the pyspark ``to_timestamp`` + // [function]. + // + // [function]: https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.to_timestamp.html + TimestampCol types.String `tfsdk:"timestamp_col" tf:""` +} + +func (newState *MonitorTimeSeries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorTimeSeries_SdkV2) { +} + +func (newState *MonitorTimeSeries_SdkV2) SyncEffectiveFieldsDuringRead(existingState MonitorTimeSeries_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MonitorTimeSeries. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MonitorTimeSeries_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "granularities": 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, MonitorTimeSeries_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MonitorTimeSeries_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "granularities": o.Granularities, + "timestamp_col": o.TimestampCol, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MonitorTimeSeries_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "granularities": basetypes.ListType{ + ElemType: types.StringType, + }, + "timestamp_col": types.StringType, + }, + } +} + +// GetGranularities returns the value of the Granularities field in MonitorTimeSeries_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MonitorTimeSeries_SdkV2) GetGranularities(ctx context.Context) ([]types.String, bool) { + if o.Granularities.IsNull() || o.Granularities.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Granularities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGranularities sets the value of the Granularities field in MonitorTimeSeries_SdkV2. +func (o *MonitorTimeSeries_SdkV2) SetGranularities(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["granularities"] + t = t.(attr.TypeWithElementType).ElementType() + o.Granularities = types.ListValueMust(t, vs) +} + +type NamedTableConstraint_SdkV2 struct { + // The name of the constraint. + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *NamedTableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NamedTableConstraint_SdkV2) { +} + +func (newState *NamedTableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState NamedTableConstraint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NamedTableConstraint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NamedTableConstraint_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, NamedTableConstraint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NamedTableConstraint_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 NamedTableConstraint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Online Table information. +type OnlineTable_SdkV2 struct { + // Full three-part (catalog, schema, table) name of the table. + Name types.String `tfsdk:"name" tf:"optional"` + // Specification of the online table. + Spec types.List `tfsdk:"spec" tf:"optional,object"` + // Online Table data synchronization status + Status types.List `tfsdk:"status" tf:"computed,object"` + // Data serving REST API URL for this table + TableServingUrl types.String `tfsdk:"table_serving_url" tf:"computed"` + // The provisioning state of the online table entity in Unity Catalog. This + // is distinct from the state of the data synchronization pipeline (i.e. the + // table may be in "ACTIVE" but the pipeline may be in "PROVISIONING" as it + // runs asynchronously). + UnityCatalogProvisioningState types.String `tfsdk:"unity_catalog_provisioning_state" tf:"computed"` +} + +func (newState *OnlineTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTable_SdkV2) { +} + +func (newState *OnlineTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTable_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTable. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OnlineTable_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "spec": reflect.TypeOf(OnlineTableSpec_SdkV2{}), + "status": reflect.TypeOf(OnlineTableStatus_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, OnlineTable_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OnlineTable_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "spec": o.Spec, + "status": o.Status, + "table_serving_url": o.TableServingUrl, + "unity_catalog_provisioning_state": o.UnityCatalogProvisioningState, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OnlineTable_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "spec": basetypes.ListType{ + ElemType: OnlineTableSpec{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: OnlineTableStatus{}.Type(ctx), + }, + "table_serving_url": types.StringType, + "unity_catalog_provisioning_state": types.StringType, + }, + } +} + +// GetSpec returns the value of the Spec field in OnlineTable_SdkV2 as +// a OnlineTableSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTable_SdkV2) GetSpec(ctx context.Context) (OnlineTableSpec_SdkV2, bool) { + var e OnlineTableSpec_SdkV2 + if o.Spec.IsNull() || o.Spec.IsUnknown() { + return e, false + } + var v []OnlineTableSpec_SdkV2 + d := o.Spec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSpec sets the value of the Spec field in OnlineTable_SdkV2. +func (o *OnlineTable_SdkV2) SetSpec(ctx context.Context, v OnlineTableSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] + o.Spec = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in OnlineTable_SdkV2 as +// a OnlineTableStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTable_SdkV2) GetStatus(ctx context.Context) (OnlineTableStatus_SdkV2, bool) { + var e OnlineTableStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []OnlineTableStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in OnlineTable_SdkV2. +func (o *OnlineTable_SdkV2) SetStatus(ctx context.Context, v OnlineTableStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// Specification of an online table. +type OnlineTableSpec_SdkV2 struct { + // Whether to create a full-copy pipeline -- a pipeline that stops after + // creates a full copy of the source table upon initialization and does not + // process any change data feeds (CDFs) afterwards. The pipeline can still + // be manually triggered afterwards, but it always perform a full copy of + // the source table and there are no incremental updates. This mode is + // useful for syncing views or tables without CDFs to online tables. Note + // that the full-copy pipeline only supports "triggered" scheduling policy. + PerformFullCopy types.Bool `tfsdk:"perform_full_copy" tf:"optional"` + // ID of the associated pipeline. Generated by the server - cannot be set by + // the caller. + PipelineId types.String `tfsdk:"pipeline_id" tf:"computed"` + // Primary Key columns to be used for data insert/update in the destination. + PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:"optional"` + // Pipeline runs continuously after generating the initial data. + RunContinuously types.List `tfsdk:"run_continuously" tf:"optional,object"` + // Pipeline stops after generating the initial data and can be triggered + // later (manually, through a cron job or through data triggers) + RunTriggered types.List `tfsdk:"run_triggered" tf:"optional,object"` + // Three-part (catalog, schema, table) name of the source Delta table. + SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:"optional"` + // Time series key to deduplicate (tie-break) rows with the same primary + // key. + TimeseriesKey types.String `tfsdk:"timeseries_key" tf:"optional"` +} + +func (newState *OnlineTableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableSpec_SdkV2) { +} + +func (newState *OnlineTableSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OnlineTableSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "primary_key_columns": reflect.TypeOf(types.String{}), + "run_continuously": reflect.TypeOf(OnlineTableSpecContinuousSchedulingPolicy_SdkV2{}), + "run_triggered": reflect.TypeOf(OnlineTableSpecTriggeredSchedulingPolicy_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, OnlineTableSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "perform_full_copy": o.PerformFullCopy, + "pipeline_id": o.PipelineId, + "primary_key_columns": o.PrimaryKeyColumns, + "run_continuously": o.RunContinuously, + "run_triggered": o.RunTriggered, + "source_table_full_name": o.SourceTableFullName, + "timeseries_key": o.TimeseriesKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OnlineTableSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "perform_full_copy": types.BoolType, + "pipeline_id": types.StringType, + "primary_key_columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "run_continuously": basetypes.ListType{ + ElemType: OnlineTableSpecContinuousSchedulingPolicy{}.Type(ctx), + }, + "run_triggered": basetypes.ListType{ + ElemType: OnlineTableSpecTriggeredSchedulingPolicy{}.Type(ctx), + }, + "source_table_full_name": types.StringType, + "timeseries_key": types.StringType, + }, + } +} + +// GetPrimaryKeyColumns returns the value of the PrimaryKeyColumns field in OnlineTableSpec_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableSpec_SdkV2) GetPrimaryKeyColumns(ctx context.Context) ([]types.String, bool) { + if o.PrimaryKeyColumns.IsNull() || o.PrimaryKeyColumns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PrimaryKeyColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrimaryKeyColumns sets the value of the PrimaryKeyColumns field in OnlineTableSpec_SdkV2. +func (o *OnlineTableSpec_SdkV2) SetPrimaryKeyColumns(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["primary_key_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrimaryKeyColumns = types.ListValueMust(t, vs) +} + +// GetRunContinuously returns the value of the RunContinuously field in OnlineTableSpec_SdkV2 as +// a OnlineTableSpecContinuousSchedulingPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableSpec_SdkV2) GetRunContinuously(ctx context.Context) (OnlineTableSpecContinuousSchedulingPolicy_SdkV2, bool) { + var e OnlineTableSpecContinuousSchedulingPolicy_SdkV2 + if o.RunContinuously.IsNull() || o.RunContinuously.IsUnknown() { + return e, false + } + var v []OnlineTableSpecContinuousSchedulingPolicy_SdkV2 + d := o.RunContinuously.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunContinuously sets the value of the RunContinuously field in OnlineTableSpec_SdkV2. +func (o *OnlineTableSpec_SdkV2) SetRunContinuously(ctx context.Context, v OnlineTableSpecContinuousSchedulingPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_continuously"] + o.RunContinuously = types.ListValueMust(t, vs) +} + +// GetRunTriggered returns the value of the RunTriggered field in OnlineTableSpec_SdkV2 as +// a OnlineTableSpecTriggeredSchedulingPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableSpec_SdkV2) GetRunTriggered(ctx context.Context) (OnlineTableSpecTriggeredSchedulingPolicy_SdkV2, bool) { + var e OnlineTableSpecTriggeredSchedulingPolicy_SdkV2 + if o.RunTriggered.IsNull() || o.RunTriggered.IsUnknown() { + return e, false + } + var v []OnlineTableSpecTriggeredSchedulingPolicy_SdkV2 + d := o.RunTriggered.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunTriggered sets the value of the RunTriggered field in OnlineTableSpec_SdkV2. +func (o *OnlineTableSpec_SdkV2) SetRunTriggered(ctx context.Context, v OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_triggered"] + o.RunTriggered = types.ListValueMust(t, vs) +} + +type OnlineTableSpecContinuousSchedulingPolicy_SdkV2 struct { +} + +func (newState *OnlineTableSpecContinuousSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableSpecContinuousSchedulingPolicy_SdkV2) { +} + +func (newState *OnlineTableSpecContinuousSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecContinuousSchedulingPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecContinuousSchedulingPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OnlineTableSpecContinuousSchedulingPolicy_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, OnlineTableSpecContinuousSchedulingPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpecContinuousSchedulingPolicy_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 OnlineTableSpecContinuousSchedulingPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type OnlineTableSpecTriggeredSchedulingPolicy_SdkV2 struct { +} + +func (newState *OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) { +} + +func (newState *OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableSpecTriggeredSchedulingPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OnlineTableSpecTriggeredSchedulingPolicy_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, OnlineTableSpecTriggeredSchedulingPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpecTriggeredSchedulingPolicy_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 OnlineTableSpecTriggeredSchedulingPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// 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" tf:"optional,object"` + // The state of the online table. + DetailedState types.String `tfsdk:"detailed_state" tf:"optional"` + // Detailed status of an online table. Shown if the online table is in the + // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. + FailedStatus types.List `tfsdk:"failed_status" tf:"optional,object"` + // A text description of the current state of the online table. + Message types.String `tfsdk:"message" tf:"optional"` + // Detailed status of an online table. Shown if the online table is in the + // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT + // state. + ProvisioningStatus types.List `tfsdk:"provisioning_status" tf:"optional,object"` + // Detailed status of an online table. Shown if the online table is in the + // ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. + TriggeredUpdateStatus types.List `tfsdk:"triggered_update_status" tf:"optional,object"` +} + +func (newState *OnlineTableStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableStatus_SdkV2) { +} + +func (newState *OnlineTableStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState OnlineTableStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OnlineTableStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OnlineTableStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "continuous_update_status": reflect.TypeOf(ContinuousUpdateStatus_SdkV2{}), + "failed_status": reflect.TypeOf(FailedStatus_SdkV2{}), + "provisioning_status": reflect.TypeOf(ProvisioningStatus_SdkV2{}), + "triggered_update_status": reflect.TypeOf(TriggeredUpdateStatus_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, OnlineTableStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OnlineTableStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "continuous_update_status": o.ContinuousUpdateStatus, + "detailed_state": o.DetailedState, + "failed_status": o.FailedStatus, + "message": o.Message, + "provisioning_status": o.ProvisioningStatus, + "triggered_update_status": o.TriggeredUpdateStatus, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OnlineTableStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "continuous_update_status": basetypes.ListType{ + ElemType: ContinuousUpdateStatus{}.Type(ctx), + }, + "detailed_state": types.StringType, + "failed_status": basetypes.ListType{ + ElemType: FailedStatus{}.Type(ctx), + }, + "message": types.StringType, + "provisioning_status": basetypes.ListType{ + ElemType: ProvisioningStatus{}.Type(ctx), + }, + "triggered_update_status": basetypes.ListType{ + ElemType: TriggeredUpdateStatus{}.Type(ctx), + }, + }, + } +} + +// GetContinuousUpdateStatus returns the value of the ContinuousUpdateStatus field in OnlineTableStatus_SdkV2 as +// a ContinuousUpdateStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableStatus_SdkV2) GetContinuousUpdateStatus(ctx context.Context) (ContinuousUpdateStatus_SdkV2, bool) { + var e ContinuousUpdateStatus_SdkV2 + if o.ContinuousUpdateStatus.IsNull() || o.ContinuousUpdateStatus.IsUnknown() { + return e, false + } + var v []ContinuousUpdateStatus_SdkV2 + d := o.ContinuousUpdateStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetContinuousUpdateStatus sets the value of the ContinuousUpdateStatus field in OnlineTableStatus_SdkV2. +func (o *OnlineTableStatus_SdkV2) SetContinuousUpdateStatus(ctx context.Context, v ContinuousUpdateStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous_update_status"] + o.ContinuousUpdateStatus = types.ListValueMust(t, vs) +} + +// GetFailedStatus returns the value of the FailedStatus field in OnlineTableStatus_SdkV2 as +// a FailedStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableStatus_SdkV2) GetFailedStatus(ctx context.Context) (FailedStatus_SdkV2, bool) { + var e FailedStatus_SdkV2 + if o.FailedStatus.IsNull() || o.FailedStatus.IsUnknown() { + return e, false + } + var v []FailedStatus_SdkV2 + d := o.FailedStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFailedStatus sets the value of the FailedStatus field in OnlineTableStatus_SdkV2. +func (o *OnlineTableStatus_SdkV2) SetFailedStatus(ctx context.Context, v FailedStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["failed_status"] + o.FailedStatus = types.ListValueMust(t, vs) +} + +// GetProvisioningStatus returns the value of the ProvisioningStatus field in OnlineTableStatus_SdkV2 as +// a ProvisioningStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableStatus_SdkV2) GetProvisioningStatus(ctx context.Context) (ProvisioningStatus_SdkV2, bool) { + var e ProvisioningStatus_SdkV2 + if o.ProvisioningStatus.IsNull() || o.ProvisioningStatus.IsUnknown() { + return e, false + } + var v []ProvisioningStatus_SdkV2 + d := o.ProvisioningStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvisioningStatus sets the value of the ProvisioningStatus field in OnlineTableStatus_SdkV2. +func (o *OnlineTableStatus_SdkV2) SetProvisioningStatus(ctx context.Context, v ProvisioningStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_status"] + o.ProvisioningStatus = types.ListValueMust(t, vs) +} + +// GetTriggeredUpdateStatus returns the value of the TriggeredUpdateStatus field in OnlineTableStatus_SdkV2 as +// a TriggeredUpdateStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *OnlineTableStatus_SdkV2) GetTriggeredUpdateStatus(ctx context.Context) (TriggeredUpdateStatus_SdkV2, bool) { + var e TriggeredUpdateStatus_SdkV2 + if o.TriggeredUpdateStatus.IsNull() || o.TriggeredUpdateStatus.IsUnknown() { + return e, false + } + var v []TriggeredUpdateStatus_SdkV2 + d := o.TriggeredUpdateStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTriggeredUpdateStatus sets the value of the TriggeredUpdateStatus field in OnlineTableStatus_SdkV2. +func (o *OnlineTableStatus_SdkV2) SetTriggeredUpdateStatus(ctx context.Context, v TriggeredUpdateStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["triggered_update_status"] + o.TriggeredUpdateStatus = types.ListValueMust(t, vs) +} + +type PermissionsChange_SdkV2 struct { + // The set of privileges to add. + Add types.List `tfsdk:"add" tf:"optional"` + // The principal whose privileges we are changing. + Principal types.String `tfsdk:"principal" tf:"optional"` + // The set of privileges to remove. + Remove types.List `tfsdk:"remove" tf:"optional"` +} + +func (newState *PermissionsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsChange_SdkV2) { +} + +func (newState *PermissionsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsChange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsChange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionsChange_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "add": reflect.TypeOf(types.String{}), + "remove": 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, PermissionsChange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionsChange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "add": o.Add, + "principal": o.Principal, + "remove": o.Remove, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionsChange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "add": basetypes.ListType{ + ElemType: types.StringType, + }, + "principal": types.StringType, + "remove": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAdd returns the value of the Add field in PermissionsChange_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionsChange_SdkV2) GetAdd(ctx context.Context) ([]types.String, bool) { + if o.Add.IsNull() || o.Add.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Add.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAdd sets the value of the Add field in PermissionsChange_SdkV2. +func (o *PermissionsChange_SdkV2) SetAdd(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["add"] + t = t.(attr.TypeWithElementType).ElementType() + o.Add = types.ListValueMust(t, vs) +} + +// GetRemove returns the value of the Remove field in PermissionsChange_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionsChange_SdkV2) GetRemove(ctx context.Context) ([]types.String, bool) { + if o.Remove.IsNull() || o.Remove.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Remove.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRemove sets the value of the Remove field in PermissionsChange_SdkV2. +func (o *PermissionsChange_SdkV2) SetRemove(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["remove"] + t = t.(attr.TypeWithElementType).ElementType() + o.Remove = types.ListValueMust(t, vs) +} + +type PermissionsList_SdkV2 struct { + // The privileges assigned to each principal + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` +} + +func (newState *PermissionsList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsList_SdkV2) { +} + +func (newState *PermissionsList_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionsList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privilege_assignments": reflect.TypeOf(PrivilegeAssignment_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, PermissionsList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionsList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionsList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "privilege_assignments": basetypes.ListType{ + ElemType: PrivilegeAssignment{}.Type(ctx), + }, + }, + } +} + +// GetPrivilegeAssignments returns the value of the PrivilegeAssignments field in PermissionsList_SdkV2 as +// a slice of PrivilegeAssignment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionsList_SdkV2) GetPrivilegeAssignments(ctx context.Context) ([]PrivilegeAssignment_SdkV2, bool) { + if o.PrivilegeAssignments.IsNull() || o.PrivilegeAssignments.IsUnknown() { + return nil, false + } + var v []PrivilegeAssignment_SdkV2 + d := o.PrivilegeAssignments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivilegeAssignments sets the value of the PrivilegeAssignments field in PermissionsList_SdkV2. +func (o *PermissionsList_SdkV2) SetPrivilegeAssignments(ctx context.Context, v []PrivilegeAssignment_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["privilege_assignments"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrivilegeAssignments = types.ListValueMust(t, vs) +} + +// Progress information of the Online Table data synchronization pipeline. +type PipelineProgress_SdkV2 struct { + // The estimated time remaining to complete this update in seconds. + EstimatedCompletionTimeSeconds types.Float64 `tfsdk:"estimated_completion_time_seconds" tf:"optional"` + // The source table Delta version that was last processed by the pipeline. + // The pipeline may not have completely processed this version yet. + LatestVersionCurrentlyProcessing types.Int64 `tfsdk:"latest_version_currently_processing" tf:"optional"` + // The completion ratio of this update. This is a number between 0 and 1. + SyncProgressCompletion types.Float64 `tfsdk:"sync_progress_completion" tf:"optional"` + // The number of rows that have been synced in this update. + SyncedRowCount types.Int64 `tfsdk:"synced_row_count" tf:"optional"` + // The total number of rows that need to be synced in this update. This + // number may be an estimate. + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` +} + +func (newState *PipelineProgress_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineProgress_SdkV2) { +} + +func (newState *PipelineProgress_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineProgress_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineProgress. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineProgress_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, PipelineProgress_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineProgress_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "estimated_completion_time_seconds": o.EstimatedCompletionTimeSeconds, + "latest_version_currently_processing": o.LatestVersionCurrentlyProcessing, + "sync_progress_completion": o.SyncProgressCompletion, + "synced_row_count": o.SyncedRowCount, + "total_row_count": o.TotalRowCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineProgress_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "estimated_completion_time_seconds": types.Float64Type, + "latest_version_currently_processing": types.Int64Type, + "sync_progress_completion": types.Float64Type, + "synced_row_count": types.Int64Type, + "total_row_count": types.Int64Type, + }, + } +} + +type PrimaryKeyConstraint_SdkV2 struct { + // Column names for this constraint. + ChildColumns types.List `tfsdk:"child_columns" tf:""` + // The name of the constraint. + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *PrimaryKeyConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrimaryKeyConstraint_SdkV2) { +} + +func (newState *PrimaryKeyConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrimaryKeyConstraint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PrimaryKeyConstraint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PrimaryKeyConstraint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "child_columns": 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, PrimaryKeyConstraint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PrimaryKeyConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "child_columns": o.ChildColumns, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PrimaryKeyConstraint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "child_columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "name": types.StringType, + }, + } +} + +// GetChildColumns returns the value of the ChildColumns field in PrimaryKeyConstraint_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PrimaryKeyConstraint_SdkV2) GetChildColumns(ctx context.Context) ([]types.String, bool) { + if o.ChildColumns.IsNull() || o.ChildColumns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ChildColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChildColumns sets the value of the ChildColumns field in PrimaryKeyConstraint_SdkV2. +func (o *PrimaryKeyConstraint_SdkV2) SetChildColumns(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["child_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.ChildColumns = types.ListValueMust(t, vs) +} + +type PrivilegeAssignment_SdkV2 struct { + // The principal (user email address or group name). + Principal types.String `tfsdk:"principal" tf:"optional"` + // The privileges assigned to the principal. + Privileges types.List `tfsdk:"privileges" tf:"optional"` +} + +func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment_SdkV2) { +} + +func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PrivilegeAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privileges": 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, PrivilegeAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PrivilegeAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal": types.StringType, + "privileges": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPrivileges returns the value of the Privileges field in PrivilegeAssignment_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PrivilegeAssignment_SdkV2) GetPrivileges(ctx context.Context) ([]types.String, bool) { + if o.Privileges.IsNull() || o.Privileges.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Privileges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivileges sets the value of the Privileges field in PrivilegeAssignment_SdkV2. +func (o *PrivilegeAssignment_SdkV2) SetPrivileges(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["privileges"] + t = t.(attr.TypeWithElementType).ElementType() + o.Privileges = types.ListValueMust(t, vs) +} + +// Status of an asynchronously provisioned resource. +type ProvisioningInfo_SdkV2 struct { + State types.String `tfsdk:"state" tf:"optional"` +} + +func (newState *ProvisioningInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningInfo_SdkV2) { +} + +func (newState *ProvisioningInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProvisioningInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProvisioningInfo_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, ProvisioningInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProvisioningInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ProvisioningInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "state": types.StringType, + }, + } +} + +// Detailed status of an online table. Shown if the online table is in the +// PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state. +type ProvisioningStatus_SdkV2 struct { + // Details about initial data synchronization. Only populated when in the + // PROVISIONING_INITIAL_SNAPSHOT state. + InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` +} + +func (newState *ProvisioningStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningStatus_SdkV2) { +} + +func (newState *ProvisioningStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProvisioningStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProvisioningStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProvisioningStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "initial_pipeline_sync_progress": reflect.TypeOf(PipelineProgress_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, ProvisioningStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProvisioningStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "initial_pipeline_sync_progress": o.InitialPipelineSyncProgress, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ProvisioningStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "initial_pipeline_sync_progress": basetypes.ListType{ + ElemType: PipelineProgress{}.Type(ctx), + }, + }, + } +} + +// GetInitialPipelineSyncProgress returns the value of the InitialPipelineSyncProgress field in ProvisioningStatus_SdkV2 as +// a PipelineProgress_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ProvisioningStatus_SdkV2) GetInitialPipelineSyncProgress(ctx context.Context) (PipelineProgress_SdkV2, bool) { + var e PipelineProgress_SdkV2 + if o.InitialPipelineSyncProgress.IsNull() || o.InitialPipelineSyncProgress.IsUnknown() { + return e, false + } + var v []PipelineProgress_SdkV2 + d := o.InitialPipelineSyncProgress.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInitialPipelineSyncProgress sets the value of the InitialPipelineSyncProgress field in ProvisioningStatus_SdkV2. +func (o *ProvisioningStatus_SdkV2) SetInitialPipelineSyncProgress(ctx context.Context, v PipelineProgress_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["initial_pipeline_sync_progress"] + o.InitialPipelineSyncProgress = types.ListValueMust(t, vs) +} + +type QuotaInfo_SdkV2 struct { + // The timestamp that indicates when the quota count was last updated. + LastRefreshedAt types.Int64 `tfsdk:"last_refreshed_at" tf:"optional"` + // Name of the parent resource. Returns metastore ID if the parent is a + // metastore. + ParentFullName types.String `tfsdk:"parent_full_name" tf:"optional"` + // The quota parent securable type. + ParentSecurableType types.String `tfsdk:"parent_securable_type" tf:"optional"` + // The current usage of the resource quota. + QuotaCount types.Int64 `tfsdk:"quota_count" tf:"optional"` + // The current limit of the resource quota. + QuotaLimit types.Int64 `tfsdk:"quota_limit" tf:"optional"` + // The name of the quota. + QuotaName types.String `tfsdk:"quota_name" tf:"optional"` +} + +func (newState *QuotaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuotaInfo_SdkV2) { +} + +func (newState *QuotaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuotaInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QuotaInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QuotaInfo_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, QuotaInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QuotaInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "last_refreshed_at": o.LastRefreshedAt, + "parent_full_name": o.ParentFullName, + "parent_securable_type": o.ParentSecurableType, + "quota_count": o.QuotaCount, + "quota_limit": o.QuotaLimit, + "quota_name": o.QuotaName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QuotaInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "last_refreshed_at": types.Int64Type, + "parent_full_name": types.StringType, + "parent_securable_type": types.StringType, + "quota_count": types.Int64Type, + "quota_limit": types.Int64Type, + "quota_name": types.StringType, + }, + } +} + +// R2 temporary credentials for API authentication. Read more at +// https://developers.cloudflare.com/r2/api/s3/tokens/. +type R2Credentials_SdkV2 struct { + // The access key ID that identifies the temporary credentials. + AccessKeyId types.String `tfsdk:"access_key_id" tf:"optional"` + // The secret access key associated with the access key. + SecretAccessKey types.String `tfsdk:"secret_access_key" tf:"optional"` + // The generated JWT that users must pass to use the temporary credentials. + SessionToken types.String `tfsdk:"session_token" tf:"optional"` +} + +func (newState *R2Credentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan R2Credentials_SdkV2) { +} + +func (newState *R2Credentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState R2Credentials_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in R2Credentials. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a R2Credentials_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, R2Credentials_SdkV2 +// only implements ToObjectValue() and Type(). +func (o R2Credentials_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_key_id": o.AccessKeyId, + "secret_access_key": o.SecretAccessKey, + "session_token": o.SessionToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o R2Credentials_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_key_id": types.StringType, + "secret_access_key": types.StringType, + "session_token": types.StringType, + }, + } +} + +// Get a Volume +type ReadVolumeRequest_SdkV2 struct { + // Whether to include volumes in the response for which the principal can + // only access selective metadata for + IncludeBrowse types.Bool `tfsdk:"-"` + // The three-level (fully qualified) name of the volume + Name types.String `tfsdk:"-"` +} + +func (newState *ReadVolumeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadVolumeRequest_SdkV2) { +} + +func (newState *ReadVolumeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadVolumeRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadVolumeRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReadVolumeRequest_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, ReadVolumeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReadVolumeRequest_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 ReadVolumeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_browse": types.BoolType, + "name": types.StringType, + }, + } +} + +type RegenerateDashboardRequest_SdkV2 struct { + // Full name of the table. + TableName types.String `tfsdk:"-"` + // Optional argument to specify the warehouse for dashboard regeneration. If + // not specified, the first running warehouse will be used. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardRequest_SdkV2) { +} + +func (newState *RegenerateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegenerateDashboardRequest_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, RegenerateDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegenerateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegenerateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +type RegenerateDashboardResponse_SdkV2 struct { + // Id of the regenerated monitoring dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + // The directory where the regenerated dashboard is stored. + ParentFolder types.String `tfsdk:"parent_folder" tf:"optional"` +} + +func (newState *RegenerateDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegenerateDashboardResponse_SdkV2) { +} + +func (newState *RegenerateDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegenerateDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegenerateDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegenerateDashboardResponse_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, RegenerateDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegenerateDashboardResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "parent_folder": o.ParentFolder, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegenerateDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "parent_folder": types.StringType, + }, + } +} + +// Registered model alias. +type RegisteredModelAlias_SdkV2 struct { + // Name of the alias, e.g. 'champion' or 'latest_stable' + AliasName types.String `tfsdk:"alias_name" tf:"optional"` + // Integer version number of the model version to which this alias points. + VersionNum types.Int64 `tfsdk:"version_num" tf:"optional"` +} + +func (newState *RegisteredModelAlias_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAlias_SdkV2) { +} + +func (newState *RegisteredModelAlias_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAlias_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAlias. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelAlias_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, RegisteredModelAlias_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAlias_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alias_name": o.AliasName, + "version_num": o.VersionNum, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelAlias_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alias_name": types.StringType, + "version_num": types.Int64Type, + }, + } +} + +type RegisteredModelInfo_SdkV2 struct { + // List of aliases associated with the registered model + Aliases types.List `tfsdk:"aliases" tf:"optional"` + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // The name of the catalog where the schema and the registered model reside + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // The comment attached to the registered model + Comment types.String `tfsdk:"comment" tf:"optional"` + // Creation timestamp of the registered model in milliseconds since the Unix + // epoch + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The identifier of the user who created the registered model + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"full_name" tf:"optional"` + // The unique identifier of the metastore + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The name of the registered model + Name types.String `tfsdk:"name" tf:"optional"` + // The identifier of the user who owns the registered model + Owner types.String `tfsdk:"owner" tf:"optional"` + // The name of the schema where the registered model resides + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // The storage location on the cloud under which model version data files + // are stored + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + // Last-update timestamp of the registered model in milliseconds since the + // Unix epoch + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // The identifier of the user who updated the registered model last time + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *RegisteredModelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelInfo_SdkV2) { +} + +func (newState *RegisteredModelInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aliases": reflect.TypeOf(RegisteredModelAlias_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, RegisteredModelInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aliases": o.Aliases, + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "full_name": o.FullName, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "schema_name": o.SchemaName, + "storage_location": o.StorageLocation, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aliases": basetypes.ListType{ + ElemType: RegisteredModelAlias{}.Type(ctx), + }, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "schema_name": types.StringType, + "storage_location": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetAliases returns the value of the Aliases field in RegisteredModelInfo_SdkV2 as +// a slice of RegisteredModelAlias_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegisteredModelInfo_SdkV2) GetAliases(ctx context.Context) ([]RegisteredModelAlias_SdkV2, bool) { + if o.Aliases.IsNull() || o.Aliases.IsUnknown() { + return nil, false + } + var v []RegisteredModelAlias_SdkV2 + d := o.Aliases.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAliases sets the value of the Aliases field in RegisteredModelInfo_SdkV2. +func (o *RegisteredModelInfo_SdkV2) SetAliases(ctx context.Context, v []RegisteredModelAlias_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["aliases"] + t = t.(attr.TypeWithElementType).ElementType() + o.Aliases = types.ListValueMust(t, vs) +} + +// Queue a metric refresh for a monitor +type RunRefreshRequest_SdkV2 struct { + // Full name of the table. + TableName types.String `tfsdk:"-"` +} + +func (newState *RunRefreshRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunRefreshRequest_SdkV2) { +} + +func (newState *RunRefreshRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunRefreshRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunRefreshRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunRefreshRequest_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, RunRefreshRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunRefreshRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_name": o.TableName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunRefreshRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_name": types.StringType, + }, + } +} + +type SchemaInfo_SdkV2 struct { + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // The type of the parent catalog. + CatalogType types.String `tfsdk:"catalog_type" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this schema was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of schema creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + // Full name of schema, in form of __catalog_name__.__schema_name__. + FullName types.String `tfsdk:"full_name" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of schema, relative to parent catalog. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of current owner of schema. + Owner types.String `tfsdk:"owner" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` + // The unique identifier of the schema. + SchemaId types.String `tfsdk:"schema_id" tf:"optional"` + // Storage location for managed tables within schema. + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + // Storage root URL for managed tables within schema. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // Time at which this schema was created, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified schema. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *SchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaInfo_SdkV2) { +} + +func (newState *SchemaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SchemaInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SchemaInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "effective_predictive_optimization_flag": reflect.TypeOf(EffectivePredictiveOptimizationFlag_SdkV2{}), + "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, SchemaInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SchemaInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "catalog_type": o.CatalogType, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "effective_predictive_optimization_flag": o.EffectivePredictiveOptimizationFlag, + "enable_predictive_optimization": o.EnablePredictiveOptimization, + "full_name": o.FullName, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "properties": o.Properties, + "schema_id": o.SchemaId, + "storage_location": o.StorageLocation, + "storage_root": o.StorageRoot, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SchemaInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "catalog_type": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "effective_predictive_optimization_flag": basetypes.ListType{ + ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + }, + "enable_predictive_optimization": types.StringType, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "schema_id": types.StringType, + "storage_location": types.StringType, + "storage_root": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetEffectivePredictiveOptimizationFlag returns the value of the EffectivePredictiveOptimizationFlag field in SchemaInfo_SdkV2 as +// a EffectivePredictiveOptimizationFlag_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SchemaInfo_SdkV2) GetEffectivePredictiveOptimizationFlag(ctx context.Context) (EffectivePredictiveOptimizationFlag_SdkV2, bool) { + var e EffectivePredictiveOptimizationFlag_SdkV2 + if o.EffectivePredictiveOptimizationFlag.IsNull() || o.EffectivePredictiveOptimizationFlag.IsUnknown() { + return e, false + } + var v []EffectivePredictiveOptimizationFlag_SdkV2 + d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in SchemaInfo_SdkV2. +func (o *SchemaInfo_SdkV2) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] + o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in SchemaInfo_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 *SchemaInfo_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 SchemaInfo_SdkV2. +func (o *SchemaInfo_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) +} + +type SetArtifactAllowlist_SdkV2 struct { + // A list of allowed artifact match patterns. + ArtifactMatchers types.List `tfsdk:"artifact_matchers" tf:""` + // The artifact type of the allowlist. + ArtifactType types.String `tfsdk:"-"` +} + +func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetArtifactAllowlist_SdkV2) { +} + +func (newState *SetArtifactAllowlist_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetArtifactAllowlist_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetArtifactAllowlist_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "artifact_matchers": reflect.TypeOf(ArtifactMatcher_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, SetArtifactAllowlist_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetArtifactAllowlist_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_matchers": o.ArtifactMatchers, + "artifact_type": o.ArtifactType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetArtifactAllowlist_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_matchers": basetypes.ListType{ + ElemType: ArtifactMatcher{}.Type(ctx), + }, + "artifact_type": types.StringType, + }, + } +} + +// GetArtifactMatchers returns the value of the ArtifactMatchers field in SetArtifactAllowlist_SdkV2 as +// a slice of ArtifactMatcher_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SetArtifactAllowlist_SdkV2) GetArtifactMatchers(ctx context.Context) ([]ArtifactMatcher_SdkV2, bool) { + if o.ArtifactMatchers.IsNull() || o.ArtifactMatchers.IsUnknown() { + return nil, false + } + var v []ArtifactMatcher_SdkV2 + d := o.ArtifactMatchers.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetArtifactMatchers sets the value of the ArtifactMatchers field in SetArtifactAllowlist_SdkV2. +func (o *SetArtifactAllowlist_SdkV2) SetArtifactMatchers(ctx context.Context, v []ArtifactMatcher_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["artifact_matchers"] + t = t.(attr.TypeWithElementType).ElementType() + o.ArtifactMatchers = types.ListValueMust(t, vs) +} + +type SetRegisteredModelAliasRequest_SdkV2 struct { + // The name of the alias + Alias types.String `tfsdk:"alias" tf:""` + // Full name of the registered model + FullName types.String `tfsdk:"full_name" tf:""` + // The version number of the model version to which the alias points + VersionNum types.Int64 `tfsdk:"version_num" tf:""` +} + +func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRegisteredModelAliasRequest_SdkV2) { +} + +func (newState *SetRegisteredModelAliasRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetRegisteredModelAliasRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetRegisteredModelAliasRequest_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, SetRegisteredModelAliasRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetRegisteredModelAliasRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + "version_num": o.VersionNum, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetRegisteredModelAliasRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alias": types.StringType, + "full_name": types.StringType, + "version_num": types.Int64Type, + }, + } +} + +// Server-Side Encryption properties for clients communicating with AWS s3. +type SseEncryptionDetails_SdkV2 struct { + // The type of key encryption to use (affects headers from s3 client). + Algorithm types.String `tfsdk:"algorithm" tf:"optional"` + // When algorithm is **AWS_SSE_KMS** this field specifies the ARN of the SSE + // key to use. + AwsKmsKeyArn types.String `tfsdk:"aws_kms_key_arn" tf:"optional"` +} + +func (newState *SseEncryptionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SseEncryptionDetails_SdkV2) { +} + +func (newState *SseEncryptionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState SseEncryptionDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SseEncryptionDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SseEncryptionDetails_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, SseEncryptionDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SseEncryptionDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "algorithm": o.Algorithm, + "aws_kms_key_arn": o.AwsKmsKeyArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SseEncryptionDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "algorithm": types.StringType, + "aws_kms_key_arn": types.StringType, + }, + } +} + +type StorageCredentialInfo_SdkV2 struct { + // The AWS IAM role configuration. + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // The Cloudflare API token configuration. + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this Credential was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of credential creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The Databricks managed GCP service account configuration. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // The full name of the credential. + FullName types.String `tfsdk:"full_name" tf:"optional"` + // The unique identifier of the credential. + Id types.String `tfsdk:"id" tf:"optional"` + + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The credential name. The name must be unique within the metastore. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of current owner of credential. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Whether the storage credential is only usable for read operations. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Time at which this credential was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the credential. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // Whether this credential is the current metastore's root storage + // credential. + UsedForManagedStorage types.Bool `tfsdk:"used_for_managed_storage" tf:"optional"` +} + +func (newState *StorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageCredentialInfo_SdkV2) { +} + +func (newState *StorageCredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState StorageCredentialInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageCredentialInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StorageCredentialInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRoleResponse_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentityResponse_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountResponse_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, StorageCredentialInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StorageCredentialInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "cloudflare_api_token": o.CloudflareApiToken, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "full_name": o.FullName, + "id": o.Id, + "isolation_mode": o.IsolationMode, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "read_only": o.ReadOnly, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "used_for_managed_storage": o.UsedForManagedStorage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StorageCredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRoleResponse{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentityResponse{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "cloudflare_api_token": basetypes.ListType{ + ElemType: CloudflareApiToken{}.Type(ctx), + }, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccountResponse{}.Type(ctx), + }, + "full_name": types.StringType, + "id": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "used_for_managed_storage": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in StorageCredentialInfo_SdkV2 as +// a AwsIamRoleResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageCredentialInfo_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRoleResponse_SdkV2, bool) { + var e AwsIamRoleResponse_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRoleResponse_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in StorageCredentialInfo_SdkV2. +func (o *StorageCredentialInfo_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRoleResponse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in StorageCredentialInfo_SdkV2 as +// a AzureManagedIdentityResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageCredentialInfo_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentityResponse_SdkV2, bool) { + var e AzureManagedIdentityResponse_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentityResponse_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in StorageCredentialInfo_SdkV2. +func (o *StorageCredentialInfo_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityResponse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in StorageCredentialInfo_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageCredentialInfo_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in StorageCredentialInfo_SdkV2. +func (o *StorageCredentialInfo_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetCloudflareApiToken returns the value of the CloudflareApiToken field in StorageCredentialInfo_SdkV2 as +// a CloudflareApiToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageCredentialInfo_SdkV2) GetCloudflareApiToken(ctx context.Context) (CloudflareApiToken_SdkV2, bool) { + var e CloudflareApiToken_SdkV2 + if o.CloudflareApiToken.IsNull() || o.CloudflareApiToken.IsUnknown() { + return e, false + } + var v []CloudflareApiToken_SdkV2 + d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudflareApiToken sets the value of the CloudflareApiToken field in StorageCredentialInfo_SdkV2. +func (o *StorageCredentialInfo_SdkV2) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] + o.CloudflareApiToken = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in StorageCredentialInfo_SdkV2 as +// a DatabricksGcpServiceAccountResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageCredentialInfo_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccountResponse_SdkV2, bool) { + var e DatabricksGcpServiceAccountResponse_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccountResponse_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in StorageCredentialInfo_SdkV2. +func (o *StorageCredentialInfo_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountResponse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +type SystemSchemaInfo_SdkV2 struct { + // Name of the system schema. + Schema types.String `tfsdk:"schema" tf:"optional"` + // The current state of enablement for the system schema. An empty string + // means the system schema is available and ready for opt-in. + State types.String `tfsdk:"state" tf:"optional"` +} + +func (newState *SystemSchemaInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SystemSchemaInfo_SdkV2) { +} + +func (newState *SystemSchemaInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SystemSchemaInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SystemSchemaInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SystemSchemaInfo_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, SystemSchemaInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SystemSchemaInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "schema": o.Schema, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SystemSchemaInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "schema": types.StringType, + "state": types.StringType, + }, + } +} + +// A table constraint, as defined by *one* of the following fields being set: +// __primary_key_constraint__, __foreign_key_constraint__, +// __named_table_constraint__. +type TableConstraint_SdkV2 struct { + ForeignKeyConstraint types.List `tfsdk:"foreign_key_constraint" tf:"optional,object"` + + NamedTableConstraint types.List `tfsdk:"named_table_constraint" tf:"optional,object"` + + PrimaryKeyConstraint types.List `tfsdk:"primary_key_constraint" tf:"optional,object"` +} + +func (newState *TableConstraint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableConstraint_SdkV2) { +} + +func (newState *TableConstraint_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableConstraint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableConstraint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableConstraint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "foreign_key_constraint": reflect.TypeOf(ForeignKeyConstraint_SdkV2{}), + "named_table_constraint": reflect.TypeOf(NamedTableConstraint_SdkV2{}), + "primary_key_constraint": reflect.TypeOf(PrimaryKeyConstraint_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, TableConstraint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableConstraint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "foreign_key_constraint": o.ForeignKeyConstraint, + "named_table_constraint": o.NamedTableConstraint, + "primary_key_constraint": o.PrimaryKeyConstraint, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableConstraint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "foreign_key_constraint": basetypes.ListType{ + ElemType: ForeignKeyConstraint{}.Type(ctx), + }, + "named_table_constraint": basetypes.ListType{ + ElemType: NamedTableConstraint{}.Type(ctx), + }, + "primary_key_constraint": basetypes.ListType{ + ElemType: PrimaryKeyConstraint{}.Type(ctx), + }, + }, + } +} + +// GetForeignKeyConstraint returns the value of the ForeignKeyConstraint field in TableConstraint_SdkV2 as +// a ForeignKeyConstraint_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableConstraint_SdkV2) GetForeignKeyConstraint(ctx context.Context) (ForeignKeyConstraint_SdkV2, bool) { + var e ForeignKeyConstraint_SdkV2 + if o.ForeignKeyConstraint.IsNull() || o.ForeignKeyConstraint.IsUnknown() { + return e, false + } + var v []ForeignKeyConstraint_SdkV2 + d := o.ForeignKeyConstraint.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForeignKeyConstraint sets the value of the ForeignKeyConstraint field in TableConstraint_SdkV2. +func (o *TableConstraint_SdkV2) SetForeignKeyConstraint(ctx context.Context, v ForeignKeyConstraint_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_key_constraint"] + o.ForeignKeyConstraint = types.ListValueMust(t, vs) +} + +// GetNamedTableConstraint returns the value of the NamedTableConstraint field in TableConstraint_SdkV2 as +// a NamedTableConstraint_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableConstraint_SdkV2) GetNamedTableConstraint(ctx context.Context) (NamedTableConstraint_SdkV2, bool) { + var e NamedTableConstraint_SdkV2 + if o.NamedTableConstraint.IsNull() || o.NamedTableConstraint.IsUnknown() { + return e, false + } + var v []NamedTableConstraint_SdkV2 + d := o.NamedTableConstraint.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNamedTableConstraint sets the value of the NamedTableConstraint field in TableConstraint_SdkV2. +func (o *TableConstraint_SdkV2) SetNamedTableConstraint(ctx context.Context, v NamedTableConstraint_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["named_table_constraint"] + o.NamedTableConstraint = types.ListValueMust(t, vs) +} + +// GetPrimaryKeyConstraint returns the value of the PrimaryKeyConstraint field in TableConstraint_SdkV2 as +// a PrimaryKeyConstraint_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableConstraint_SdkV2) GetPrimaryKeyConstraint(ctx context.Context) (PrimaryKeyConstraint_SdkV2, bool) { + var e PrimaryKeyConstraint_SdkV2 + if o.PrimaryKeyConstraint.IsNull() || o.PrimaryKeyConstraint.IsUnknown() { + return e, false + } + var v []PrimaryKeyConstraint_SdkV2 + d := o.PrimaryKeyConstraint.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPrimaryKeyConstraint sets the value of the PrimaryKeyConstraint field in TableConstraint_SdkV2. +func (o *TableConstraint_SdkV2) SetPrimaryKeyConstraint(ctx context.Context, v PrimaryKeyConstraint_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["primary_key_constraint"] + o.PrimaryKeyConstraint = types.ListValueMust(t, vs) +} + +// A table that is dependent on a SQL object. +type TableDependency_SdkV2 struct { + // Full name of the dependent table, in the form of + // __catalog_name__.__schema_name__.__table_name__. + TableFullName types.String `tfsdk:"table_full_name" tf:""` +} + +func (newState *TableDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableDependency_SdkV2) { +} + +func (newState *TableDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableDependency_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableDependency. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableDependency_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, TableDependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableDependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_full_name": o.TableFullName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableDependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_full_name": types.StringType, + }, + } +} + +type TableExistsResponse_SdkV2 struct { + // Whether the table exists or not. + TableExists types.Bool `tfsdk:"table_exists" tf:"optional"` +} + +func (newState *TableExistsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableExistsResponse_SdkV2) { +} + +func (newState *TableExistsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableExistsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableExistsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableExistsResponse_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, TableExistsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableExistsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "table_exists": o.TableExists, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableExistsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "table_exists": types.BoolType, + }, + } +} + +type TableInfo_SdkV2 struct { + // The AWS access point to use when accesing s3 for this external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // Name of parent catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // The array of __ColumnInfo__ definitions of the table's columns. + Columns types.List `tfsdk:"columns" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this table was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of table creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Unique ID of the Data Access Configuration to use with the table data. + DataAccessConfigurationId types.String `tfsdk:"data_access_configuration_id" tf:"optional"` + // Data source format + DataSourceFormat types.String `tfsdk:"data_source_format" tf:"optional"` + // Time at which this table was deleted, in epoch milliseconds. Field is + // omitted if table is not deleted. + DeletedAt types.Int64 `tfsdk:"deleted_at" tf:"optional"` + // Information pertaining to current state of the delta table. + DeltaRuntimePropertiesKvpairs types.List `tfsdk:"delta_runtime_properties_kvpairs" tf:"optional,object"` + + EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + // Full name of table, in form of + // __catalog_name__.__schema_name__.__table_name__ + FullName types.String `tfsdk:"full_name" tf:"optional"` + // Unique identifier of parent metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of table, relative to parent schema. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of current owner of table. + Owner types.String `tfsdk:"owner" tf:"optional"` + // The pipeline ID of the table. Applicable for tables created by pipelines + // (Materialized View, Streaming Table, etc.). + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` + + RowFilter types.List `tfsdk:"row_filter" tf:"optional,object"` + // Name of parent schema relative to its parent catalog. + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // List of schemes whose objects can be referenced without qualification. + SqlPath types.String `tfsdk:"sql_path" tf:"optional"` + // Name of the storage credential, when a storage credential is configured + // for use with this table. + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + // Storage root URL for table (for **MANAGED**, **EXTERNAL** tables) + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + // List of table constraints. Note: this field is not set in the output of + // the __listTables__ API. + TableConstraints types.List `tfsdk:"table_constraints" tf:"optional"` + // The unique identifier of the table. + TableId types.String `tfsdk:"table_id" tf:"optional"` + + TableType types.String `tfsdk:"table_type" tf:"optional"` + // Time at which this table was last modified, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified the table. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // View definition SQL (when __table_type__ is **VIEW**, + // **MATERIALIZED_VIEW**, or **STREAMING_TABLE**) + ViewDefinition types.String `tfsdk:"view_definition" tf:"optional"` + // View dependencies (when table_type == **VIEW** or **MATERIALIZED_VIEW**, + // **STREAMING_TABLE**) - when DependencyList is None, the dependency is not + // provided; - when DependencyList is an empty list, the dependency is + // provided but is empty; - when DependencyList is not an empty list, + // dependencies are provided and recorded. + ViewDependencies types.List `tfsdk:"view_dependencies" tf:"optional,object"` +} + +func (newState *TableInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableInfo_SdkV2) { +} + +func (newState *TableInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnInfo_SdkV2{}), + "delta_runtime_properties_kvpairs": reflect.TypeOf(DeltaRuntimePropertiesKvPairs_SdkV2{}), + "effective_predictive_optimization_flag": reflect.TypeOf(EffectivePredictiveOptimizationFlag_SdkV2{}), + "encryption_details": reflect.TypeOf(EncryptionDetails_SdkV2{}), + "properties": reflect.TypeOf(types.String{}), + "row_filter": reflect.TypeOf(TableRowFilter_SdkV2{}), + "table_constraints": reflect.TypeOf(TableConstraint_SdkV2{}), + "view_dependencies": reflect.TypeOf(DependencyList_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, TableInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_point": o.AccessPoint, + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "columns": o.Columns, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "data_access_configuration_id": o.DataAccessConfigurationId, + "data_source_format": o.DataSourceFormat, + "deleted_at": o.DeletedAt, + "delta_runtime_properties_kvpairs": o.DeltaRuntimePropertiesKvpairs, + "effective_predictive_optimization_flag": o.EffectivePredictiveOptimizationFlag, + "enable_predictive_optimization": o.EnablePredictiveOptimization, + "encryption_details": o.EncryptionDetails, + "full_name": o.FullName, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "pipeline_id": o.PipelineId, + "properties": o.Properties, + "row_filter": o.RowFilter, + "schema_name": o.SchemaName, + "sql_path": o.SqlPath, + "storage_credential_name": o.StorageCredentialName, + "storage_location": o.StorageLocation, + "table_constraints": o.TableConstraints, + "table_id": o.TableId, + "table_type": o.TableType, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "view_definition": o.ViewDefinition, + "view_dependencies": o.ViewDependencies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_point": types.StringType, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "columns": basetypes.ListType{ + ElemType: ColumnInfo{}.Type(ctx), + }, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_access_configuration_id": types.StringType, + "data_source_format": types.StringType, + "deleted_at": types.Int64Type, + "delta_runtime_properties_kvpairs": basetypes.ListType{ + ElemType: DeltaRuntimePropertiesKvPairs{}.Type(ctx), + }, + "effective_predictive_optimization_flag": basetypes.ListType{ + ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + }, + "enable_predictive_optimization": types.StringType, + "encryption_details": basetypes.ListType{ + ElemType: EncryptionDetails{}.Type(ctx), + }, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "pipeline_id": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + "row_filter": basetypes.ListType{ + ElemType: TableRowFilter{}.Type(ctx), + }, + "schema_name": types.StringType, + "sql_path": types.StringType, + "storage_credential_name": types.StringType, + "storage_location": types.StringType, + "table_constraints": basetypes.ListType{ + ElemType: TableConstraint{}.Type(ctx), + }, + "table_id": types.StringType, + "table_type": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "view_definition": types.StringType, + "view_dependencies": basetypes.ListType{ + ElemType: DependencyList{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in TableInfo_SdkV2 as +// a slice of ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetColumns(ctx context.Context) ([]ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnInfo_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 TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetColumns(ctx context.Context, v []ColumnInfo_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) +} + +// GetDeltaRuntimePropertiesKvpairs returns the value of the DeltaRuntimePropertiesKvpairs field in TableInfo_SdkV2 as +// a DeltaRuntimePropertiesKvPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetDeltaRuntimePropertiesKvpairs(ctx context.Context) (DeltaRuntimePropertiesKvPairs_SdkV2, bool) { + var e DeltaRuntimePropertiesKvPairs_SdkV2 + if o.DeltaRuntimePropertiesKvpairs.IsNull() || o.DeltaRuntimePropertiesKvpairs.IsUnknown() { + return e, false + } + var v []DeltaRuntimePropertiesKvPairs_SdkV2 + d := o.DeltaRuntimePropertiesKvpairs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeltaRuntimePropertiesKvpairs sets the value of the DeltaRuntimePropertiesKvpairs field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetDeltaRuntimePropertiesKvpairs(ctx context.Context, v DeltaRuntimePropertiesKvPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_runtime_properties_kvpairs"] + o.DeltaRuntimePropertiesKvpairs = types.ListValueMust(t, vs) +} + +// GetEffectivePredictiveOptimizationFlag returns the value of the EffectivePredictiveOptimizationFlag field in TableInfo_SdkV2 as +// a EffectivePredictiveOptimizationFlag_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetEffectivePredictiveOptimizationFlag(ctx context.Context) (EffectivePredictiveOptimizationFlag_SdkV2, bool) { + var e EffectivePredictiveOptimizationFlag_SdkV2 + if o.EffectivePredictiveOptimizationFlag.IsNull() || o.EffectivePredictiveOptimizationFlag.IsUnknown() { + return e, false + } + var v []EffectivePredictiveOptimizationFlag_SdkV2 + d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] + o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) +} + +// GetEncryptionDetails returns the value of the EncryptionDetails field in TableInfo_SdkV2 as +// a EncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetEncryptionDetails(ctx context.Context) (EncryptionDetails_SdkV2, bool) { + var e EncryptionDetails_SdkV2 + if o.EncryptionDetails.IsNull() || o.EncryptionDetails.IsUnknown() { + return e, false + } + var v []EncryptionDetails_SdkV2 + d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEncryptionDetails sets the value of the EncryptionDetails field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetEncryptionDetails(ctx context.Context, v EncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] + o.EncryptionDetails = types.ListValueMust(t, vs) +} + +// GetProperties returns the value of the Properties field in TableInfo_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 *TableInfo_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 TableInfo_SdkV2. +func (o *TableInfo_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) +} + +// GetRowFilter returns the value of the RowFilter field in TableInfo_SdkV2 as +// a TableRowFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetRowFilter(ctx context.Context) (TableRowFilter_SdkV2, bool) { + var e TableRowFilter_SdkV2 + if o.RowFilter.IsNull() || o.RowFilter.IsUnknown() { + return e, false + } + var v []TableRowFilter_SdkV2 + d := o.RowFilter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRowFilter sets the value of the RowFilter field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetRowFilter(ctx context.Context, v TableRowFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["row_filter"] + o.RowFilter = 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. +func (o *TableInfo_SdkV2) GetTableConstraints(ctx context.Context) ([]TableConstraint_SdkV2, bool) { + if o.TableConstraints.IsNull() || o.TableConstraints.IsUnknown() { + return nil, false + } + var v []TableConstraint_SdkV2 + d := o.TableConstraints.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTableConstraints sets the value of the TableConstraints field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetTableConstraints(ctx context.Context, v []TableConstraint_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["table_constraints"] + t = t.(attr.TypeWithElementType).ElementType() + o.TableConstraints = types.ListValueMust(t, vs) +} + +// GetViewDependencies returns the value of the ViewDependencies field in TableInfo_SdkV2 as +// a DependencyList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableInfo_SdkV2) GetViewDependencies(ctx context.Context) (DependencyList_SdkV2, bool) { + var e DependencyList_SdkV2 + if o.ViewDependencies.IsNull() || o.ViewDependencies.IsUnknown() { + return e, false + } + var v []DependencyList_SdkV2 + d := o.ViewDependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetViewDependencies sets the value of the ViewDependencies field in TableInfo_SdkV2. +func (o *TableInfo_SdkV2) SetViewDependencies(ctx context.Context, v DependencyList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view_dependencies"] + o.ViewDependencies = types.ListValueMust(t, vs) +} + +type TableRowFilter_SdkV2 struct { + // The full name of the row filter SQL UDF. + FunctionName types.String `tfsdk:"function_name" tf:""` + // The list of table columns to be passed as input to the row filter + // function. The column types should match the types of the filter function + // arguments. + InputColumnNames types.List `tfsdk:"input_column_names" tf:""` +} + +func (newState *TableRowFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableRowFilter_SdkV2) { +} + +func (newState *TableRowFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableRowFilter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableRowFilter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableRowFilter_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "input_column_names": 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, TableRowFilter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableRowFilter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "function_name": o.FunctionName, + "input_column_names": o.InputColumnNames, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableRowFilter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "function_name": types.StringType, + "input_column_names": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetInputColumnNames returns the value of the InputColumnNames field in TableRowFilter_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TableRowFilter_SdkV2) GetInputColumnNames(ctx context.Context) ([]types.String, bool) { + if o.InputColumnNames.IsNull() || o.InputColumnNames.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InputColumnNames.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInputColumnNames sets the value of the InputColumnNames field in TableRowFilter_SdkV2. +func (o *TableRowFilter_SdkV2) SetInputColumnNames(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["input_column_names"] + t = t.(attr.TypeWithElementType).ElementType() + o.InputColumnNames = types.ListValueMust(t, vs) +} + +type TableSummary_SdkV2 struct { + // The full name of the table. + FullName types.String `tfsdk:"full_name" tf:"optional"` + + TableType types.String `tfsdk:"table_type" tf:"optional"` +} + +func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSummary_SdkV2) { +} + +func (newState *TableSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSummary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSummary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, TableSummary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableSummary_SdkV2) 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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableSummary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "table_type": types.StringType, + }, + } +} + +type TemporaryCredentials_SdkV2 struct { + // AWS temporary credentials for API authentication. Read more at + // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. + AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + // Azure Active Directory token, essentially the Oauth token for Azure + // Service Principal or Managed Identity. Read more at + // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token + AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + // Server time when the credential will expire, in epoch milliseconds. The + // API client is advised to cache the credential given this expiration time. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` +} + +func (newState *TemporaryCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TemporaryCredentials_SdkV2) { +} + +func (newState *TemporaryCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState TemporaryCredentials_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TemporaryCredentials. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TemporaryCredentials_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_temp_credentials": reflect.TypeOf(AwsCredentials_SdkV2{}), + "azure_aad": reflect.TypeOf(AzureActiveDirectoryToken_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, TemporaryCredentials_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TemporaryCredentials_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_temp_credentials": o.AwsTempCredentials, + "azure_aad": o.AzureAad, + "expiration_time": o.ExpirationTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TemporaryCredentials_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_temp_credentials": basetypes.ListType{ + ElemType: AwsCredentials{}.Type(ctx), + }, + "azure_aad": basetypes.ListType{ + ElemType: AzureActiveDirectoryToken{}.Type(ctx), + }, + "expiration_time": types.Int64Type, + }, + } +} + +// GetAwsTempCredentials returns the value of the AwsTempCredentials field in TemporaryCredentials_SdkV2 as +// a AwsCredentials_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TemporaryCredentials_SdkV2) GetAwsTempCredentials(ctx context.Context) (AwsCredentials_SdkV2, bool) { + var e AwsCredentials_SdkV2 + if o.AwsTempCredentials.IsNull() || o.AwsTempCredentials.IsUnknown() { + return e, false + } + var v []AwsCredentials_SdkV2 + d := o.AwsTempCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsTempCredentials sets the value of the AwsTempCredentials field in TemporaryCredentials_SdkV2. +func (o *TemporaryCredentials_SdkV2) SetAwsTempCredentials(ctx context.Context, v AwsCredentials_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_temp_credentials"] + o.AwsTempCredentials = types.ListValueMust(t, vs) +} + +// GetAzureAad returns the value of the AzureAad field in TemporaryCredentials_SdkV2 as +// a AzureActiveDirectoryToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TemporaryCredentials_SdkV2) GetAzureAad(ctx context.Context) (AzureActiveDirectoryToken_SdkV2, bool) { + var e AzureActiveDirectoryToken_SdkV2 + if o.AzureAad.IsNull() || o.AzureAad.IsUnknown() { + return e, false + } + var v []AzureActiveDirectoryToken_SdkV2 + d := o.AzureAad.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAad sets the value of the AzureAad field in TemporaryCredentials_SdkV2. +func (o *TemporaryCredentials_SdkV2) SetAzureAad(ctx context.Context, v AzureActiveDirectoryToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_aad"] + o.AzureAad = types.ListValueMust(t, vs) +} + +// Detailed status of an online table. Shown if the online table is in the +// ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. +type TriggeredUpdateStatus_SdkV2 struct { + // The last source table Delta version that was synced to the online table. + // Note that this Delta version may not be completely synced to the online + // table yet. + LastProcessedCommitVersion types.Int64 `tfsdk:"last_processed_commit_version" tf:"optional"` + // The timestamp of the last time any data was synchronized from the source + // table to the online table. + Timestamp types.String `tfsdk:"timestamp" tf:"optional"` + // Progress of the active data synchronization pipeline. + TriggeredUpdateProgress types.List `tfsdk:"triggered_update_progress" tf:"optional,object"` +} + +func (newState *TriggeredUpdateStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggeredUpdateStatus_SdkV2) { +} + +func (newState *TriggeredUpdateStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggeredUpdateStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggeredUpdateStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TriggeredUpdateStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "triggered_update_progress": reflect.TypeOf(PipelineProgress_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, TriggeredUpdateStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TriggeredUpdateStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + "triggered_update_progress": o.TriggeredUpdateProgress, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TriggeredUpdateStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "last_processed_commit_version": types.Int64Type, + "timestamp": types.StringType, + "triggered_update_progress": basetypes.ListType{ + ElemType: PipelineProgress{}.Type(ctx), + }, + }, + } +} + +// GetTriggeredUpdateProgress returns the value of the TriggeredUpdateProgress field in TriggeredUpdateStatus_SdkV2 as +// a PipelineProgress_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TriggeredUpdateStatus_SdkV2) GetTriggeredUpdateProgress(ctx context.Context) (PipelineProgress_SdkV2, bool) { + var e PipelineProgress_SdkV2 + if o.TriggeredUpdateProgress.IsNull() || o.TriggeredUpdateProgress.IsUnknown() { + return e, false + } + var v []PipelineProgress_SdkV2 + d := o.TriggeredUpdateProgress.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTriggeredUpdateProgress sets the value of the TriggeredUpdateProgress field in TriggeredUpdateStatus_SdkV2. +func (o *TriggeredUpdateStatus_SdkV2) SetTriggeredUpdateProgress(ctx context.Context, v PipelineProgress_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["triggered_update_progress"] + o.TriggeredUpdateProgress = types.ListValueMust(t, vs) +} + +// Delete an assignment +type UnassignRequest_SdkV2 struct { + // Query for the ID of the metastore to delete. + MetastoreId types.String `tfsdk:"-"` + // A workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *UnassignRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignRequest_SdkV2) { +} + +func (newState *UnassignRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnassignRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnassignRequest_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, UnassignRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnassignRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UnassignRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type UnassignResponse_SdkV2 struct { +} + +func (newState *UnassignResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnassignResponse_SdkV2) { +} + +func (newState *UnassignResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnassignResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UnassignResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnassignResponse_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, UnassignResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnassignResponse_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 UnassignResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateAssignmentResponse_SdkV2 struct { +} + +func (newState *UpdateAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAssignmentResponse_SdkV2) { +} + +func (newState *UpdateAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAssignmentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAssignmentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAssignmentResponse_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, UpdateAssignmentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAssignmentResponse_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 UpdateAssignmentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateCatalog_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + // Whether the current securable is accessible from all workspaces or a + // specific set of workspaces. + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // The name of the catalog. + Name types.String `tfsdk:"-"` + // New name for the catalog. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of current owner of catalog. + Owner types.String `tfsdk:"owner" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` +} + +func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCatalog_SdkV2) { +} + +func (newState *UpdateCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCatalog_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCatalog_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "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, UpdateCatalog_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCatalog_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "enable_predictive_optimization": o.EnablePredictiveOptimization, + "isolation_mode": o.IsolationMode, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "properties": o.Properties, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCatalog_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "enable_predictive_optimization": types.StringType, + "isolation_mode": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetProperties returns the value of the Properties field in UpdateCatalog_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 *UpdateCatalog_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 UpdateCatalog_SdkV2. +func (o *UpdateCatalog_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) +} + +type UpdateConnection_SdkV2 struct { + // Name of the connection. + Name types.String `tfsdk:"-"` + // New name for the connection. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // A map of key-value properties attached to the securable. + Options types.Map `tfsdk:"options" tf:""` + // Username of current owner of the connection. + Owner types.String `tfsdk:"owner" tf:"optional"` +} + +func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateConnection_SdkV2) { +} + +func (newState *UpdateConnection_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateConnection_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateConnection_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": 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, UpdateConnection_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateConnection_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "new_name": o.NewName, + "options": o.Options, + "owner": o.Owner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateConnection_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "new_name": types.StringType, + "options": basetypes.MapType{ + ElemType: types.StringType, + }, + "owner": types.StringType, + }, + } +} + +// GetOptions returns the value of the Options field in UpdateConnection_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 *UpdateConnection_SdkV2) GetOptions(ctx context.Context) (map[string]types.String, bool) { + if o.Options.IsNull() || o.Options.IsUnknown() { + return nil, false + } + var v map[string]types.String + 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 UpdateConnection_SdkV2. +func (o *UpdateConnection_SdkV2) SetOptions(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["options"] + t = t.(attr.TypeWithElementType).ElementType() + o.Options = types.MapValueMust(t, vs) +} + +type UpdateCredentialRequest_SdkV2 struct { + // The AWS IAM role configuration + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. Only applicable when purpose + // is **STORAGE**. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // GCP long-lived credential. Databricks-created Google Cloud Storage + // service account. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // Force an update even if there are dependent services (when purpose is + // **SERVICE**) or dependent external locations and external tables (when + // purpose is **STORAGE**). + Force types.Bool `tfsdk:"force" tf:"optional"` + // Whether the current securable is accessible from all workspaces or a + // specific set of workspaces. + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Name of the credential. + NameArg types.String `tfsdk:"-"` + // New name of credential. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of current owner of credential. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Supply true to this argument to skip validation of the updated + // credential. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` +} + +func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialRequest_SdkV2) { +} + +func (newState *UpdateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRole_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentity_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccount_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, UpdateCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "comment": o.Comment, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "force": o.Force, + "isolation_mode": o.IsolationMode, + "name_arg": o.NameArg, + "new_name": o.NewName, + "owner": o.Owner, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRole{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentity{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "comment": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + }, + "force": types.BoolType, + "isolation_mode": types.StringType, + "name_arg": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in UpdateCredentialRequest_SdkV2 as +// a AwsIamRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCredentialRequest_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRole_SdkV2, bool) { + var e AwsIamRole_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRole_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in UpdateCredentialRequest_SdkV2. +func (o *UpdateCredentialRequest_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in UpdateCredentialRequest_SdkV2 as +// a AzureManagedIdentity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCredentialRequest_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentity_SdkV2, bool) { + var e AzureManagedIdentity_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentity_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in UpdateCredentialRequest_SdkV2. +func (o *UpdateCredentialRequest_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in UpdateCredentialRequest_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCredentialRequest_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in UpdateCredentialRequest_SdkV2. +func (o *UpdateCredentialRequest_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in UpdateCredentialRequest_SdkV2 as +// a DatabricksGcpServiceAccount_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCredentialRequest_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccount_SdkV2, bool) { + var e DatabricksGcpServiceAccount_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccount_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in UpdateCredentialRequest_SdkV2. +func (o *UpdateCredentialRequest_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +type UpdateExternalLocation_SdkV2 struct { + // The AWS access point to use when accesing s3 for this external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the storage credential used with this location. + CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + // Indicates whether fallback mode is enabled for this external location. + // When fallback mode is enabled, the access to the location falls back to + // cluster credentials if UC credentials are not sufficient. + Fallback types.Bool `tfsdk:"fallback" tf:"optional"` + // Force update even if changing url invalidates dependent external tables + // or mounts. + Force types.Bool `tfsdk:"force" tf:"optional"` + + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Name of the external location. + Name types.String `tfsdk:"-"` + // New name for the external location. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // The owner of the external location. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Indicates whether the external location is read-only. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Skips validation of the storage credential associated with the external + // location. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` + // Path URL of the external location. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExternalLocation_SdkV2) { +} + +func (newState *UpdateExternalLocation_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExternalLocation_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExternalLocation_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "encryption_details": reflect.TypeOf(EncryptionDetails_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, UpdateExternalLocation_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExternalLocation_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_point": o.AccessPoint, + "comment": o.Comment, + "credential_name": o.CredentialName, + "encryption_details": o.EncryptionDetails, + "fallback": o.Fallback, + "force": o.Force, + "isolation_mode": o.IsolationMode, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExternalLocation_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_point": types.StringType, + "comment": types.StringType, + "credential_name": types.StringType, + "encryption_details": basetypes.ListType{ + ElemType: EncryptionDetails{}.Type(ctx), + }, + "fallback": types.BoolType, + "force": types.BoolType, + "isolation_mode": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + "url": types.StringType, + }, + } +} + +// GetEncryptionDetails returns the value of the EncryptionDetails field in UpdateExternalLocation_SdkV2 as +// a EncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExternalLocation_SdkV2) GetEncryptionDetails(ctx context.Context) (EncryptionDetails_SdkV2, bool) { + var e EncryptionDetails_SdkV2 + if o.EncryptionDetails.IsNull() || o.EncryptionDetails.IsUnknown() { + return e, false + } + var v []EncryptionDetails_SdkV2 + d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEncryptionDetails sets the value of the EncryptionDetails field in UpdateExternalLocation_SdkV2. +func (o *UpdateExternalLocation_SdkV2) SetEncryptionDetails(ctx context.Context, v EncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] + o.EncryptionDetails = 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" tf:"optional"` +} + +func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateFunction_SdkV2) { +} + +func (newState *UpdateFunction_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateFunction_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateFunction. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateFunction_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, UpdateFunction_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateFunction_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "owner": o.Owner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateFunction_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "owner": types.StringType, + }, + } +} + +type UpdateMetastore_SdkV2 struct { + // The organization name of a Delta Sharing entity, to be used in + // Databricks-to-Databricks Delta Sharing as the official name. + DeltaSharingOrganizationName types.String `tfsdk:"delta_sharing_organization_name" tf:"optional"` + // The lifetime of delta sharing recipient token in seconds. + DeltaSharingRecipientTokenLifetimeInSeconds types.Int64 `tfsdk:"delta_sharing_recipient_token_lifetime_in_seconds" tf:"optional"` + // The scope of Delta Sharing enabled for the metastore. + DeltaSharingScope types.String `tfsdk:"delta_sharing_scope" tf:"optional"` + // Unique ID of the metastore. + Id types.String `tfsdk:"-"` + // New name for the metastore. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // The owner of the metastore. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Privilege model version of the metastore, of the form `major.minor` + // (e.g., `1.0`). + PrivilegeModelVersion types.String `tfsdk:"privilege_model_version" tf:"optional"` + // UUID of storage credential to access the metastore storage_root. + StorageRootCredentialId types.String `tfsdk:"storage_root_credential_id" tf:"optional"` +} + +func (newState *UpdateMetastore_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMetastore_SdkV2) { +} + +func (newState *UpdateMetastore_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMetastore_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastore. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateMetastore_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, UpdateMetastore_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateMetastore_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "delta_sharing_organization_name": o.DeltaSharingOrganizationName, + "delta_sharing_recipient_token_lifetime_in_seconds": o.DeltaSharingRecipientTokenLifetimeInSeconds, + "delta_sharing_scope": o.DeltaSharingScope, + "id": o.Id, + "new_name": o.NewName, + "owner": o.Owner, + "privilege_model_version": o.PrivilegeModelVersion, + "storage_root_credential_id": o.StorageRootCredentialId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateMetastore_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "delta_sharing_organization_name": types.StringType, + "delta_sharing_recipient_token_lifetime_in_seconds": types.Int64Type, + "delta_sharing_scope": types.StringType, + "id": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "privilege_model_version": types.StringType, + "storage_root_credential_id": types.StringType, + }, + } +} + +type UpdateMetastoreAssignment_SdkV2 struct { + // The name of the default catalog in the metastore. This field is + // depracted. Please use "Default Namespace API" to configure the default + // catalog for a Databricks workspace. + DefaultCatalogName types.String `tfsdk:"default_catalog_name" tf:"optional"` + // The unique ID of the metastore. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // A workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *UpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMetastoreAssignment_SdkV2) { +} + +func (newState *UpdateMetastoreAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMetastoreAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMetastoreAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateMetastoreAssignment_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, UpdateMetastoreAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateMetastoreAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default_catalog_name": types.StringType, + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type UpdateModelVersionRequest_SdkV2 struct { + // The comment attached to the model version + Comment types.String `tfsdk:"comment" tf:"optional"` + // The three-level (fully qualified) name of the model version + FullName types.String `tfsdk:"-"` + // The integer version number of the model version + Version types.Int64 `tfsdk:"-"` +} + +func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest_SdkV2) { +} + +func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateModelVersionRequest_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, UpdateModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "full_name": o.FullName, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "full_name": types.StringType, + "version": types.Int64Type, + }, + } +} + +type UpdateMonitor_SdkV2 struct { + // Name of the baseline table from which drift metrics are computed from. + // Columns in the monitored table should also be present in the baseline + // table. + BaselineTableName types.String `tfsdk:"baseline_table_name" tf:"optional"` + // Custom metrics to compute on the monitored table. These can be aggregate + // metrics, derived metrics (from already computed aggregate metrics), or + // drift metrics (comparing metrics across time windows). + CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` + // Id of dashboard that visualizes the computed metrics. This can be empty + // if the monitor is in PENDING state. + DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` + // The data classification config for the monitor. + DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + // Configuration for monitoring inference logs. + InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + // The notification settings for the monitor. + Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + // Schema where output metric tables are created. + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` + // The schedule for automatically updating and refreshing metric tables. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // List of column expressions to slice data with for targeted analysis. The + // data is grouped by each expression independently, resulting in a separate + // slice for each predicate and its complements. For high-cardinality + // columns, only the top 100 unique values by frequency will generate + // slices. + SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` + // Configuration for monitoring snapshot tables. + Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + // Full name of the table. + TableName types.String `tfsdk:"-"` + // Configuration for monitoring time series tables. + TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` +} + +func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor_SdkV2) { +} + +func (newState *UpdateMonitor_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateMonitor_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateMonitor. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateMonitor_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_metrics": reflect.TypeOf(MonitorMetric_SdkV2{}), + "data_classification_config": reflect.TypeOf(MonitorDataClassificationConfig_SdkV2{}), + "inference_log": reflect.TypeOf(MonitorInferenceLog_SdkV2{}), + "notifications": reflect.TypeOf(MonitorNotifications_SdkV2{}), + "schedule": reflect.TypeOf(MonitorCronSchedule_SdkV2{}), + "slicing_exprs": reflect.TypeOf(types.String{}), + "snapshot": reflect.TypeOf(MonitorSnapshot_SdkV2{}), + "time_series": reflect.TypeOf(MonitorTimeSeries_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, UpdateMonitor_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateMonitor_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "baseline_table_name": o.BaselineTableName, + "custom_metrics": o.CustomMetrics, + "dashboard_id": o.DashboardId, + "data_classification_config": o.DataClassificationConfig, + "inference_log": o.InferenceLog, + "notifications": o.Notifications, + "output_schema_name": o.OutputSchemaName, + "schedule": o.Schedule, + "slicing_exprs": o.SlicingExprs, + "snapshot": o.Snapshot, + "table_name": o.TableName, + "time_series": o.TimeSeries, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateMonitor_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "baseline_table_name": types.StringType, + "custom_metrics": basetypes.ListType{ + ElemType: MonitorMetric{}.Type(ctx), + }, + "dashboard_id": types.StringType, + "data_classification_config": basetypes.ListType{ + ElemType: MonitorDataClassificationConfig{}.Type(ctx), + }, + "inference_log": basetypes.ListType{ + ElemType: MonitorInferenceLog{}.Type(ctx), + }, + "notifications": basetypes.ListType{ + ElemType: MonitorNotifications{}.Type(ctx), + }, + "output_schema_name": types.StringType, + "schedule": basetypes.ListType{ + ElemType: MonitorCronSchedule{}.Type(ctx), + }, + "slicing_exprs": basetypes.ListType{ + ElemType: types.StringType, + }, + "snapshot": basetypes.ListType{ + ElemType: MonitorSnapshot{}.Type(ctx), + }, + "table_name": types.StringType, + "time_series": basetypes.ListType{ + ElemType: MonitorTimeSeries{}.Type(ctx), + }, + }, + } +} + +// GetCustomMetrics returns the value of the CustomMetrics field in UpdateMonitor_SdkV2 as +// a slice of MonitorMetric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetCustomMetrics(ctx context.Context) ([]MonitorMetric_SdkV2, bool) { + if o.CustomMetrics.IsNull() || o.CustomMetrics.IsUnknown() { + return nil, false + } + var v []MonitorMetric_SdkV2 + d := o.CustomMetrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomMetrics sets the value of the CustomMetrics field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetCustomMetrics(ctx context.Context, v []MonitorMetric_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["custom_metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomMetrics = types.ListValueMust(t, vs) +} + +// GetDataClassificationConfig returns the value of the DataClassificationConfig field in UpdateMonitor_SdkV2 as +// a MonitorDataClassificationConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetDataClassificationConfig(ctx context.Context) (MonitorDataClassificationConfig_SdkV2, bool) { + var e MonitorDataClassificationConfig_SdkV2 + if o.DataClassificationConfig.IsNull() || o.DataClassificationConfig.IsUnknown() { + return e, false + } + var v []MonitorDataClassificationConfig_SdkV2 + d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataClassificationConfig sets the value of the DataClassificationConfig field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] + o.DataClassificationConfig = types.ListValueMust(t, vs) +} + +// GetInferenceLog returns the value of the InferenceLog field in UpdateMonitor_SdkV2 as +// a MonitorInferenceLog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetInferenceLog(ctx context.Context) (MonitorInferenceLog_SdkV2, bool) { + var e MonitorInferenceLog_SdkV2 + if o.InferenceLog.IsNull() || o.InferenceLog.IsUnknown() { + return e, false + } + var v []MonitorInferenceLog_SdkV2 + d := o.InferenceLog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceLog sets the value of the InferenceLog field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetInferenceLog(ctx context.Context, v MonitorInferenceLog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] + o.InferenceLog = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in UpdateMonitor_SdkV2 as +// a MonitorNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetNotifications(ctx context.Context) (MonitorNotifications_SdkV2, bool) { + var e MonitorNotifications_SdkV2 + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return e, false + } + var v []MonitorNotifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotifications sets the value of the Notifications field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetNotifications(ctx context.Context, v MonitorNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] + o.Notifications = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in UpdateMonitor_SdkV2 as +// a MonitorCronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetSchedule(ctx context.Context) (MonitorCronSchedule_SdkV2, bool) { + var e MonitorCronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []MonitorCronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetSchedule(ctx context.Context, v MonitorCronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetSlicingExprs returns the value of the SlicingExprs field in UpdateMonitor_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetSlicingExprs(ctx context.Context) ([]types.String, bool) { + if o.SlicingExprs.IsNull() || o.SlicingExprs.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SlicingExprs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSlicingExprs sets the value of the SlicingExprs field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetSlicingExprs(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["slicing_exprs"] + t = t.(attr.TypeWithElementType).ElementType() + o.SlicingExprs = types.ListValueMust(t, vs) +} + +// GetSnapshot returns the value of the Snapshot field in UpdateMonitor_SdkV2 as +// a MonitorSnapshot_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetSnapshot(ctx context.Context) (MonitorSnapshot_SdkV2, bool) { + var e MonitorSnapshot_SdkV2 + if o.Snapshot.IsNull() || o.Snapshot.IsUnknown() { + return e, false + } + var v []MonitorSnapshot_SdkV2 + d := o.Snapshot.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSnapshot sets the value of the Snapshot field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetSnapshot(ctx context.Context, v MonitorSnapshot_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] + o.Snapshot = types.ListValueMust(t, vs) +} + +// GetTimeSeries returns the value of the TimeSeries field in UpdateMonitor_SdkV2 as +// a MonitorTimeSeries_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateMonitor_SdkV2) GetTimeSeries(ctx context.Context) (MonitorTimeSeries_SdkV2, bool) { + var e MonitorTimeSeries_SdkV2 + if o.TimeSeries.IsNull() || o.TimeSeries.IsUnknown() { + return e, false + } + var v []MonitorTimeSeries_SdkV2 + d := o.TimeSeries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTimeSeries sets the value of the TimeSeries field in UpdateMonitor_SdkV2. +func (o *UpdateMonitor_SdkV2) SetTimeSeries(ctx context.Context, v MonitorTimeSeries_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] + o.TimeSeries = types.ListValueMust(t, vs) +} + +type UpdatePermissions_SdkV2 struct { + // Array of permissions change objects. + Changes types.List `tfsdk:"changes" tf:"optional"` + // Full name of securable. + FullName types.String `tfsdk:"-"` + // Type of securable. + SecurableType types.String `tfsdk:"-"` +} + +func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissions_SdkV2) { +} + +func (newState *UpdatePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePermissions_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "changes": reflect.TypeOf(PermissionsChange_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, UpdatePermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "changes": o.Changes, + "full_name": o.FullName, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdatePermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "changes": basetypes.ListType{ + ElemType: PermissionsChange{}.Type(ctx), + }, + "full_name": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// GetChanges returns the value of the Changes field in UpdatePermissions_SdkV2 as +// a slice of PermissionsChange_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdatePermissions_SdkV2) GetChanges(ctx context.Context) ([]PermissionsChange_SdkV2, bool) { + if o.Changes.IsNull() || o.Changes.IsUnknown() { + return nil, false + } + var v []PermissionsChange_SdkV2 + d := o.Changes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChanges sets the value of the Changes field in UpdatePermissions_SdkV2. +func (o *UpdatePermissions_SdkV2) SetChanges(ctx context.Context, v []PermissionsChange_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["changes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Changes = types.ListValueMust(t, vs) +} + +type UpdateRegisteredModelRequest_SdkV2 struct { + // The comment attached to the registered model + Comment types.String `tfsdk:"comment" tf:"optional"` + // The three-level (fully qualified) name of the registered model + FullName types.String `tfsdk:"-"` + // New name for the registered model. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // The identifier of the user who owns the registered model + Owner types.String `tfsdk:"owner" tf:"optional"` +} + +func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegisteredModelRequest_SdkV2) { +} + +func (newState *UpdateRegisteredModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegisteredModelRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRegisteredModelRequest_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, UpdateRegisteredModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRegisteredModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "full_name": o.FullName, + "new_name": o.NewName, + "owner": o.Owner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRegisteredModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "full_name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + }, + } +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateSchema_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Whether predictive optimization should be enabled for this object and + // objects under it. + EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` + // Full name of the schema. + FullName types.String `tfsdk:"-"` + // New name for the schema. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of current owner of schema. + Owner types.String `tfsdk:"owner" tf:"optional"` + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:"optional"` +} + +func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSchema_SdkV2) { +} + +func (newState *UpdateSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSchema_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateSchema_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "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, UpdateSchema_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateSchema_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "enable_predictive_optimization": o.EnablePredictiveOptimization, + "full_name": o.FullName, + "new_name": o.NewName, + "owner": o.Owner, + "properties": o.Properties, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateSchema_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "enable_predictive_optimization": types.StringType, + "full_name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetProperties returns the value of the Properties field in UpdateSchema_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 *UpdateSchema_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 UpdateSchema_SdkV2. +func (o *UpdateSchema_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) +} + +type UpdateStorageCredential_SdkV2 struct { + // The AWS IAM role configuration. + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // The Cloudflare API token configuration. + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + // Comment associated with the credential. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The Databricks managed GCP service account configuration. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // Force update even if there are dependent external locations or external + // tables. + Force types.Bool `tfsdk:"force" tf:"optional"` + + IsolationMode types.String `tfsdk:"isolation_mode" tf:"optional"` + // Name of the storage credential. + Name types.String `tfsdk:"-"` + // New name for the storage credential. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of current owner of credential. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Whether the storage credential is only usable for read operations. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // Supplying true to this argument skips validation of the updated + // credential. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` +} + +func (newState *UpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStorageCredential_SdkV2) { +} + +func (newState *UpdateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateStorageCredential_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStorageCredential. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateStorageCredential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRoleRequest_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentityResponse_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountRequest_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, UpdateStorageCredential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateStorageCredential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "cloudflare_api_token": o.CloudflareApiToken, + "comment": o.Comment, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "force": o.Force, + "isolation_mode": o.IsolationMode, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRoleRequest{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentityResponse{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "cloudflare_api_token": basetypes.ListType{ + ElemType: CloudflareApiToken{}.Type(ctx), + }, + "comment": types.StringType, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + }, + "force": types.BoolType, + "isolation_mode": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in UpdateStorageCredential_SdkV2 as +// a AwsIamRoleRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateStorageCredential_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRoleRequest_SdkV2, bool) { + var e AwsIamRoleRequest_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRoleRequest_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in UpdateStorageCredential_SdkV2. +func (o *UpdateStorageCredential_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in UpdateStorageCredential_SdkV2 as +// a AzureManagedIdentityResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateStorageCredential_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentityResponse_SdkV2, bool) { + var e AzureManagedIdentityResponse_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentityResponse_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in UpdateStorageCredential_SdkV2. +func (o *UpdateStorageCredential_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityResponse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in UpdateStorageCredential_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateStorageCredential_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in UpdateStorageCredential_SdkV2. +func (o *UpdateStorageCredential_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetCloudflareApiToken returns the value of the CloudflareApiToken field in UpdateStorageCredential_SdkV2 as +// a CloudflareApiToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateStorageCredential_SdkV2) GetCloudflareApiToken(ctx context.Context) (CloudflareApiToken_SdkV2, bool) { + var e CloudflareApiToken_SdkV2 + if o.CloudflareApiToken.IsNull() || o.CloudflareApiToken.IsUnknown() { + return e, false + } + var v []CloudflareApiToken_SdkV2 + d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudflareApiToken sets the value of the CloudflareApiToken field in UpdateStorageCredential_SdkV2. +func (o *UpdateStorageCredential_SdkV2) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] + o.CloudflareApiToken = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in UpdateStorageCredential_SdkV2 as +// a DatabricksGcpServiceAccountRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateStorageCredential_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccountRequest_SdkV2, bool) { + var e DatabricksGcpServiceAccountRequest_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccountRequest_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in UpdateStorageCredential_SdkV2. +func (o *UpdateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +// Update a table owner. +type UpdateTableRequest_SdkV2 struct { + // Full name of the table. + FullName types.String `tfsdk:"-"` + + Owner types.String `tfsdk:"owner" tf:"optional"` +} + +func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateTableRequest_SdkV2) { +} + +func (newState *UpdateTableRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateTableRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateTableRequest_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, UpdateTableRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateTableRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_name": o.FullName, + "owner": o.Owner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateTableRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_name": types.StringType, + "owner": types.StringType, + }, + } +} + +type UpdateVolumeRequestContent_SdkV2 struct { + // The comment attached to the volume + Comment types.String `tfsdk:"comment" tf:"optional"` + // The three-level (fully qualified) name of the volume + Name types.String `tfsdk:"-"` + // New name for the volume. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // The identifier of the user who owns the volume + Owner types.String `tfsdk:"owner" tf:"optional"` +} + +func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVolumeRequestContent_SdkV2) { +} + +func (newState *UpdateVolumeRequestContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVolumeRequestContent_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateVolumeRequestContent_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, UpdateVolumeRequestContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateVolumeRequestContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateVolumeRequestContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + }, + } +} + +type UpdateWorkspaceBindings_SdkV2 struct { + // A list of workspace IDs. + AssignWorkspaces types.List `tfsdk:"assign_workspaces" tf:"optional"` + // The name of the catalog. + Name types.String `tfsdk:"-"` + // A list of workspace IDs. + UnassignWorkspaces types.List `tfsdk:"unassign_workspaces" tf:"optional"` +} + +func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindings_SdkV2) { +} + +func (newState *UpdateWorkspaceBindings_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindings_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateWorkspaceBindings_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assign_workspaces": reflect.TypeOf(types.Int64{}), + "unassign_workspaces": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, UpdateWorkspaceBindings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceBindings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assign_workspaces": o.AssignWorkspaces, + "name": o.Name, + "unassign_workspaces": o.UnassignWorkspaces, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWorkspaceBindings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assign_workspaces": basetypes.ListType{ + ElemType: types.Int64Type, + }, + "name": types.StringType, + "unassign_workspaces": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetAssignWorkspaces returns the value of the AssignWorkspaces field in UpdateWorkspaceBindings_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWorkspaceBindings_SdkV2) GetAssignWorkspaces(ctx context.Context) ([]types.Int64, bool) { + if o.AssignWorkspaces.IsNull() || o.AssignWorkspaces.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.AssignWorkspaces.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssignWorkspaces sets the value of the AssignWorkspaces field in UpdateWorkspaceBindings_SdkV2. +func (o *UpdateWorkspaceBindings_SdkV2) SetAssignWorkspaces(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["assign_workspaces"] + t = t.(attr.TypeWithElementType).ElementType() + o.AssignWorkspaces = types.ListValueMust(t, vs) +} + +// GetUnassignWorkspaces returns the value of the UnassignWorkspaces field in UpdateWorkspaceBindings_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWorkspaceBindings_SdkV2) GetUnassignWorkspaces(ctx context.Context) ([]types.Int64, bool) { + if o.UnassignWorkspaces.IsNull() || o.UnassignWorkspaces.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.UnassignWorkspaces.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUnassignWorkspaces sets the value of the UnassignWorkspaces field in UpdateWorkspaceBindings_SdkV2. +func (o *UpdateWorkspaceBindings_SdkV2) SetUnassignWorkspaces(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["unassign_workspaces"] + t = t.(attr.TypeWithElementType).ElementType() + o.UnassignWorkspaces = types.ListValueMust(t, vs) +} + +type UpdateWorkspaceBindingsParameters_SdkV2 struct { + // List of workspace bindings + Add types.List `tfsdk:"add" tf:"optional"` + // List of workspace bindings + Remove types.List `tfsdk:"remove" tf:"optional"` + // The name of the securable. + SecurableName types.String `tfsdk:"-"` + // The type of the securable to bind to a workspace. + SecurableType types.String `tfsdk:"-"` +} + +func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceBindingsParameters_SdkV2) { +} + +func (newState *UpdateWorkspaceBindingsParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceBindingsParameters_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateWorkspaceBindingsParameters_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "add": reflect.TypeOf(WorkspaceBinding_SdkV2{}), + "remove": reflect.TypeOf(WorkspaceBinding_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, UpdateWorkspaceBindingsParameters_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceBindingsParameters_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "add": o.Add, + "remove": o.Remove, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWorkspaceBindingsParameters_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "add": basetypes.ListType{ + ElemType: WorkspaceBinding{}.Type(ctx), + }, + "remove": basetypes.ListType{ + ElemType: WorkspaceBinding{}.Type(ctx), + }, + "securable_name": types.StringType, + "securable_type": types.StringType, + }, + } +} + +// GetAdd returns the value of the Add field in UpdateWorkspaceBindingsParameters_SdkV2 as +// a slice of WorkspaceBinding_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWorkspaceBindingsParameters_SdkV2) GetAdd(ctx context.Context) ([]WorkspaceBinding_SdkV2, bool) { + if o.Add.IsNull() || o.Add.IsUnknown() { + return nil, false + } + var v []WorkspaceBinding_SdkV2 + d := o.Add.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAdd sets the value of the Add field in UpdateWorkspaceBindingsParameters_SdkV2. +func (o *UpdateWorkspaceBindingsParameters_SdkV2) SetAdd(ctx context.Context, v []WorkspaceBinding_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["add"] + t = t.(attr.TypeWithElementType).ElementType() + o.Add = types.ListValueMust(t, vs) +} + +// GetRemove returns the value of the Remove field in UpdateWorkspaceBindingsParameters_SdkV2 as +// a slice of WorkspaceBinding_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWorkspaceBindingsParameters_SdkV2) GetRemove(ctx context.Context) ([]WorkspaceBinding_SdkV2, bool) { + if o.Remove.IsNull() || o.Remove.IsUnknown() { + return nil, false + } + var v []WorkspaceBinding_SdkV2 + d := o.Remove.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRemove sets the value of the Remove field in UpdateWorkspaceBindingsParameters_SdkV2. +func (o *UpdateWorkspaceBindingsParameters_SdkV2) SetRemove(ctx context.Context, v []WorkspaceBinding_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["remove"] + t = t.(attr.TypeWithElementType).ElementType() + o.Remove = types.ListValueMust(t, vs) +} + +type ValidateCredentialRequest_SdkV2 struct { + // The AWS IAM role configuration + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // Required. The name of an existing credential or long-lived cloud + // credential to validate. + CredentialName types.String `tfsdk:"credential_name" tf:"optional"` + // The name of an existing external location to validate. Only applicable + // for storage credentials (purpose is **STORAGE**.) + ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + // The purpose of the credential. This should only be used when the + // credential is specified. + Purpose types.String `tfsdk:"purpose" tf:"optional"` + // Whether the credential is only usable for read operations. Only + // applicable for storage credentials (purpose is **STORAGE**.) + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // The external location url to validate. Only applicable when purpose is + // **STORAGE**. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialRequest_SdkV2) { +} + +func (newState *ValidateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ValidateCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRole_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentity_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, ValidateCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ValidateCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "credential_name": o.CredentialName, + "external_location_name": o.ExternalLocationName, + "purpose": o.Purpose, + "read_only": o.ReadOnly, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ValidateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRole{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentity{}.Type(ctx), + }, + "credential_name": types.StringType, + "external_location_name": types.StringType, + "purpose": types.StringType, + "read_only": types.BoolType, + "url": types.StringType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in ValidateCredentialRequest_SdkV2 as +// a AwsIamRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateCredentialRequest_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRole_SdkV2, bool) { + var e AwsIamRole_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRole_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in ValidateCredentialRequest_SdkV2. +func (o *ValidateCredentialRequest_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in ValidateCredentialRequest_SdkV2 as +// a AzureManagedIdentity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateCredentialRequest_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentity_SdkV2, bool) { + var e AzureManagedIdentity_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentity_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in ValidateCredentialRequest_SdkV2. +func (o *ValidateCredentialRequest_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +type ValidateCredentialResponse_SdkV2 struct { + // Whether the tested location is a directory in cloud storage. Only + // applicable for when purpose is **STORAGE**. + IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + // The results of the validation check. + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ValidateCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateCredentialResponse_SdkV2) { +} + +func (newState *ValidateCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateCredentialResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateCredentialResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ValidateCredentialResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(CredentialValidationResult_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, ValidateCredentialResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ValidateCredentialResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "isDir": o.IsDir, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ValidateCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "isDir": types.BoolType, + "results": basetypes.ListType{ + ElemType: CredentialValidationResult{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ValidateCredentialResponse_SdkV2 as +// a slice of CredentialValidationResult_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateCredentialResponse_SdkV2) GetResults(ctx context.Context) ([]CredentialValidationResult_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []CredentialValidationResult_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ValidateCredentialResponse_SdkV2. +func (o *ValidateCredentialResponse_SdkV2) SetResults(ctx context.Context, v []CredentialValidationResult_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +type ValidateStorageCredential_SdkV2 struct { + // The AWS IAM role configuration. + AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + // The Azure managed identity configuration. + AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + // The Azure service principal configuration. + AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + // The Cloudflare API token configuration. + CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + // The Databricks created GCP service account configuration. + DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + // The name of an existing external location to validate. + ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` + // Whether the storage credential is only usable for read operations. + ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` + // The name of the storage credential to validate. + StorageCredentialName types.String `tfsdk:"storage_credential_name" tf:"optional"` + // The external location url to validate. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredential_SdkV2) { +} + +func (newState *ValidateStorageCredential_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredential_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ValidateStorageCredential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_iam_role": reflect.TypeOf(AwsIamRoleRequest_SdkV2{}), + "azure_managed_identity": reflect.TypeOf(AzureManagedIdentityRequest_SdkV2{}), + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal_SdkV2{}), + "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken_SdkV2{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountRequest_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, ValidateStorageCredential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ValidateStorageCredential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "cloudflare_api_token": o.CloudflareApiToken, + "databricks_gcp_service_account": o.DatabricksGcpServiceAccount, + "external_location_name": o.ExternalLocationName, + "read_only": o.ReadOnly, + "storage_credential_name": o.StorageCredentialName, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ValidateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_iam_role": basetypes.ListType{ + ElemType: AwsIamRoleRequest{}.Type(ctx), + }, + "azure_managed_identity": basetypes.ListType{ + ElemType: AzureManagedIdentityRequest{}.Type(ctx), + }, + "azure_service_principal": basetypes.ListType{ + ElemType: AzureServicePrincipal{}.Type(ctx), + }, + "cloudflare_api_token": basetypes.ListType{ + ElemType: CloudflareApiToken{}.Type(ctx), + }, + "databricks_gcp_service_account": basetypes.ListType{ + ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + }, + "external_location_name": types.StringType, + "read_only": types.BoolType, + "storage_credential_name": types.StringType, + "url": types.StringType, + }, + } +} + +// GetAwsIamRole returns the value of the AwsIamRole field in ValidateStorageCredential_SdkV2 as +// a AwsIamRoleRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredential_SdkV2) GetAwsIamRole(ctx context.Context) (AwsIamRoleRequest_SdkV2, bool) { + var e AwsIamRoleRequest_SdkV2 + if o.AwsIamRole.IsNull() || o.AwsIamRole.IsUnknown() { + return e, false + } + var v []AwsIamRoleRequest_SdkV2 + d := o.AwsIamRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsIamRole sets the value of the AwsIamRole field in ValidateStorageCredential_SdkV2. +func (o *ValidateStorageCredential_SdkV2) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] + o.AwsIamRole = types.ListValueMust(t, vs) +} + +// GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in ValidateStorageCredential_SdkV2 as +// a AzureManagedIdentityRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredential_SdkV2) GetAzureManagedIdentity(ctx context.Context) (AzureManagedIdentityRequest_SdkV2, bool) { + var e AzureManagedIdentityRequest_SdkV2 + if o.AzureManagedIdentity.IsNull() || o.AzureManagedIdentity.IsUnknown() { + return e, false + } + var v []AzureManagedIdentityRequest_SdkV2 + d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in ValidateStorageCredential_SdkV2. +func (o *ValidateStorageCredential_SdkV2) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] + o.AzureManagedIdentity = types.ListValueMust(t, vs) +} + +// GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in ValidateStorageCredential_SdkV2 as +// a AzureServicePrincipal_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredential_SdkV2) GetAzureServicePrincipal(ctx context.Context) (AzureServicePrincipal_SdkV2, bool) { + var e AzureServicePrincipal_SdkV2 + if o.AzureServicePrincipal.IsNull() || o.AzureServicePrincipal.IsUnknown() { + return e, false + } + var v []AzureServicePrincipal_SdkV2 + d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in ValidateStorageCredential_SdkV2. +func (o *ValidateStorageCredential_SdkV2) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] + o.AzureServicePrincipal = types.ListValueMust(t, vs) +} + +// GetCloudflareApiToken returns the value of the CloudflareApiToken field in ValidateStorageCredential_SdkV2 as +// a CloudflareApiToken_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredential_SdkV2) GetCloudflareApiToken(ctx context.Context) (CloudflareApiToken_SdkV2, bool) { + var e CloudflareApiToken_SdkV2 + if o.CloudflareApiToken.IsNull() || o.CloudflareApiToken.IsUnknown() { + return e, false + } + var v []CloudflareApiToken_SdkV2 + d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudflareApiToken sets the value of the CloudflareApiToken field in ValidateStorageCredential_SdkV2. +func (o *ValidateStorageCredential_SdkV2) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] + o.CloudflareApiToken = types.ListValueMust(t, vs) +} + +// GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in ValidateStorageCredential_SdkV2 as +// a DatabricksGcpServiceAccountRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredential_SdkV2) GetDatabricksGcpServiceAccount(ctx context.Context) (DatabricksGcpServiceAccountRequest_SdkV2, bool) { + var e DatabricksGcpServiceAccountRequest_SdkV2 + if o.DatabricksGcpServiceAccount.IsNull() || o.DatabricksGcpServiceAccount.IsUnknown() { + return e, false + } + var v []DatabricksGcpServiceAccountRequest_SdkV2 + d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in ValidateStorageCredential_SdkV2. +func (o *ValidateStorageCredential_SdkV2) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] + o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) +} + +type ValidateStorageCredentialResponse_SdkV2 struct { + // Whether the tested location is a directory in cloud storage. + IsDir types.Bool `tfsdk:"isDir" tf:"optional"` + // The results of the validation check. + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ValidateStorageCredentialResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidateStorageCredentialResponse_SdkV2) { +} + +func (newState *ValidateStorageCredentialResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidateStorageCredentialResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidateStorageCredentialResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ValidateStorageCredentialResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(ValidationResult_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, ValidateStorageCredentialResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ValidateStorageCredentialResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "isDir": o.IsDir, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ValidateStorageCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "isDir": types.BoolType, + "results": basetypes.ListType{ + ElemType: ValidationResult{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ValidateStorageCredentialResponse_SdkV2 as +// a slice of ValidationResult_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ValidateStorageCredentialResponse_SdkV2) GetResults(ctx context.Context) ([]ValidationResult_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []ValidationResult_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ValidateStorageCredentialResponse_SdkV2. +func (o *ValidateStorageCredentialResponse_SdkV2) SetResults(ctx context.Context, v []ValidationResult_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +type ValidationResult_SdkV2 struct { + // Error message would exist when the result does not equal to **PASS**. + Message types.String `tfsdk:"message" tf:"optional"` + // The operation tested. + Operation types.String `tfsdk:"operation" tf:"optional"` + // The results of the tested operation. + Result types.String `tfsdk:"result" tf:"optional"` +} + +func (newState *ValidationResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ValidationResult_SdkV2) { +} + +func (newState *ValidationResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState ValidationResult_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ValidationResult. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ValidationResult_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, ValidationResult_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ValidationResult_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "operation": o.Operation, + "result": o.Result, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ValidationResult_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "operation": types.StringType, + "result": types.StringType, + }, + } +} + +type VolumeInfo_SdkV2 struct { + // The AWS access point to use when accesing s3 for this external location. + AccessPoint types.String `tfsdk:"access_point" tf:"optional"` + // Indicates whether the principal is limited to retrieving metadata for the + // associated object through the BROWSE privilege when include_browse is + // enabled in the request. + BrowseOnly types.Bool `tfsdk:"browse_only" tf:"optional"` + // The name of the catalog where the schema and the volume are + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // The comment attached to the volume + Comment types.String `tfsdk:"comment" tf:"optional"` + + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The identifier of the user who created the volume + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Encryption options that apply to clients connecting to cloud storage. + EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + // The three-level (fully qualified) name of the volume + FullName types.String `tfsdk:"full_name" tf:"optional"` + // The unique identifier of the metastore + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The name of the volume + Name types.String `tfsdk:"name" tf:"optional"` + // The identifier of the user who owns the volume + Owner types.String `tfsdk:"owner" tf:"optional"` + // The name of the schema where the volume is + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // The storage location on the cloud + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // The identifier of the user who updated the volume last time + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + // The unique identifier of the volume + VolumeId types.String `tfsdk:"volume_id" tf:"optional"` + + VolumeType types.String `tfsdk:"volume_type" tf:"optional"` +} + +func (newState *VolumeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VolumeInfo_SdkV2) { +} + +func (newState *VolumeInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState VolumeInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumeInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a VolumeInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "encryption_details": reflect.TypeOf(EncryptionDetails_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, VolumeInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o VolumeInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_point": o.AccessPoint, + "browse_only": o.BrowseOnly, + "catalog_name": o.CatalogName, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "encryption_details": o.EncryptionDetails, + "full_name": o.FullName, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "schema_name": o.SchemaName, + "storage_location": o.StorageLocation, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "volume_id": o.VolumeId, + "volume_type": o.VolumeType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o VolumeInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_point": types.StringType, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "encryption_details": basetypes.ListType{ + ElemType: EncryptionDetails{}.Type(ctx), + }, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "schema_name": types.StringType, + "storage_location": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "volume_id": types.StringType, + "volume_type": types.StringType, + }, + } +} + +// GetEncryptionDetails returns the value of the EncryptionDetails field in VolumeInfo_SdkV2 as +// a EncryptionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *VolumeInfo_SdkV2) GetEncryptionDetails(ctx context.Context) (EncryptionDetails_SdkV2, bool) { + var e EncryptionDetails_SdkV2 + if o.EncryptionDetails.IsNull() || o.EncryptionDetails.IsUnknown() { + return e, false + } + var v []EncryptionDetails_SdkV2 + d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEncryptionDetails sets the value of the EncryptionDetails field in VolumeInfo_SdkV2. +func (o *VolumeInfo_SdkV2) SetEncryptionDetails(ctx context.Context, v EncryptionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] + o.EncryptionDetails = types.ListValueMust(t, vs) +} + +type WorkspaceBinding_SdkV2 struct { + BindingType types.String `tfsdk:"binding_type" tf:"optional"` + + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` +} + +func (newState *WorkspaceBinding_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBinding_SdkV2) { +} + +func (newState *WorkspaceBinding_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceBinding_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBinding. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceBinding_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, WorkspaceBinding_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceBinding_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "binding_type": o.BindingType, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceBinding_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "binding_type": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +// Currently assigned workspace bindings +type WorkspaceBindingsResponse_SdkV2 struct { + // List of workspace bindings + Bindings types.List `tfsdk:"bindings" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *WorkspaceBindingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceBindingsResponse_SdkV2) { +} + +func (newState *WorkspaceBindingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceBindingsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceBindingsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceBindingsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "bindings": reflect.TypeOf(WorkspaceBinding_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, WorkspaceBindingsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceBindingsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bindings": o.Bindings, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceBindingsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bindings": basetypes.ListType{ + ElemType: WorkspaceBinding{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetBindings returns the value of the Bindings field in WorkspaceBindingsResponse_SdkV2 as +// a slice of WorkspaceBinding_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspaceBindingsResponse_SdkV2) GetBindings(ctx context.Context) ([]WorkspaceBinding_SdkV2, bool) { + if o.Bindings.IsNull() || o.Bindings.IsUnknown() { + return nil, false + } + var v []WorkspaceBinding_SdkV2 + d := o.Bindings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetBindings sets the value of the Bindings field in WorkspaceBindingsResponse_SdkV2. +func (o *WorkspaceBindingsResponse_SdkV2) SetBindings(ctx context.Context, v []WorkspaceBinding_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["bindings"] + t = t.(attr.TypeWithElementType).ElementType() + o.Bindings = types.ListValueMust(t, vs) +} diff --git a/internal/service/catalog_tf/model.go b/internal/service/catalog_tf/model.go index dab13b6fd..4b2917471 100755 --- a/internal/service/catalog_tf/model.go +++ b/internal/service/catalog_tf/model.go @@ -22,7 +22,7 @@ import ( ) type AccountsCreateMetastore struct { - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` } func (newState *AccountsCreateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsCreateMetastore) { @@ -59,9 +59,7 @@ func (o AccountsCreateMetastore) ToObjectValue(ctx context.Context) basetypes.Ob func (o AccountsCreateMetastore) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_info": basetypes.ListType{ - ElemType: CreateMetastore{}.Type(ctx), - }, + "metastore_info": CreateMetastore{}.Type(ctx), }, } } @@ -75,7 +73,10 @@ func (o *AccountsCreateMetastore) GetMetastoreInfo(ctx context.Context) (CreateM return e, false } var v []CreateMetastore - d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + d := o.MetastoreInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -87,13 +88,12 @@ func (o *AccountsCreateMetastore) GetMetastoreInfo(ctx context.Context) (CreateM // SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsCreateMetastore. func (o *AccountsCreateMetastore) SetMetastoreInfo(ctx context.Context, v CreateMetastore) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] - o.MetastoreInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreInfo = vs } type AccountsCreateMetastoreAssignment struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -136,11 +136,9 @@ func (o AccountsCreateMetastoreAssignment) ToObjectValue(ctx context.Context) ba func (o AccountsCreateMetastoreAssignment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_assignment": basetypes.ListType{ - ElemType: CreateMetastoreAssignment{}.Type(ctx), - }, - "metastore_id": types.StringType, - "workspace_id": types.Int64Type, + "metastore_assignment": CreateMetastoreAssignment{}.Type(ctx), + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, }, } } @@ -154,7 +152,10 @@ func (o *AccountsCreateMetastoreAssignment) GetMetastoreAssignment(ctx context.C return e, false } var v []CreateMetastoreAssignment - d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + d := o.MetastoreAssignment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -166,13 +167,12 @@ func (o *AccountsCreateMetastoreAssignment) GetMetastoreAssignment(ctx context.C // SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsCreateMetastoreAssignment. func (o *AccountsCreateMetastoreAssignment) SetMetastoreAssignment(ctx context.Context, v CreateMetastoreAssignment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] - o.MetastoreAssignment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreAssignment = vs } type AccountsCreateStorageCredential struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` } @@ -212,10 +212,8 @@ func (o AccountsCreateStorageCredential) ToObjectValue(ctx context.Context) base func (o AccountsCreateStorageCredential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "credential_info": basetypes.ListType{ - ElemType: CreateStorageCredential{}.Type(ctx), - }, - "metastore_id": types.StringType, + "credential_info": CreateStorageCredential{}.Type(ctx), + "metastore_id": types.StringType, }, } } @@ -229,7 +227,10 @@ func (o *AccountsCreateStorageCredential) GetCredentialInfo(ctx context.Context) return e, false } var v []CreateStorageCredential - d := o.CredentialInfo.ElementsAs(ctx, &v, true) + d := o.CredentialInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -241,13 +242,12 @@ func (o *AccountsCreateStorageCredential) GetCredentialInfo(ctx context.Context) // SetCredentialInfo sets the value of the CredentialInfo field in AccountsCreateStorageCredential. func (o *AccountsCreateStorageCredential) SetCredentialInfo(ctx context.Context, v CreateStorageCredential) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] - o.CredentialInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CredentialInfo = vs } type AccountsMetastoreAssignment struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` } func (newState *AccountsMetastoreAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreAssignment) { @@ -284,9 +284,7 @@ func (o AccountsMetastoreAssignment) ToObjectValue(ctx context.Context) basetype func (o AccountsMetastoreAssignment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_assignment": basetypes.ListType{ - ElemType: MetastoreAssignment{}.Type(ctx), - }, + "metastore_assignment": MetastoreAssignment{}.Type(ctx), }, } } @@ -300,7 +298,10 @@ func (o *AccountsMetastoreAssignment) GetMetastoreAssignment(ctx context.Context return e, false } var v []MetastoreAssignment - d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + d := o.MetastoreAssignment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -312,13 +313,12 @@ func (o *AccountsMetastoreAssignment) GetMetastoreAssignment(ctx context.Context // SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsMetastoreAssignment. func (o *AccountsMetastoreAssignment) SetMetastoreAssignment(ctx context.Context, v MetastoreAssignment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] - o.MetastoreAssignment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreAssignment = vs } type AccountsMetastoreInfo struct { - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` } func (newState *AccountsMetastoreInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsMetastoreInfo) { @@ -355,9 +355,7 @@ func (o AccountsMetastoreInfo) ToObjectValue(ctx context.Context) basetypes.Obje func (o AccountsMetastoreInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_info": basetypes.ListType{ - ElemType: MetastoreInfo{}.Type(ctx), - }, + "metastore_info": MetastoreInfo{}.Type(ctx), }, } } @@ -371,7 +369,10 @@ func (o *AccountsMetastoreInfo) GetMetastoreInfo(ctx context.Context) (Metastore return e, false } var v []MetastoreInfo - d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + d := o.MetastoreInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -383,13 +384,12 @@ func (o *AccountsMetastoreInfo) GetMetastoreInfo(ctx context.Context) (Metastore // SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsMetastoreInfo. func (o *AccountsMetastoreInfo) SetMetastoreInfo(ctx context.Context, v MetastoreInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] - o.MetastoreInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreInfo = vs } type AccountsStorageCredentialInfo struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` } func (newState *AccountsStorageCredentialInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsStorageCredentialInfo) { @@ -426,9 +426,7 @@ func (o AccountsStorageCredentialInfo) ToObjectValue(ctx context.Context) basety func (o AccountsStorageCredentialInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "credential_info": basetypes.ListType{ - ElemType: StorageCredentialInfo{}.Type(ctx), - }, + "credential_info": StorageCredentialInfo{}.Type(ctx), }, } } @@ -442,7 +440,10 @@ func (o *AccountsStorageCredentialInfo) GetCredentialInfo(ctx context.Context) ( return e, false } var v []StorageCredentialInfo - d := o.CredentialInfo.ElementsAs(ctx, &v, true) + d := o.CredentialInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -454,16 +455,15 @@ func (o *AccountsStorageCredentialInfo) GetCredentialInfo(ctx context.Context) ( // SetCredentialInfo sets the value of the CredentialInfo field in AccountsStorageCredentialInfo. func (o *AccountsStorageCredentialInfo) SetCredentialInfo(ctx context.Context, v StorageCredentialInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] - o.CredentialInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CredentialInfo = vs } type AccountsUpdateMetastore struct { // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` - MetastoreInfo types.List `tfsdk:"metastore_info" tf:"optional,object"` + MetastoreInfo types.Object `tfsdk:"metastore_info" tf:"optional,object"` } func (newState *AccountsUpdateMetastore) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccountsUpdateMetastore) { @@ -501,10 +501,8 @@ func (o AccountsUpdateMetastore) ToObjectValue(ctx context.Context) basetypes.Ob func (o AccountsUpdateMetastore) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_id": types.StringType, - "metastore_info": basetypes.ListType{ - ElemType: UpdateMetastore{}.Type(ctx), - }, + "metastore_id": types.StringType, + "metastore_info": UpdateMetastore{}.Type(ctx), }, } } @@ -518,7 +516,10 @@ func (o *AccountsUpdateMetastore) GetMetastoreInfo(ctx context.Context) (UpdateM return e, false } var v []UpdateMetastore - d := o.MetastoreInfo.ElementsAs(ctx, &v, true) + d := o.MetastoreInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -530,13 +531,12 @@ func (o *AccountsUpdateMetastore) GetMetastoreInfo(ctx context.Context) (UpdateM // SetMetastoreInfo sets the value of the MetastoreInfo field in AccountsUpdateMetastore. func (o *AccountsUpdateMetastore) SetMetastoreInfo(ctx context.Context, v UpdateMetastore) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_info"] - o.MetastoreInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreInfo = vs } type AccountsUpdateMetastoreAssignment struct { - MetastoreAssignment types.List `tfsdk:"metastore_assignment" tf:"optional,object"` + MetastoreAssignment types.Object `tfsdk:"metastore_assignment" tf:"optional,object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Workspace ID. @@ -579,11 +579,9 @@ func (o AccountsUpdateMetastoreAssignment) ToObjectValue(ctx context.Context) ba func (o AccountsUpdateMetastoreAssignment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "metastore_assignment": basetypes.ListType{ - ElemType: UpdateMetastoreAssignment{}.Type(ctx), - }, - "metastore_id": types.StringType, - "workspace_id": types.Int64Type, + "metastore_assignment": UpdateMetastoreAssignment{}.Type(ctx), + "metastore_id": types.StringType, + "workspace_id": types.Int64Type, }, } } @@ -597,7 +595,10 @@ func (o *AccountsUpdateMetastoreAssignment) GetMetastoreAssignment(ctx context.C return e, false } var v []UpdateMetastoreAssignment - d := o.MetastoreAssignment.ElementsAs(ctx, &v, true) + d := o.MetastoreAssignment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -609,13 +610,12 @@ func (o *AccountsUpdateMetastoreAssignment) GetMetastoreAssignment(ctx context.C // SetMetastoreAssignment sets the value of the MetastoreAssignment field in AccountsUpdateMetastoreAssignment. func (o *AccountsUpdateMetastoreAssignment) SetMetastoreAssignment(ctx context.Context, v UpdateMetastoreAssignment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metastore_assignment"] - o.MetastoreAssignment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MetastoreAssignment = vs } type AccountsUpdateStorageCredential struct { - CredentialInfo types.List `tfsdk:"credential_info" tf:"optional,object"` + CredentialInfo types.Object `tfsdk:"credential_info" tf:"optional,object"` // Unity Catalog metastore ID MetastoreId types.String `tfsdk:"-"` // Name of the storage credential. @@ -658,9 +658,7 @@ func (o AccountsUpdateStorageCredential) ToObjectValue(ctx context.Context) base func (o AccountsUpdateStorageCredential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "credential_info": basetypes.ListType{ - ElemType: UpdateStorageCredential{}.Type(ctx), - }, + "credential_info": UpdateStorageCredential{}.Type(ctx), "metastore_id": types.StringType, "storage_credential_name": types.StringType, }, @@ -676,7 +674,10 @@ func (o *AccountsUpdateStorageCredential) GetCredentialInfo(ctx context.Context) return e, false } var v []UpdateStorageCredential - d := o.CredentialInfo.ElementsAs(ctx, &v, true) + d := o.CredentialInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -688,9 +689,8 @@ func (o *AccountsUpdateStorageCredential) GetCredentialInfo(ctx context.Context) // SetCredentialInfo sets the value of the CredentialInfo field in AccountsUpdateStorageCredential. func (o *AccountsUpdateStorageCredential) SetCredentialInfo(ctx context.Context, v UpdateStorageCredential) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["credential_info"] - o.CredentialInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CredentialInfo = vs } type ArtifactAllowlistInfo struct { @@ -1479,7 +1479,7 @@ type CatalogInfo struct { // Username of catalog creator. CreatedBy types.String `tfsdk:"created_by" tf:"optional"` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` // Whether predictive optimization should be enabled for this object and // objects under it. EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` @@ -1504,7 +1504,7 @@ type CatalogInfo struct { // remote sharing server. ProviderName types.String `tfsdk:"provider_name" tf:"optional"` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"optional,object"` // Kind of catalog securable. SecurableKind types.String `tfsdk:"securable_kind" tf:"optional"` @@ -1581,20 +1581,18 @@ func (o CatalogInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o CatalogInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "browse_only": types.BoolType, - "catalog_type": types.StringType, - "comment": types.StringType, - "connection_name": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), - }, - "enable_predictive_optimization": types.StringType, - "full_name": types.StringType, - "isolation_mode": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, + "browse_only": types.BoolType, + "catalog_type": types.StringType, + "comment": types.StringType, + "connection_name": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "effective_predictive_optimization_flag": EffectivePredictiveOptimizationFlag{}.Type(ctx), + "enable_predictive_optimization": types.StringType, + "full_name": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, "options": basetypes.MapType{ ElemType: types.StringType, }, @@ -1602,17 +1600,15 @@ func (o CatalogInfo) Type(ctx context.Context) attr.Type { "properties": basetypes.MapType{ ElemType: types.StringType, }, - "provider_name": types.StringType, - "provisioning_info": basetypes.ListType{ - ElemType: ProvisioningInfo{}.Type(ctx), - }, - "securable_kind": types.StringType, - "securable_type": types.StringType, - "share_name": types.StringType, - "storage_location": types.StringType, - "storage_root": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, + "provider_name": types.StringType, + "provisioning_info": ProvisioningInfo{}.Type(ctx), + "securable_kind": types.StringType, + "securable_type": types.StringType, + "share_name": types.StringType, + "storage_location": types.StringType, + "storage_root": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, }, } } @@ -1626,7 +1622,10 @@ func (o *CatalogInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context return e, false } var v []EffectivePredictiveOptimizationFlag - d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + d := o.EffectivePredictiveOptimizationFlag.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1638,9 +1637,8 @@ func (o *CatalogInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context // SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in CatalogInfo. func (o *CatalogInfo) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] - o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EffectivePredictiveOptimizationFlag = vs } // GetOptions returns the value of the Options field in CatalogInfo as @@ -1704,7 +1702,10 @@ func (o *CatalogInfo) GetProvisioningInfo(ctx context.Context) (ProvisioningInfo return e, false } var v []ProvisioningInfo - d := o.ProvisioningInfo.ElementsAs(ctx, &v, true) + d := o.ProvisioningInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1716,9 +1717,8 @@ func (o *CatalogInfo) GetProvisioningInfo(ctx context.Context) (ProvisioningInfo // SetProvisioningInfo sets the value of the ProvisioningInfo field in CatalogInfo. func (o *CatalogInfo) SetProvisioningInfo(ctx context.Context, v ProvisioningInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_info"] - o.ProvisioningInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ProvisioningInfo = vs } type CloudflareApiToken struct { @@ -1775,7 +1775,7 @@ type ColumnInfo struct { // User-provided free-form text description. Comment types.String `tfsdk:"comment" tf:"optional"` - Mask types.List `tfsdk:"mask" tf:"optional,object"` + Mask types.Object `tfsdk:"mask" tf:"optional,object"` // Name of Column. Name types.String `tfsdk:"name" tf:"optional"` // Whether field may be Null (default: true). @@ -1843,10 +1843,8 @@ func (o ColumnInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o ColumnInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": types.StringType, - "mask": basetypes.ListType{ - ElemType: ColumnMask{}.Type(ctx), - }, + "comment": types.StringType, + "mask": ColumnMask{}.Type(ctx), "name": types.StringType, "nullable": types.BoolType, "partition_index": types.Int64Type, @@ -1870,7 +1868,10 @@ func (o *ColumnInfo) GetMask(ctx context.Context) (ColumnMask, bool) { return e, false } var v []ColumnMask - d := o.Mask.ElementsAs(ctx, &v, true) + d := o.Mask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1882,9 +1883,8 @@ func (o *ColumnInfo) GetMask(ctx context.Context) (ColumnMask, bool) { // SetMask sets the value of the Mask field in ColumnInfo. func (o *ColumnInfo) SetMask(ctx context.Context, v ColumnMask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["mask"] - o.Mask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Mask = vs } type ColumnMask struct { @@ -1993,7 +1993,7 @@ type ConnectionInfo struct { // connection. Properties types.Map `tfsdk:"properties" tf:"optional"` // Status of an asynchronously provisioned resource. - ProvisioningInfo types.List `tfsdk:"provisioning_info" tf:"optional,object"` + ProvisioningInfo types.Object `tfsdk:"provisioning_info" tf:"optional,object"` // If the connection is read only. ReadOnly types.Bool `tfsdk:"read_only" tf:"optional"` // Kind of connection securable. @@ -2078,15 +2078,13 @@ func (o ConnectionInfo) Type(ctx context.Context) attr.Type { "properties": basetypes.MapType{ ElemType: types.StringType, }, - "provisioning_info": basetypes.ListType{ - ElemType: ProvisioningInfo{}.Type(ctx), - }, - "read_only": types.BoolType, - "securable_kind": types.StringType, - "securable_type": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "url": types.StringType, + "provisioning_info": ProvisioningInfo{}.Type(ctx), + "read_only": types.BoolType, + "securable_kind": types.StringType, + "securable_type": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "url": types.StringType, }, } } @@ -2152,7 +2150,10 @@ func (o *ConnectionInfo) GetProvisioningInfo(ctx context.Context) (ProvisioningI return e, false } var v []ProvisioningInfo - d := o.ProvisioningInfo.ElementsAs(ctx, &v, true) + d := o.ProvisioningInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2164,16 +2165,15 @@ func (o *ConnectionInfo) GetProvisioningInfo(ctx context.Context) (ProvisioningI // SetProvisioningInfo sets the value of the ProvisioningInfo field in ConnectionInfo. func (o *ConnectionInfo) SetProvisioningInfo(ctx context.Context, v ProvisioningInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_info"] - o.ProvisioningInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ProvisioningInfo = vs } // Detailed status of an online table. Shown if the online table is in the // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. type ContinuousUpdateStatus struct { // Progress of the initial data synchronization. - InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` // The last source table Delta version that was synced to the online table. // Note that this Delta version may not be completely synced to the online // table yet. @@ -2219,11 +2219,9 @@ func (o ContinuousUpdateStatus) ToObjectValue(ctx context.Context) basetypes.Obj func (o ContinuousUpdateStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "initial_pipeline_sync_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), - }, - "last_processed_commit_version": types.Int64Type, - "timestamp": types.StringType, + "initial_pipeline_sync_progress": PipelineProgress{}.Type(ctx), + "last_processed_commit_version": types.Int64Type, + "timestamp": types.StringType, }, } } @@ -2237,7 +2235,10 @@ func (o *ContinuousUpdateStatus) GetInitialPipelineSyncProgress(ctx context.Cont return e, false } var v []PipelineProgress - d := o.InitialPipelineSyncProgress.ElementsAs(ctx, &v, true) + d := o.InitialPipelineSyncProgress.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2249,9 +2250,8 @@ func (o *ContinuousUpdateStatus) GetInitialPipelineSyncProgress(ctx context.Cont // SetInitialPipelineSyncProgress sets the value of the InitialPipelineSyncProgress field in ContinuousUpdateStatus. func (o *ContinuousUpdateStatus) SetInitialPipelineSyncProgress(ctx context.Context, v PipelineProgress) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["initial_pipeline_sync_progress"] - o.InitialPipelineSyncProgress = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InitialPipelineSyncProgress = vs } type CreateCatalog struct { @@ -2510,17 +2510,17 @@ func (o *CreateConnection) SetProperties(ctx context.Context, v map[string]types type CreateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // The credential name. The name must be unique among storage and service // credentials within the metastore. Name types.String `tfsdk:"name" tf:""` @@ -2579,23 +2579,15 @@ func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.Ob func (o CreateCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "comment": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), - }, - "name": types.StringType, - "purpose": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, + "aws_iam_role": AwsIamRole{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentity{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "comment": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccount{}.Type(ctx), + "name": types.StringType, + "purpose": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, }, } } @@ -2609,7 +2601,10 @@ func (o *CreateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRole return e, false } var v []AwsIamRole - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2621,9 +2616,8 @@ func (o *CreateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRole // SetAwsIamRole sets the value of the AwsIamRole field in CreateCredentialRequest. func (o *CreateCredentialRequest) SetAwsIamRole(ctx context.Context, v AwsIamRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CreateCredentialRequest as @@ -2635,7 +2629,10 @@ func (o *CreateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) ( return e, false } var v []AzureManagedIdentity - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2647,9 +2644,8 @@ func (o *CreateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) ( // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CreateCredentialRequest. func (o *CreateCredentialRequest) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CreateCredentialRequest as @@ -2661,7 +2657,10 @@ func (o *CreateCredentialRequest) GetAzureServicePrincipal(ctx context.Context) return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2673,9 +2672,8 @@ func (o *CreateCredentialRequest) GetAzureServicePrincipal(ctx context.Context) // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CreateCredentialRequest. func (o *CreateCredentialRequest) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CreateCredentialRequest as @@ -2687,7 +2685,10 @@ func (o *CreateCredentialRequest) GetDatabricksGcpServiceAccount(ctx context.Con return e, false } var v []DatabricksGcpServiceAccount - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2699,9 +2700,8 @@ func (o *CreateCredentialRequest) GetDatabricksGcpServiceAccount(ctx context.Con // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CreateCredentialRequest. func (o *CreateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } type CreateExternalLocation struct { @@ -2712,7 +2712,7 @@ type CreateExternalLocation struct { // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name" tf:""` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. @@ -2770,17 +2770,15 @@ func (o CreateExternalLocation) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateExternalLocation) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "access_point": types.StringType, - "comment": types.StringType, - "credential_name": types.StringType, - "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), - }, - "fallback": types.BoolType, - "name": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, - "url": types.StringType, + "access_point": types.StringType, + "comment": types.StringType, + "credential_name": types.StringType, + "encryption_details": EncryptionDetails{}.Type(ctx), + "fallback": types.BoolType, + "name": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + "url": types.StringType, }, } } @@ -2794,7 +2792,10 @@ func (o *CreateExternalLocation) GetEncryptionDetails(ctx context.Context) (Encr return e, false } var v []EncryptionDetails - d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + d := o.EncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2806,9 +2807,8 @@ func (o *CreateExternalLocation) GetEncryptionDetails(ctx context.Context) (Encr // SetEncryptionDetails sets the value of the EncryptionDetails field in CreateExternalLocation. func (o *CreateExternalLocation) SetEncryptionDetails(ctx context.Context, v EncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] - o.EncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EncryptionDetails = vs } type CreateFunction struct { @@ -2825,7 +2825,7 @@ type CreateFunction struct { // Pretty printed function data type. FullDataType types.String `tfsdk:"full_data_type" tf:""` - InputParams types.List `tfsdk:"input_params" tf:"object"` + InputParams types.Object `tfsdk:"input_params" tf:"object"` // Whether the function is deterministic. IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:""` // Function null call. @@ -2837,7 +2837,7 @@ type CreateFunction struct { // JSON-serialized key-value pair map, encoded (escaped) as a string. Properties types.String `tfsdk:"properties" tf:"optional"` // Table function return parameters. - ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.Object `tfsdk:"return_params" tf:"optional,object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return @@ -2847,7 +2847,7 @@ type CreateFunction struct { // Function body. RoutineDefinition types.String `tfsdk:"routine_definition" tf:""` // Function dependencies. - RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"optional,object"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name" tf:""` // Function security type. @@ -2916,33 +2916,27 @@ func (o CreateFunction) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o CreateFunction) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "catalog_name": types.StringType, - "comment": types.StringType, - "data_type": types.StringType, - "external_language": types.StringType, - "external_name": types.StringType, - "full_data_type": types.StringType, - "input_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), - }, - "is_deterministic": types.BoolType, - "is_null_call": types.BoolType, - "name": types.StringType, - "parameter_style": types.StringType, - "properties": types.StringType, - "return_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), - }, - "routine_body": types.StringType, - "routine_definition": types.StringType, - "routine_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), - }, - "schema_name": types.StringType, - "security_type": types.StringType, - "specific_name": types.StringType, - "sql_data_access": types.StringType, - "sql_path": types.StringType, + "catalog_name": types.StringType, + "comment": types.StringType, + "data_type": types.StringType, + "external_language": types.StringType, + "external_name": types.StringType, + "full_data_type": types.StringType, + "input_params": FunctionParameterInfos{}.Type(ctx), + "is_deterministic": types.BoolType, + "is_null_call": types.BoolType, + "name": types.StringType, + "parameter_style": types.StringType, + "properties": types.StringType, + "return_params": FunctionParameterInfos{}.Type(ctx), + "routine_body": types.StringType, + "routine_definition": types.StringType, + "routine_dependencies": DependencyList{}.Type(ctx), + "schema_name": types.StringType, + "security_type": types.StringType, + "specific_name": types.StringType, + "sql_data_access": types.StringType, + "sql_path": types.StringType, }, } } @@ -2956,7 +2950,10 @@ func (o *CreateFunction) GetInputParams(ctx context.Context) (FunctionParameterI return e, false } var v []FunctionParameterInfos - d := o.InputParams.ElementsAs(ctx, &v, true) + d := o.InputParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2968,9 +2965,8 @@ func (o *CreateFunction) GetInputParams(ctx context.Context) (FunctionParameterI // SetInputParams sets the value of the InputParams field in CreateFunction. func (o *CreateFunction) SetInputParams(ctx context.Context, v FunctionParameterInfos) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input_params"] - o.InputParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InputParams = vs } // GetReturnParams returns the value of the ReturnParams field in CreateFunction as @@ -2982,7 +2978,10 @@ func (o *CreateFunction) GetReturnParams(ctx context.Context) (FunctionParameter return e, false } var v []FunctionParameterInfos - d := o.ReturnParams.ElementsAs(ctx, &v, true) + d := o.ReturnParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2994,9 +2993,8 @@ func (o *CreateFunction) GetReturnParams(ctx context.Context) (FunctionParameter // SetReturnParams sets the value of the ReturnParams field in CreateFunction. func (o *CreateFunction) SetReturnParams(ctx context.Context, v FunctionParameterInfos) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["return_params"] - o.ReturnParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ReturnParams = vs } // GetRoutineDependencies returns the value of the RoutineDependencies field in CreateFunction as @@ -3008,7 +3006,10 @@ func (o *CreateFunction) GetRoutineDependencies(ctx context.Context) (Dependency return e, false } var v []DependencyList - d := o.RoutineDependencies.ElementsAs(ctx, &v, true) + d := o.RoutineDependencies.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3020,14 +3021,13 @@ func (o *CreateFunction) GetRoutineDependencies(ctx context.Context) (Dependency // SetRoutineDependencies sets the value of the RoutineDependencies field in CreateFunction. func (o *CreateFunction) SetRoutineDependencies(ctx context.Context, v DependencyList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["routine_dependencies"] - o.RoutineDependencies = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RoutineDependencies = vs } type CreateFunctionRequest struct { // Partial __FunctionInfo__ specifying the function to be created. - FunctionInfo types.List `tfsdk:"function_info" tf:"object"` + FunctionInfo types.Object `tfsdk:"function_info" tf:"object"` } func (newState *CreateFunctionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFunctionRequest) { @@ -3064,9 +3064,7 @@ func (o CreateFunctionRequest) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateFunctionRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "function_info": basetypes.ListType{ - ElemType: CreateFunction{}.Type(ctx), - }, + "function_info": CreateFunction{}.Type(ctx), }, } } @@ -3080,7 +3078,10 @@ func (o *CreateFunctionRequest) GetFunctionInfo(ctx context.Context) (CreateFunc return e, false } var v []CreateFunction - d := o.FunctionInfo.ElementsAs(ctx, &v, true) + d := o.FunctionInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3092,9 +3093,8 @@ func (o *CreateFunctionRequest) GetFunctionInfo(ctx context.Context) (CreateFunc // SetFunctionInfo sets the value of the FunctionInfo field in CreateFunctionRequest. func (o *CreateFunctionRequest) SetFunctionInfo(ctx context.Context, v CreateFunction) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["function_info"] - o.FunctionInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FunctionInfo = vs } type CreateMetastore struct { @@ -3214,15 +3214,15 @@ type CreateMonitor struct { // drift metrics (comparing metrics across time windows). CustomMetrics types.List `tfsdk:"custom_metrics" tf:"optional"` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // Whether to skip creating a default dashboard summarizing data quality // metrics. SkipBuiltinDashboard types.Bool `tfsdk:"skip_builtin_dashboard" tf:"optional"` @@ -3233,11 +3233,11 @@ type CreateMonitor struct { // slices. SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` // Optional argument to specify the warehouse for dashboard creation. If not // specified, the first running warehouse will be used. WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` @@ -3302,30 +3302,18 @@ func (o CreateMonitor) Type(ctx context.Context) attr.Type { "custom_metrics": basetypes.ListType{ ElemType: MonitorMetric{}.Type(ctx), }, - "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), - }, - "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), - }, - "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), - }, - "output_schema_name": types.StringType, - "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), - }, - "skip_builtin_dashboard": types.BoolType, + "data_classification_config": MonitorDataClassificationConfig{}.Type(ctx), + "inference_log": MonitorInferenceLog{}.Type(ctx), + "notifications": MonitorNotifications{}.Type(ctx), + "output_schema_name": types.StringType, + "schedule": MonitorCronSchedule{}.Type(ctx), + "skip_builtin_dashboard": types.BoolType, "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, - "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), - }, - "table_name": types.StringType, - "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), - }, + "snapshot": MonitorSnapshot{}.Type(ctx), + "table_name": types.StringType, + "time_series": MonitorTimeSeries{}.Type(ctx), "warehouse_id": types.StringType, }, } @@ -3366,7 +3354,10 @@ func (o *CreateMonitor) GetDataClassificationConfig(ctx context.Context) (Monito return e, false } var v []MonitorDataClassificationConfig - d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + d := o.DataClassificationConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3378,9 +3369,8 @@ func (o *CreateMonitor) GetDataClassificationConfig(ctx context.Context) (Monito // SetDataClassificationConfig sets the value of the DataClassificationConfig field in CreateMonitor. func (o *CreateMonitor) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] - o.DataClassificationConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataClassificationConfig = vs } // GetInferenceLog returns the value of the InferenceLog field in CreateMonitor as @@ -3392,7 +3382,10 @@ func (o *CreateMonitor) GetInferenceLog(ctx context.Context) (MonitorInferenceLo return e, false } var v []MonitorInferenceLog - d := o.InferenceLog.ElementsAs(ctx, &v, true) + d := o.InferenceLog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3404,9 +3397,8 @@ func (o *CreateMonitor) GetInferenceLog(ctx context.Context) (MonitorInferenceLo // SetInferenceLog sets the value of the InferenceLog field in CreateMonitor. func (o *CreateMonitor) SetInferenceLog(ctx context.Context, v MonitorInferenceLog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] - o.InferenceLog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceLog = vs } // GetNotifications returns the value of the Notifications field in CreateMonitor as @@ -3418,7 +3410,10 @@ func (o *CreateMonitor) GetNotifications(ctx context.Context) (MonitorNotificati return e, false } var v []MonitorNotifications - d := o.Notifications.ElementsAs(ctx, &v, true) + d := o.Notifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3430,9 +3425,8 @@ func (o *CreateMonitor) GetNotifications(ctx context.Context) (MonitorNotificati // SetNotifications sets the value of the Notifications field in CreateMonitor. func (o *CreateMonitor) SetNotifications(ctx context.Context, v MonitorNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] - o.Notifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Notifications = vs } // GetSchedule returns the value of the Schedule field in CreateMonitor as @@ -3444,7 +3438,10 @@ func (o *CreateMonitor) GetSchedule(ctx context.Context) (MonitorCronSchedule, b return e, false } var v []MonitorCronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3456,9 +3453,8 @@ func (o *CreateMonitor) GetSchedule(ctx context.Context) (MonitorCronSchedule, b // SetSchedule sets the value of the Schedule field in CreateMonitor. func (o *CreateMonitor) SetSchedule(ctx context.Context, v MonitorCronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetSlicingExprs returns the value of the SlicingExprs field in CreateMonitor as @@ -3496,7 +3492,10 @@ func (o *CreateMonitor) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) return e, false } var v []MonitorSnapshot - d := o.Snapshot.ElementsAs(ctx, &v, true) + d := o.Snapshot.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3508,9 +3507,8 @@ func (o *CreateMonitor) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) // SetSnapshot sets the value of the Snapshot field in CreateMonitor. func (o *CreateMonitor) SetSnapshot(ctx context.Context, v MonitorSnapshot) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] - o.Snapshot = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Snapshot = vs } // GetTimeSeries returns the value of the TimeSeries field in CreateMonitor as @@ -3522,7 +3520,10 @@ func (o *CreateMonitor) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, b return e, false } var v []MonitorTimeSeries - d := o.TimeSeries.ElementsAs(ctx, &v, true) + d := o.TimeSeries.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3534,15 +3535,14 @@ func (o *CreateMonitor) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, b // SetTimeSeries sets the value of the TimeSeries field in CreateMonitor. func (o *CreateMonitor) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] - o.TimeSeries = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TimeSeries = vs } // Create an Online Table type CreateOnlineTableRequest struct { // Online Table information. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"optional,object"` } func (newState *CreateOnlineTableRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOnlineTableRequest) { @@ -3579,9 +3579,7 @@ func (o CreateOnlineTableRequest) ToObjectValue(ctx context.Context) basetypes.O func (o CreateOnlineTableRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "table": basetypes.ListType{ - ElemType: OnlineTable{}.Type(ctx), - }, + "table": OnlineTable{}.Type(ctx), }, } } @@ -3595,7 +3593,10 @@ func (o *CreateOnlineTableRequest) GetTable(ctx context.Context) (OnlineTable, b return e, false } var v []OnlineTable - d := o.Table.ElementsAs(ctx, &v, true) + d := o.Table.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3607,9 +3608,8 @@ func (o *CreateOnlineTableRequest) GetTable(ctx context.Context) (OnlineTable, b // SetTable sets the value of the Table field in CreateOnlineTableRequest. func (o *CreateOnlineTableRequest) SetTable(ctx context.Context, v OnlineTable) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] - o.Table = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Table = vs } type CreateRegisteredModelRequest struct { @@ -3797,17 +3797,17 @@ func (o *CreateSchema) SetProperties(ctx context.Context, v map[string]types.Str type CreateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // The credential name. The name must be unique within the metastore. Name types.String `tfsdk:"name" tf:""` // Whether the storage credential is only usable for read operations. @@ -3863,25 +3863,15 @@ func (o CreateStorageCredential) ToObjectValue(ctx context.Context) basetypes.Ob func (o CreateStorageCredential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityRequest{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), - }, - "comment": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), - }, - "name": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, + "aws_iam_role": AwsIamRoleRequest{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentityRequest{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "cloudflare_api_token": CloudflareApiToken{}.Type(ctx), + "comment": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccountRequest{}.Type(ctx), + "name": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, }, } } @@ -3895,7 +3885,10 @@ func (o *CreateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRole return e, false } var v []AwsIamRoleRequest - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3907,9 +3900,8 @@ func (o *CreateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRole // SetAwsIamRole sets the value of the AwsIamRole field in CreateStorageCredential. func (o *CreateStorageCredential) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CreateStorageCredential as @@ -3921,7 +3913,10 @@ func (o *CreateStorageCredential) GetAzureManagedIdentity(ctx context.Context) ( return e, false } var v []AzureManagedIdentityRequest - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3933,9 +3928,8 @@ func (o *CreateStorageCredential) GetAzureManagedIdentity(ctx context.Context) ( // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CreateStorageCredential. func (o *CreateStorageCredential) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CreateStorageCredential as @@ -3947,7 +3941,10 @@ func (o *CreateStorageCredential) GetAzureServicePrincipal(ctx context.Context) return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3959,9 +3956,8 @@ func (o *CreateStorageCredential) GetAzureServicePrincipal(ctx context.Context) // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CreateStorageCredential. func (o *CreateStorageCredential) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetCloudflareApiToken returns the value of the CloudflareApiToken field in CreateStorageCredential as @@ -3973,7 +3969,10 @@ func (o *CreateStorageCredential) GetCloudflareApiToken(ctx context.Context) (Cl return e, false } var v []CloudflareApiToken - d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + d := o.CloudflareApiToken.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3985,9 +3984,8 @@ func (o *CreateStorageCredential) GetCloudflareApiToken(ctx context.Context) (Cl // SetCloudflareApiToken sets the value of the CloudflareApiToken field in CreateStorageCredential. func (o *CreateStorageCredential) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] - o.CloudflareApiToken = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudflareApiToken = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CreateStorageCredential as @@ -3999,7 +3997,10 @@ func (o *CreateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.Con return e, false } var v []DatabricksGcpServiceAccountRequest - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4011,16 +4012,15 @@ func (o *CreateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.Con // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CreateStorageCredential. func (o *CreateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } 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.List `tfsdk:"constraint" tf:"object"` + Constraint types.Object `tfsdk:"constraint" tf:"object"` // The full name of the table referenced by the constraint. FullNameArg types.String `tfsdk:"full_name_arg" tf:""` } @@ -4060,9 +4060,7 @@ func (o CreateTableConstraint) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateTableConstraint) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "constraint": basetypes.ListType{ - ElemType: TableConstraint{}.Type(ctx), - }, + "constraint": TableConstraint{}.Type(ctx), "full_name_arg": types.StringType, }, } @@ -4077,7 +4075,10 @@ func (o *CreateTableConstraint) GetConstraint(ctx context.Context) (TableConstra return e, false } var v []TableConstraint - d := o.Constraint.ElementsAs(ctx, &v, true) + d := o.Constraint.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4089,9 +4090,8 @@ func (o *CreateTableConstraint) GetConstraint(ctx context.Context) (TableConstra // SetConstraint sets the value of the Constraint field in CreateTableConstraint. func (o *CreateTableConstraint) SetConstraint(ctx context.Context, v TableConstraint) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["constraint"] - o.Constraint = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Constraint = vs } type CreateVolumeRequestContent struct { @@ -4158,12 +4158,12 @@ func (o CreateVolumeRequestContent) Type(ctx context.Context) attr.Type { type CredentialInfo struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // Time at which this credential was created, in epoch milliseconds. @@ -4172,7 +4172,7 @@ type CredentialInfo struct { CreatedBy types.String `tfsdk:"created_by" tf:"optional"` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // The full name of the credential. FullName types.String `tfsdk:"full_name" tf:"optional"` // The unique identifier of the credential. @@ -4255,32 +4255,24 @@ func (o CredentialInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o CredentialInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), - }, - "full_name": types.StringType, - "id": types.StringType, - "isolation_mode": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "purpose": types.StringType, - "read_only": types.BoolType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "used_for_managed_storage": types.BoolType, + "aws_iam_role": AwsIamRole{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentity{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccount{}.Type(ctx), + "full_name": types.StringType, + "id": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "purpose": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "used_for_managed_storage": types.BoolType, }, } } @@ -4294,7 +4286,10 @@ func (o *CredentialInfo) GetAwsIamRole(ctx context.Context) (AwsIamRole, bool) { return e, false } var v []AwsIamRole - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4306,9 +4301,8 @@ func (o *CredentialInfo) GetAwsIamRole(ctx context.Context) (AwsIamRole, bool) { // SetAwsIamRole sets the value of the AwsIamRole field in CredentialInfo. func (o *CredentialInfo) SetAwsIamRole(ctx context.Context, v AwsIamRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in CredentialInfo as @@ -4320,7 +4314,10 @@ func (o *CredentialInfo) GetAzureManagedIdentity(ctx context.Context) (AzureMana return e, false } var v []AzureManagedIdentity - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4332,9 +4329,8 @@ func (o *CredentialInfo) GetAzureManagedIdentity(ctx context.Context) (AzureMana // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in CredentialInfo. func (o *CredentialInfo) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in CredentialInfo as @@ -4346,7 +4342,10 @@ func (o *CredentialInfo) GetAzureServicePrincipal(ctx context.Context) (AzureSer return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4358,9 +4357,8 @@ func (o *CredentialInfo) GetAzureServicePrincipal(ctx context.Context) (AzureSer // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in CredentialInfo. func (o *CredentialInfo) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in CredentialInfo as @@ -4372,7 +4370,10 @@ func (o *CredentialInfo) GetDatabricksGcpServiceAccount(ctx context.Context) (Da return e, false } var v []DatabricksGcpServiceAccount - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4384,9 +4385,8 @@ func (o *CredentialInfo) GetDatabricksGcpServiceAccount(ctx context.Context) (Da // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in CredentialInfo. func (o *CredentialInfo) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } type CredentialValidationResult struct { @@ -5717,9 +5717,9 @@ func (o *DeltaRuntimePropertiesKvPairs) SetDeltaRuntimeProperties(ctx context.Co // field must be defined. type Dependency struct { // A function that is dependent on a SQL object. - Function types.List `tfsdk:"function" tf:"optional,object"` + Function types.Object `tfsdk:"function" tf:"optional,object"` // A table that is dependent on a SQL object. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"optional,object"` } func (newState *Dependency) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dependency) { @@ -5758,12 +5758,8 @@ 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": basetypes.ListType{ - ElemType: FunctionDependency{}.Type(ctx), - }, - "table": basetypes.ListType{ - ElemType: TableDependency{}.Type(ctx), - }, + "function": FunctionDependency{}.Type(ctx), + "table": TableDependency{}.Type(ctx), }, } } @@ -5777,7 +5773,10 @@ func (o *Dependency) GetFunction(ctx context.Context) (FunctionDependency, bool) return e, false } var v []FunctionDependency - d := o.Function.ElementsAs(ctx, &v, true) + d := o.Function.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5789,9 +5788,8 @@ func (o *Dependency) GetFunction(ctx context.Context) (FunctionDependency, bool) // SetFunction sets the value of the Function field in Dependency. func (o *Dependency) SetFunction(ctx context.Context, v FunctionDependency) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["function"] - o.Function = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Function = vs } // GetTable returns the value of the Table field in Dependency as @@ -5803,7 +5801,10 @@ func (o *Dependency) GetTable(ctx context.Context) (TableDependency, bool) { return e, false } var v []TableDependency - d := o.Table.ElementsAs(ctx, &v, true) + d := o.Table.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5815,9 +5816,8 @@ func (o *Dependency) GetTable(ctx context.Context) (TableDependency, bool) { // SetTable sets the value of the Table field in Dependency. func (o *Dependency) SetTable(ctx context.Context, v TableDependency) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] - o.Table = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Table = vs } // A list of dependencies. @@ -6319,7 +6319,7 @@ func (o EnableResponse) Type(ctx context.Context) attr.Type { // Encryption options that apply to clients connecting to cloud storage. type EncryptionDetails struct { // Server-Side Encryption properties for clients communicating with AWS s3. - SseEncryptionDetails types.List `tfsdk:"sse_encryption_details" tf:"optional,object"` + SseEncryptionDetails types.Object `tfsdk:"sse_encryption_details" tf:"optional,object"` } func (newState *EncryptionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan EncryptionDetails) { @@ -6356,9 +6356,7 @@ func (o EncryptionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o EncryptionDetails) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "sse_encryption_details": basetypes.ListType{ - ElemType: SseEncryptionDetails{}.Type(ctx), - }, + "sse_encryption_details": SseEncryptionDetails{}.Type(ctx), }, } } @@ -6372,7 +6370,10 @@ func (o *EncryptionDetails) GetSseEncryptionDetails(ctx context.Context) (SseEnc return e, false } var v []SseEncryptionDetails - d := o.SseEncryptionDetails.ElementsAs(ctx, &v, true) + d := o.SseEncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6384,9 +6385,8 @@ func (o *EncryptionDetails) GetSseEncryptionDetails(ctx context.Context) (SseEnc // SetSseEncryptionDetails sets the value of the SseEncryptionDetails field in EncryptionDetails. func (o *EncryptionDetails) SetSseEncryptionDetails(ctx context.Context, v SseEncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sse_encryption_details"] - o.SseEncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SseEncryptionDetails = vs } // Get boolean reflecting if table exists @@ -6450,7 +6450,7 @@ type ExternalLocationInfo struct { // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name" tf:"optional"` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. @@ -6524,25 +6524,23 @@ func (o ExternalLocationInfo) ToObjectValue(ctx context.Context) basetypes.Objec func (o ExternalLocationInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "access_point": types.StringType, - "browse_only": types.BoolType, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "credential_id": types.StringType, - "credential_name": types.StringType, - "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), - }, - "fallback": types.BoolType, - "isolation_mode": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "read_only": types.BoolType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "url": types.StringType, + "access_point": types.StringType, + "browse_only": types.BoolType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "credential_id": types.StringType, + "credential_name": types.StringType, + "encryption_details": EncryptionDetails{}.Type(ctx), + "fallback": types.BoolType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "url": types.StringType, }, } } @@ -6556,7 +6554,10 @@ func (o *ExternalLocationInfo) GetEncryptionDetails(ctx context.Context) (Encryp return e, false } var v []EncryptionDetails - d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + d := o.EncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6568,9 +6569,8 @@ func (o *ExternalLocationInfo) GetEncryptionDetails(ctx context.Context) (Encryp // SetEncryptionDetails sets the value of the EncryptionDetails field in ExternalLocationInfo. func (o *ExternalLocationInfo) SetEncryptionDetails(ctx context.Context, v EncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] - o.EncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EncryptionDetails = vs } // Detailed status of an online table. Shown if the online table is in the @@ -6810,7 +6810,7 @@ type FunctionInfo struct { // Id of Function, relative to parent schema. FunctionId types.String `tfsdk:"function_id" tf:"optional"` - InputParams types.List `tfsdk:"input_params" tf:"optional,object"` + InputParams types.Object `tfsdk:"input_params" tf:"optional,object"` // Whether the function is deterministic. IsDeterministic types.Bool `tfsdk:"is_deterministic" tf:"optional"` // Function null call. @@ -6826,7 +6826,7 @@ type FunctionInfo struct { // JSON-serialized key-value pair map, encoded (escaped) as a string. Properties types.String `tfsdk:"properties" tf:"optional"` // Table function return parameters. - ReturnParams types.List `tfsdk:"return_params" tf:"optional,object"` + ReturnParams types.Object `tfsdk:"return_params" tf:"optional,object"` // Function language. When **EXTERNAL** is used, the language of the routine // function should be specified in the __external_language__ field, and the // __return_params__ of the function cannot be used (as **TABLE** return @@ -6836,7 +6836,7 @@ type FunctionInfo struct { // Function body. RoutineDefinition types.String `tfsdk:"routine_definition" tf:"optional"` // Function dependencies. - RoutineDependencies types.List `tfsdk:"routine_dependencies" tf:"optional,object"` + RoutineDependencies types.Object `tfsdk:"routine_dependencies" tf:"optional,object"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name" tf:"optional"` // Function security type. @@ -6918,42 +6918,36 @@ func (o FunctionInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o FunctionInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "browse_only": types.BoolType, - "catalog_name": types.StringType, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "data_type": types.StringType, - "external_language": types.StringType, - "external_name": types.StringType, - "full_data_type": types.StringType, - "full_name": types.StringType, - "function_id": types.StringType, - "input_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), - }, - "is_deterministic": types.BoolType, - "is_null_call": types.BoolType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "parameter_style": types.StringType, - "properties": types.StringType, - "return_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), - }, - "routine_body": types.StringType, - "routine_definition": types.StringType, - "routine_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), - }, - "schema_name": types.StringType, - "security_type": types.StringType, - "specific_name": types.StringType, - "sql_data_access": types.StringType, - "sql_path": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_type": types.StringType, + "external_language": types.StringType, + "external_name": types.StringType, + "full_data_type": types.StringType, + "full_name": types.StringType, + "function_id": types.StringType, + "input_params": FunctionParameterInfos{}.Type(ctx), + "is_deterministic": types.BoolType, + "is_null_call": types.BoolType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "parameter_style": types.StringType, + "properties": types.StringType, + "return_params": FunctionParameterInfos{}.Type(ctx), + "routine_body": types.StringType, + "routine_definition": types.StringType, + "routine_dependencies": DependencyList{}.Type(ctx), + "schema_name": types.StringType, + "security_type": types.StringType, + "specific_name": types.StringType, + "sql_data_access": types.StringType, + "sql_path": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, }, } } @@ -6967,7 +6961,10 @@ func (o *FunctionInfo) GetInputParams(ctx context.Context) (FunctionParameterInf return e, false } var v []FunctionParameterInfos - d := o.InputParams.ElementsAs(ctx, &v, true) + d := o.InputParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6979,9 +6976,8 @@ func (o *FunctionInfo) GetInputParams(ctx context.Context) (FunctionParameterInf // SetInputParams sets the value of the InputParams field in FunctionInfo. func (o *FunctionInfo) SetInputParams(ctx context.Context, v FunctionParameterInfos) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input_params"] - o.InputParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InputParams = vs } // GetReturnParams returns the value of the ReturnParams field in FunctionInfo as @@ -6993,7 +6989,10 @@ func (o *FunctionInfo) GetReturnParams(ctx context.Context) (FunctionParameterIn return e, false } var v []FunctionParameterInfos - d := o.ReturnParams.ElementsAs(ctx, &v, true) + d := o.ReturnParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7005,9 +7004,8 @@ func (o *FunctionInfo) GetReturnParams(ctx context.Context) (FunctionParameterIn // SetReturnParams sets the value of the ReturnParams field in FunctionInfo. func (o *FunctionInfo) SetReturnParams(ctx context.Context, v FunctionParameterInfos) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["return_params"] - o.ReturnParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ReturnParams = vs } // GetRoutineDependencies returns the value of the RoutineDependencies field in FunctionInfo as @@ -7019,7 +7017,10 @@ func (o *FunctionInfo) GetRoutineDependencies(ctx context.Context) (DependencyLi return e, false } var v []DependencyList - d := o.RoutineDependencies.ElementsAs(ctx, &v, true) + d := o.RoutineDependencies.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7031,9 +7032,8 @@ func (o *FunctionInfo) GetRoutineDependencies(ctx context.Context) (DependencyLi // SetRoutineDependencies sets the value of the RoutineDependencies field in FunctionInfo. func (o *FunctionInfo) SetRoutineDependencies(ctx context.Context, v DependencyList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["routine_dependencies"] - o.RoutineDependencies = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RoutineDependencies = vs } type FunctionParameterInfo struct { @@ -7390,12 +7390,12 @@ func (o *GenerateTemporaryServiceCredentialGcpOptions) SetScopes(ctx context.Con type GenerateTemporaryServiceCredentialRequest struct { // The Azure cloud options to customize the requested temporary credential - AzureOptions types.List `tfsdk:"azure_options" tf:"optional,object"` + AzureOptions types.Object `tfsdk:"azure_options" tf:"optional,object"` // The name of the service credential used to generate a temporary // credential CredentialName types.String `tfsdk:"credential_name" tf:""` // The GCP cloud options to customize the requested temporary credential - GcpOptions types.List `tfsdk:"gcp_options" tf:"optional,object"` + GcpOptions types.Object `tfsdk:"gcp_options" tf:"optional,object"` } func (newState *GenerateTemporaryServiceCredentialRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenerateTemporaryServiceCredentialRequest) { @@ -7435,13 +7435,9 @@ func (o GenerateTemporaryServiceCredentialRequest) ToObjectValue(ctx context.Con func (o GenerateTemporaryServiceCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "azure_options": basetypes.ListType{ - ElemType: GenerateTemporaryServiceCredentialAzureOptions{}.Type(ctx), - }, + "azure_options": GenerateTemporaryServiceCredentialAzureOptions{}.Type(ctx), "credential_name": types.StringType, - "gcp_options": basetypes.ListType{ - ElemType: GenerateTemporaryServiceCredentialGcpOptions{}.Type(ctx), - }, + "gcp_options": GenerateTemporaryServiceCredentialGcpOptions{}.Type(ctx), }, } } @@ -7455,7 +7451,10 @@ func (o *GenerateTemporaryServiceCredentialRequest) GetAzureOptions(ctx context. return e, false } var v []GenerateTemporaryServiceCredentialAzureOptions - d := o.AzureOptions.ElementsAs(ctx, &v, true) + d := o.AzureOptions.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7467,9 +7466,8 @@ func (o *GenerateTemporaryServiceCredentialRequest) GetAzureOptions(ctx context. // SetAzureOptions sets the value of the AzureOptions field in GenerateTemporaryServiceCredentialRequest. func (o *GenerateTemporaryServiceCredentialRequest) SetAzureOptions(ctx context.Context, v GenerateTemporaryServiceCredentialAzureOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_options"] - o.AzureOptions = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureOptions = vs } // GetGcpOptions returns the value of the GcpOptions field in GenerateTemporaryServiceCredentialRequest as @@ -7481,7 +7479,10 @@ func (o *GenerateTemporaryServiceCredentialRequest) GetGcpOptions(ctx context.Co return e, false } var v []GenerateTemporaryServiceCredentialGcpOptions - d := o.GcpOptions.ElementsAs(ctx, &v, true) + d := o.GcpOptions.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7493,9 +7494,8 @@ func (o *GenerateTemporaryServiceCredentialRequest) GetGcpOptions(ctx context.Co // SetGcpOptions sets the value of the GcpOptions field in GenerateTemporaryServiceCredentialRequest. func (o *GenerateTemporaryServiceCredentialRequest) SetGcpOptions(ctx context.Context, v GenerateTemporaryServiceCredentialGcpOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_options"] - o.GcpOptions = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpOptions = vs } type GenerateTemporaryTableCredentialRequest struct { @@ -7549,23 +7549,23 @@ 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.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"optional,object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.Object `tfsdk:"azure_aad" tf:"optional,object"` // Azure temporary credentials for API authentication. Read more at // https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - AzureUserDelegationSas types.List `tfsdk:"azure_user_delegation_sas" tf:"optional,object"` + AzureUserDelegationSas types.Object `tfsdk:"azure_user_delegation_sas" tf:"optional,object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` // GCP temporary credentials for API authentication. Read more at // https://developers.google.com/identity/protocols/oauth2/service-account - GcpOauthToken types.List `tfsdk:"gcp_oauth_token" tf:"optional,object"` + GcpOauthToken types.Object `tfsdk:"gcp_oauth_token" tf:"optional,object"` // R2 temporary credentials for API authentication. Read more at // https://developers.cloudflare.com/r2/api/s3/tokens/. - R2TempCredentials types.List `tfsdk:"r2_temp_credentials" tf:"optional,object"` + R2TempCredentials types.Object `tfsdk:"r2_temp_credentials" tf:"optional,object"` // The URL of the storage path accessible by the temporary credential. Url types.String `tfsdk:"url" tf:"optional"` } @@ -7614,23 +7614,13 @@ func (o GenerateTemporaryTableCredentialResponse) ToObjectValue(ctx context.Cont func (o GenerateTemporaryTableCredentialResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_temp_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), - }, - "azure_aad": basetypes.ListType{ - ElemType: AzureActiveDirectoryToken{}.Type(ctx), - }, - "azure_user_delegation_sas": basetypes.ListType{ - ElemType: AzureUserDelegationSas{}.Type(ctx), - }, - "expiration_time": types.Int64Type, - "gcp_oauth_token": basetypes.ListType{ - ElemType: GcpOauthToken{}.Type(ctx), - }, - "r2_temp_credentials": basetypes.ListType{ - ElemType: R2Credentials{}.Type(ctx), - }, - "url": types.StringType, + "aws_temp_credentials": AwsCredentials{}.Type(ctx), + "azure_aad": AzureActiveDirectoryToken{}.Type(ctx), + "azure_user_delegation_sas": AzureUserDelegationSas{}.Type(ctx), + "expiration_time": types.Int64Type, + "gcp_oauth_token": GcpOauthToken{}.Type(ctx), + "r2_temp_credentials": R2Credentials{}.Type(ctx), + "url": types.StringType, }, } } @@ -7644,7 +7634,10 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAwsTempCredentials(ctx con return e, false } var v []AwsCredentials - d := o.AwsTempCredentials.ElementsAs(ctx, &v, true) + d := o.AwsTempCredentials.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7656,9 +7649,8 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAwsTempCredentials(ctx con // SetAwsTempCredentials sets the value of the AwsTempCredentials field in GenerateTemporaryTableCredentialResponse. func (o *GenerateTemporaryTableCredentialResponse) SetAwsTempCredentials(ctx context.Context, v AwsCredentials) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_temp_credentials"] - o.AwsTempCredentials = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsTempCredentials = vs } // GetAzureAad returns the value of the AzureAad field in GenerateTemporaryTableCredentialResponse as @@ -7670,7 +7662,10 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAzureAad(ctx context.Conte return e, false } var v []AzureActiveDirectoryToken - d := o.AzureAad.ElementsAs(ctx, &v, true) + d := o.AzureAad.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7682,9 +7677,8 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAzureAad(ctx context.Conte // SetAzureAad sets the value of the AzureAad field in GenerateTemporaryTableCredentialResponse. func (o *GenerateTemporaryTableCredentialResponse) SetAzureAad(ctx context.Context, v AzureActiveDirectoryToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_aad"] - o.AzureAad = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAad = vs } // GetAzureUserDelegationSas returns the value of the AzureUserDelegationSas field in GenerateTemporaryTableCredentialResponse as @@ -7696,7 +7690,10 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAzureUserDelegationSas(ctx return e, false } var v []AzureUserDelegationSas - d := o.AzureUserDelegationSas.ElementsAs(ctx, &v, true) + d := o.AzureUserDelegationSas.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7708,9 +7705,8 @@ func (o *GenerateTemporaryTableCredentialResponse) GetAzureUserDelegationSas(ctx // SetAzureUserDelegationSas sets the value of the AzureUserDelegationSas field in GenerateTemporaryTableCredentialResponse. func (o *GenerateTemporaryTableCredentialResponse) SetAzureUserDelegationSas(ctx context.Context, v AzureUserDelegationSas) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_user_delegation_sas"] - o.AzureUserDelegationSas = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureUserDelegationSas = vs } // GetGcpOauthToken returns the value of the GcpOauthToken field in GenerateTemporaryTableCredentialResponse as @@ -7722,7 +7718,10 @@ func (o *GenerateTemporaryTableCredentialResponse) GetGcpOauthToken(ctx context. return e, false } var v []GcpOauthToken - d := o.GcpOauthToken.ElementsAs(ctx, &v, true) + d := o.GcpOauthToken.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7734,9 +7733,8 @@ func (o *GenerateTemporaryTableCredentialResponse) GetGcpOauthToken(ctx context. // SetGcpOauthToken sets the value of the GcpOauthToken field in GenerateTemporaryTableCredentialResponse. func (o *GenerateTemporaryTableCredentialResponse) SetGcpOauthToken(ctx context.Context, v GcpOauthToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_oauth_token"] - o.GcpOauthToken = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpOauthToken = vs } // GetR2TempCredentials returns the value of the R2TempCredentials field in GenerateTemporaryTableCredentialResponse as @@ -7748,7 +7746,10 @@ func (o *GenerateTemporaryTableCredentialResponse) GetR2TempCredentials(ctx cont return e, false } var v []R2Credentials - d := o.R2TempCredentials.ElementsAs(ctx, &v, true) + d := o.R2TempCredentials.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7760,9 +7761,8 @@ func (o *GenerateTemporaryTableCredentialResponse) GetR2TempCredentials(ctx cont // SetR2TempCredentials sets the value of the R2TempCredentials field in GenerateTemporaryTableCredentialResponse. func (o *GenerateTemporaryTableCredentialResponse) SetR2TempCredentials(ctx context.Context, v R2Credentials) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["r2_temp_credentials"] - o.R2TempCredentials = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.R2TempCredentials = vs } // Gets the metastore assignment for a workspace @@ -8747,7 +8747,7 @@ func (o GetQuotaRequest) Type(ctx context.Context) attr.Type { type GetQuotaResponse struct { // The returned QuotaInfo. - QuotaInfo types.List `tfsdk:"quota_info" tf:"optional,object"` + QuotaInfo types.Object `tfsdk:"quota_info" tf:"optional,object"` } func (newState *GetQuotaResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQuotaResponse) { @@ -8784,9 +8784,7 @@ func (o GetQuotaResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o GetQuotaResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "quota_info": basetypes.ListType{ - ElemType: QuotaInfo{}.Type(ctx), - }, + "quota_info": QuotaInfo{}.Type(ctx), }, } } @@ -8800,7 +8798,10 @@ func (o *GetQuotaResponse) GetQuotaInfo(ctx context.Context) (QuotaInfo, bool) { return e, false } var v []QuotaInfo - d := o.QuotaInfo.ElementsAs(ctx, &v, true) + d := o.QuotaInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8812,9 +8813,8 @@ func (o *GetQuotaResponse) GetQuotaInfo(ctx context.Context) (QuotaInfo, bool) { // SetQuotaInfo sets the value of the QuotaInfo field in GetQuotaResponse. func (o *GetQuotaResponse) SetQuotaInfo(ctx context.Context, v QuotaInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["quota_info"] - o.QuotaInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QuotaInfo = vs } // Get refresh @@ -11606,7 +11606,7 @@ type ModelVersionInfo struct { // parent schema ModelName types.String `tfsdk:"model_name" tf:"optional"` // Model version dependencies, for feature-store packaged models - ModelVersionDependencies types.List `tfsdk:"model_version_dependencies" tf:"optional,object"` + ModelVersionDependencies types.Object `tfsdk:"model_version_dependencies" tf:"optional,object"` // MLflow run ID used when creating the model version, if ``source`` was // generated by an experiment run stored in an MLflow tracking server RunId types.String `tfsdk:"run_id" tf:"optional"` @@ -11692,26 +11692,24 @@ func (o ModelVersionInfo) Type(ctx context.Context) attr.Type { "aliases": basetypes.ListType{ ElemType: RegisteredModelAlias{}.Type(ctx), }, - "browse_only": types.BoolType, - "catalog_name": types.StringType, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "id": types.StringType, - "metastore_id": types.StringType, - "model_name": types.StringType, - "model_version_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), - }, - "run_id": types.StringType, - "run_workspace_id": types.Int64Type, - "schema_name": types.StringType, - "source": types.StringType, - "status": types.StringType, - "storage_location": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "version": types.Int64Type, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "id": types.StringType, + "metastore_id": types.StringType, + "model_name": types.StringType, + "model_version_dependencies": DependencyList{}.Type(ctx), + "run_id": types.StringType, + "run_workspace_id": types.Int64Type, + "schema_name": types.StringType, + "source": types.StringType, + "status": types.StringType, + "storage_location": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "version": types.Int64Type, }, } } @@ -11751,7 +11749,10 @@ func (o *ModelVersionInfo) GetModelVersionDependencies(ctx context.Context) (Dep return e, false } var v []DependencyList - d := o.ModelVersionDependencies.ElementsAs(ctx, &v, true) + d := o.ModelVersionDependencies.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11763,9 +11764,8 @@ func (o *ModelVersionInfo) GetModelVersionDependencies(ctx context.Context) (Dep // SetModelVersionDependencies sets the value of the ModelVersionDependencies field in ModelVersionInfo. func (o *ModelVersionInfo) SetModelVersionDependencies(ctx context.Context, v DependencyList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version_dependencies"] - o.ModelVersionDependencies = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ModelVersionDependencies = vs } type MonitorCronSchedule struct { @@ -12061,26 +12061,26 @@ type MonitorInfo struct { // if the monitor is in PENDING state. DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` // The full name of the drift metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. DriftMetricsTableName types.String `tfsdk:"drift_metrics_table_name" tf:""` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` // The latest failure message of the monitor (if any). LatestMonitorFailureMsg types.String `tfsdk:"latest_monitor_failure_msg" tf:"optional"` // The version of the monitor config (e.g. 1,2,3). If negative, the monitor // may be corrupted. MonitorVersion types.String `tfsdk:"monitor_version" tf:""` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` // The full name of the profile metrics table. Format: // __catalog_name__.__schema_name__.__table_name__. ProfileMetricsTableName types.String `tfsdk:"profile_metrics_table_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality @@ -12088,14 +12088,14 @@ type MonitorInfo struct { // slices. SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` // The status of the monitor. Status types.String `tfsdk:"status" tf:""` // The full name of the table to monitor. Format: // __catalog_name__.__schema_name__.__table_name__. TableName types.String `tfsdk:"table_name" tf:""` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` } func (newState *MonitorInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorInfo) { @@ -12161,35 +12161,23 @@ func (o MonitorInfo) Type(ctx context.Context) attr.Type { "custom_metrics": basetypes.ListType{ ElemType: MonitorMetric{}.Type(ctx), }, - "dashboard_id": types.StringType, - "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), - }, - "drift_metrics_table_name": types.StringType, - "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), - }, + "dashboard_id": types.StringType, + "data_classification_config": MonitorDataClassificationConfig{}.Type(ctx), + "drift_metrics_table_name": types.StringType, + "inference_log": MonitorInferenceLog{}.Type(ctx), "latest_monitor_failure_msg": types.StringType, "monitor_version": types.StringType, - "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), - }, + "notifications": MonitorNotifications{}.Type(ctx), "output_schema_name": types.StringType, "profile_metrics_table_name": types.StringType, - "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), - }, + "schedule": MonitorCronSchedule{}.Type(ctx), "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, - "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), - }, - "status": types.StringType, - "table_name": types.StringType, - "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), - }, + "snapshot": MonitorSnapshot{}.Type(ctx), + "status": types.StringType, + "table_name": types.StringType, + "time_series": MonitorTimeSeries{}.Type(ctx), }, } } @@ -12229,7 +12217,10 @@ func (o *MonitorInfo) GetDataClassificationConfig(ctx context.Context) (MonitorD return e, false } var v []MonitorDataClassificationConfig - d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + d := o.DataClassificationConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12241,9 +12232,8 @@ func (o *MonitorInfo) GetDataClassificationConfig(ctx context.Context) (MonitorD // SetDataClassificationConfig sets the value of the DataClassificationConfig field in MonitorInfo. func (o *MonitorInfo) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] - o.DataClassificationConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataClassificationConfig = vs } // GetInferenceLog returns the value of the InferenceLog field in MonitorInfo as @@ -12255,7 +12245,10 @@ func (o *MonitorInfo) GetInferenceLog(ctx context.Context) (MonitorInferenceLog, return e, false } var v []MonitorInferenceLog - d := o.InferenceLog.ElementsAs(ctx, &v, true) + d := o.InferenceLog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12267,9 +12260,8 @@ func (o *MonitorInfo) GetInferenceLog(ctx context.Context) (MonitorInferenceLog, // SetInferenceLog sets the value of the InferenceLog field in MonitorInfo. func (o *MonitorInfo) SetInferenceLog(ctx context.Context, v MonitorInferenceLog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] - o.InferenceLog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceLog = vs } // GetNotifications returns the value of the Notifications field in MonitorInfo as @@ -12281,7 +12273,10 @@ func (o *MonitorInfo) GetNotifications(ctx context.Context) (MonitorNotification return e, false } var v []MonitorNotifications - d := o.Notifications.ElementsAs(ctx, &v, true) + d := o.Notifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12293,9 +12288,8 @@ func (o *MonitorInfo) GetNotifications(ctx context.Context) (MonitorNotification // SetNotifications sets the value of the Notifications field in MonitorInfo. func (o *MonitorInfo) SetNotifications(ctx context.Context, v MonitorNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] - o.Notifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Notifications = vs } // GetSchedule returns the value of the Schedule field in MonitorInfo as @@ -12307,7 +12301,10 @@ func (o *MonitorInfo) GetSchedule(ctx context.Context) (MonitorCronSchedule, boo return e, false } var v []MonitorCronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12319,9 +12316,8 @@ func (o *MonitorInfo) GetSchedule(ctx context.Context) (MonitorCronSchedule, boo // SetSchedule sets the value of the Schedule field in MonitorInfo. func (o *MonitorInfo) SetSchedule(ctx context.Context, v MonitorCronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetSlicingExprs returns the value of the SlicingExprs field in MonitorInfo as @@ -12359,7 +12355,10 @@ func (o *MonitorInfo) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) { return e, false } var v []MonitorSnapshot - d := o.Snapshot.ElementsAs(ctx, &v, true) + d := o.Snapshot.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12371,9 +12370,8 @@ func (o *MonitorInfo) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) { // SetSnapshot sets the value of the Snapshot field in MonitorInfo. func (o *MonitorInfo) SetSnapshot(ctx context.Context, v MonitorSnapshot) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] - o.Snapshot = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Snapshot = vs } // GetTimeSeries returns the value of the TimeSeries field in MonitorInfo as @@ -12385,7 +12383,10 @@ func (o *MonitorInfo) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, boo return e, false } var v []MonitorTimeSeries - d := o.TimeSeries.ElementsAs(ctx, &v, true) + d := o.TimeSeries.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12397,9 +12398,8 @@ func (o *MonitorInfo) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, boo // SetTimeSeries sets the value of the TimeSeries field in MonitorInfo. func (o *MonitorInfo) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] - o.TimeSeries = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TimeSeries = vs } type MonitorMetric struct { @@ -12506,10 +12506,10 @@ func (o *MonitorMetric) SetInputColumns(ctx context.Context, v []types.String) { type MonitorNotifications struct { // Who to send notifications to on monitor failure. - OnFailure types.List `tfsdk:"on_failure" tf:"optional,object"` + OnFailure types.Object `tfsdk:"on_failure" tf:"optional,object"` // Who to send notifications to when new data classification tags are // detected. - OnNewClassificationTagDetected types.List `tfsdk:"on_new_classification_tag_detected" tf:"optional,object"` + OnNewClassificationTagDetected types.Object `tfsdk:"on_new_classification_tag_detected" tf:"optional,object"` } func (newState *MonitorNotifications) SyncEffectiveFieldsDuringCreateOrUpdate(plan MonitorNotifications) { @@ -12548,12 +12548,8 @@ func (o MonitorNotifications) ToObjectValue(ctx context.Context) basetypes.Objec func (o MonitorNotifications) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "on_failure": basetypes.ListType{ - ElemType: MonitorDestination{}.Type(ctx), - }, - "on_new_classification_tag_detected": basetypes.ListType{ - ElemType: MonitorDestination{}.Type(ctx), - }, + "on_failure": MonitorDestination{}.Type(ctx), + "on_new_classification_tag_detected": MonitorDestination{}.Type(ctx), }, } } @@ -12567,7 +12563,10 @@ func (o *MonitorNotifications) GetOnFailure(ctx context.Context) (MonitorDestina return e, false } var v []MonitorDestination - d := o.OnFailure.ElementsAs(ctx, &v, true) + d := o.OnFailure.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12579,9 +12578,8 @@ func (o *MonitorNotifications) GetOnFailure(ctx context.Context) (MonitorDestina // SetOnFailure sets the value of the OnFailure field in MonitorNotifications. func (o *MonitorNotifications) SetOnFailure(ctx context.Context, v MonitorDestination) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["on_failure"] - o.OnFailure = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OnFailure = vs } // GetOnNewClassificationTagDetected returns the value of the OnNewClassificationTagDetected field in MonitorNotifications as @@ -12593,7 +12591,10 @@ func (o *MonitorNotifications) GetOnNewClassificationTagDetected(ctx context.Con return e, false } var v []MonitorDestination - d := o.OnNewClassificationTagDetected.ElementsAs(ctx, &v, true) + d := o.OnNewClassificationTagDetected.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12605,9 +12606,8 @@ func (o *MonitorNotifications) GetOnNewClassificationTagDetected(ctx context.Con // SetOnNewClassificationTagDetected sets the value of the OnNewClassificationTagDetected field in MonitorNotifications. func (o *MonitorNotifications) SetOnNewClassificationTagDetected(ctx context.Context, v MonitorDestination) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["on_new_classification_tag_detected"] - o.OnNewClassificationTagDetected = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OnNewClassificationTagDetected = vs } type MonitorRefreshInfo struct { @@ -12914,9 +12914,9 @@ type OnlineTable struct { // Full three-part (catalog, schema, table) name of the table. Name types.String `tfsdk:"name" tf:"optional"` // Specification of the online table. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"optional,object"` // Online Table data synchronization status - Status types.List `tfsdk:"status" tf:"computed,object"` + Status types.Object `tfsdk:"status" tf:"computed,object"` // Data serving REST API URL for this table TableServingUrl types.String `tfsdk:"table_serving_url" tf:"computed"` // The provisioning state of the online table entity in Unity Catalog. This @@ -12965,13 +12965,9 @@ func (o OnlineTable) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o OnlineTable) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, - "spec": basetypes.ListType{ - ElemType: OnlineTableSpec{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: OnlineTableStatus{}.Type(ctx), - }, + "name": types.StringType, + "spec": OnlineTableSpec{}.Type(ctx), + "status": OnlineTableStatus{}.Type(ctx), "table_serving_url": types.StringType, "unity_catalog_provisioning_state": types.StringType, }, @@ -12987,7 +12983,10 @@ func (o *OnlineTable) GetSpec(ctx context.Context) (OnlineTableSpec, bool) { return e, false } var v []OnlineTableSpec - d := o.Spec.ElementsAs(ctx, &v, true) + d := o.Spec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12999,9 +12998,8 @@ func (o *OnlineTable) GetSpec(ctx context.Context) (OnlineTableSpec, bool) { // SetSpec sets the value of the Spec field in OnlineTable. func (o *OnlineTable) SetSpec(ctx context.Context, v OnlineTableSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] - o.Spec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Spec = vs } // GetStatus returns the value of the Status field in OnlineTable as @@ -13013,7 +13011,10 @@ func (o *OnlineTable) GetStatus(ctx context.Context) (OnlineTableStatus, bool) { return e, false } var v []OnlineTableStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13025,9 +13026,8 @@ func (o *OnlineTable) GetStatus(ctx context.Context) (OnlineTableStatus, bool) { // SetStatus sets the value of the Status field in OnlineTable. func (o *OnlineTable) SetStatus(ctx context.Context, v OnlineTableStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // Specification of an online table. @@ -13046,10 +13046,10 @@ type OnlineTableSpec struct { // Primary Key columns to be used for data insert/update in the destination. PrimaryKeyColumns types.List `tfsdk:"primary_key_columns" tf:"optional"` // Pipeline runs continuously after generating the initial data. - RunContinuously types.List `tfsdk:"run_continuously" tf:"optional,object"` + RunContinuously types.Object `tfsdk:"run_continuously" tf:"optional,object"` // Pipeline stops after generating the initial data and can be triggered // later (manually, through a cron job or through data triggers) - RunTriggered types.List `tfsdk:"run_triggered" tf:"optional,object"` + RunTriggered types.Object `tfsdk:"run_triggered" tf:"optional,object"` // Three-part (catalog, schema, table) name of the source Delta table. SourceTableFullName types.String `tfsdk:"source_table_full_name" tf:"optional"` // Time series key to deduplicate (tie-break) rows with the same primary @@ -13104,12 +13104,8 @@ func (o OnlineTableSpec) Type(ctx context.Context) attr.Type { "primary_key_columns": basetypes.ListType{ ElemType: types.StringType, }, - "run_continuously": basetypes.ListType{ - ElemType: OnlineTableSpecContinuousSchedulingPolicy{}.Type(ctx), - }, - "run_triggered": basetypes.ListType{ - ElemType: OnlineTableSpecTriggeredSchedulingPolicy{}.Type(ctx), - }, + "run_continuously": OnlineTableSpecContinuousSchedulingPolicy{}.Type(ctx), + "run_triggered": OnlineTableSpecTriggeredSchedulingPolicy{}.Type(ctx), "source_table_full_name": types.StringType, "timeseries_key": types.StringType, }, @@ -13151,7 +13147,10 @@ func (o *OnlineTableSpec) GetRunContinuously(ctx context.Context) (OnlineTableSp return e, false } var v []OnlineTableSpecContinuousSchedulingPolicy - d := o.RunContinuously.ElementsAs(ctx, &v, true) + d := o.RunContinuously.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13163,9 +13162,8 @@ func (o *OnlineTableSpec) GetRunContinuously(ctx context.Context) (OnlineTableSp // SetRunContinuously sets the value of the RunContinuously field in OnlineTableSpec. func (o *OnlineTableSpec) SetRunContinuously(ctx context.Context, v OnlineTableSpecContinuousSchedulingPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_continuously"] - o.RunContinuously = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunContinuously = vs } // GetRunTriggered returns the value of the RunTriggered field in OnlineTableSpec as @@ -13177,7 +13175,10 @@ func (o *OnlineTableSpec) GetRunTriggered(ctx context.Context) (OnlineTableSpecT return e, false } var v []OnlineTableSpecTriggeredSchedulingPolicy - d := o.RunTriggered.ElementsAs(ctx, &v, true) + d := o.RunTriggered.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13189,9 +13190,8 @@ func (o *OnlineTableSpec) GetRunTriggered(ctx context.Context) (OnlineTableSpecT // SetRunTriggered sets the value of the RunTriggered field in OnlineTableSpec. func (o *OnlineTableSpec) SetRunTriggered(ctx context.Context, v OnlineTableSpecTriggeredSchedulingPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_triggered"] - o.RunTriggered = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunTriggered = vs } type OnlineTableSpecContinuousSchedulingPolicy struct { @@ -13270,21 +13270,21 @@ func (o OnlineTableSpecTriggeredSchedulingPolicy) Type(ctx context.Context) attr type OnlineTableStatus struct { // Detailed status of an online table. Shown if the online table is in the // ONLINE_CONTINUOUS_UPDATE or the ONLINE_UPDATING_PIPELINE_RESOURCES state. - ContinuousUpdateStatus types.List `tfsdk:"continuous_update_status" tf:"optional,object"` + ContinuousUpdateStatus types.Object `tfsdk:"continuous_update_status" tf:"optional,object"` // The state of the online table. DetailedState types.String `tfsdk:"detailed_state" tf:"optional"` // Detailed status of an online table. Shown if the online table is in the // OFFLINE_FAILED or the ONLINE_PIPELINE_FAILED state. - FailedStatus types.List `tfsdk:"failed_status" tf:"optional,object"` + FailedStatus types.Object `tfsdk:"failed_status" tf:"optional,object"` // A text description of the current state of the online table. Message types.String `tfsdk:"message" tf:"optional"` // Detailed status of an online table. Shown if the online table is in the // PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT // state. - ProvisioningStatus types.List `tfsdk:"provisioning_status" tf:"optional,object"` + ProvisioningStatus types.Object `tfsdk:"provisioning_status" tf:"optional,object"` // Detailed status of an online table. Shown if the online table is in the // ONLINE_TRIGGERED_UPDATE or the ONLINE_NO_PENDING_UPDATE state. - TriggeredUpdateStatus types.List `tfsdk:"triggered_update_status" tf:"optional,object"` + TriggeredUpdateStatus types.Object `tfsdk:"triggered_update_status" tf:"optional,object"` } func (newState *OnlineTableStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan OnlineTableStatus) { @@ -13329,20 +13329,12 @@ func (o OnlineTableStatus) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o OnlineTableStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "continuous_update_status": basetypes.ListType{ - ElemType: ContinuousUpdateStatus{}.Type(ctx), - }, - "detailed_state": types.StringType, - "failed_status": basetypes.ListType{ - ElemType: FailedStatus{}.Type(ctx), - }, - "message": types.StringType, - "provisioning_status": basetypes.ListType{ - ElemType: ProvisioningStatus{}.Type(ctx), - }, - "triggered_update_status": basetypes.ListType{ - ElemType: TriggeredUpdateStatus{}.Type(ctx), - }, + "continuous_update_status": ContinuousUpdateStatus{}.Type(ctx), + "detailed_state": types.StringType, + "failed_status": FailedStatus{}.Type(ctx), + "message": types.StringType, + "provisioning_status": ProvisioningStatus{}.Type(ctx), + "triggered_update_status": TriggeredUpdateStatus{}.Type(ctx), }, } } @@ -13356,7 +13348,10 @@ func (o *OnlineTableStatus) GetContinuousUpdateStatus(ctx context.Context) (Cont return e, false } var v []ContinuousUpdateStatus - d := o.ContinuousUpdateStatus.ElementsAs(ctx, &v, true) + d := o.ContinuousUpdateStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13368,9 +13363,8 @@ func (o *OnlineTableStatus) GetContinuousUpdateStatus(ctx context.Context) (Cont // SetContinuousUpdateStatus sets the value of the ContinuousUpdateStatus field in OnlineTableStatus. func (o *OnlineTableStatus) SetContinuousUpdateStatus(ctx context.Context, v ContinuousUpdateStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous_update_status"] - o.ContinuousUpdateStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ContinuousUpdateStatus = vs } // GetFailedStatus returns the value of the FailedStatus field in OnlineTableStatus as @@ -13382,7 +13376,10 @@ func (o *OnlineTableStatus) GetFailedStatus(ctx context.Context) (FailedStatus, return e, false } var v []FailedStatus - d := o.FailedStatus.ElementsAs(ctx, &v, true) + d := o.FailedStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13394,9 +13391,8 @@ func (o *OnlineTableStatus) GetFailedStatus(ctx context.Context) (FailedStatus, // SetFailedStatus sets the value of the FailedStatus field in OnlineTableStatus. func (o *OnlineTableStatus) SetFailedStatus(ctx context.Context, v FailedStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["failed_status"] - o.FailedStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FailedStatus = vs } // GetProvisioningStatus returns the value of the ProvisioningStatus field in OnlineTableStatus as @@ -13408,7 +13404,10 @@ func (o *OnlineTableStatus) GetProvisioningStatus(ctx context.Context) (Provisio return e, false } var v []ProvisioningStatus - d := o.ProvisioningStatus.ElementsAs(ctx, &v, true) + d := o.ProvisioningStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13420,9 +13419,8 @@ func (o *OnlineTableStatus) GetProvisioningStatus(ctx context.Context) (Provisio // SetProvisioningStatus sets the value of the ProvisioningStatus field in OnlineTableStatus. func (o *OnlineTableStatus) SetProvisioningStatus(ctx context.Context, v ProvisioningStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provisioning_status"] - o.ProvisioningStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ProvisioningStatus = vs } // GetTriggeredUpdateStatus returns the value of the TriggeredUpdateStatus field in OnlineTableStatus as @@ -13434,7 +13432,10 @@ func (o *OnlineTableStatus) GetTriggeredUpdateStatus(ctx context.Context) (Trigg return e, false } var v []TriggeredUpdateStatus - d := o.TriggeredUpdateStatus.ElementsAs(ctx, &v, true) + d := o.TriggeredUpdateStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13446,9 +13447,8 @@ func (o *OnlineTableStatus) GetTriggeredUpdateStatus(ctx context.Context) (Trigg // SetTriggeredUpdateStatus sets the value of the TriggeredUpdateStatus field in OnlineTableStatus. func (o *OnlineTableStatus) SetTriggeredUpdateStatus(ctx context.Context, v TriggeredUpdateStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["triggered_update_status"] - o.TriggeredUpdateStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TriggeredUpdateStatus = vs } type PermissionsChange struct { @@ -13892,7 +13892,7 @@ func (o ProvisioningInfo) Type(ctx context.Context) attr.Type { type ProvisioningStatus struct { // Details about initial data synchronization. Only populated when in the // PROVISIONING_INITIAL_SNAPSHOT state. - InitialPipelineSyncProgress types.List `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` + InitialPipelineSyncProgress types.Object `tfsdk:"initial_pipeline_sync_progress" tf:"optional,object"` } func (newState *ProvisioningStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProvisioningStatus) { @@ -13929,9 +13929,7 @@ func (o ProvisioningStatus) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o ProvisioningStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "initial_pipeline_sync_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), - }, + "initial_pipeline_sync_progress": PipelineProgress{}.Type(ctx), }, } } @@ -13945,7 +13943,10 @@ func (o *ProvisioningStatus) GetInitialPipelineSyncProgress(ctx context.Context) return e, false } var v []PipelineProgress - d := o.InitialPipelineSyncProgress.ElementsAs(ctx, &v, true) + d := o.InitialPipelineSyncProgress.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13957,9 +13958,8 @@ func (o *ProvisioningStatus) GetInitialPipelineSyncProgress(ctx context.Context) // SetInitialPipelineSyncProgress sets the value of the InitialPipelineSyncProgress field in ProvisioningStatus. func (o *ProvisioningStatus) SetInitialPipelineSyncProgress(ctx context.Context, v PipelineProgress) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["initial_pipeline_sync_progress"] - o.InitialPipelineSyncProgress = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InitialPipelineSyncProgress = vs } type QuotaInfo struct { @@ -14453,7 +14453,7 @@ type SchemaInfo struct { // Username of schema creator. CreatedBy types.String `tfsdk:"created_by" tf:"optional"` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` // Whether predictive optimization should be enabled for this object and // objects under it. EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` @@ -14531,20 +14531,18 @@ func (o SchemaInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SchemaInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "browse_only": types.BoolType, - "catalog_name": types.StringType, - "catalog_type": types.StringType, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), - }, - "enable_predictive_optimization": types.StringType, - "full_name": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "catalog_type": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "effective_predictive_optimization_flag": EffectivePredictiveOptimizationFlag{}.Type(ctx), + "enable_predictive_optimization": types.StringType, + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, "properties": basetypes.MapType{ ElemType: types.StringType, }, @@ -14566,7 +14564,10 @@ func (o *SchemaInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context) return e, false } var v []EffectivePredictiveOptimizationFlag - d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + d := o.EffectivePredictiveOptimizationFlag.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14578,9 +14579,8 @@ func (o *SchemaInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context) // SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in SchemaInfo. func (o *SchemaInfo) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] - o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EffectivePredictiveOptimizationFlag = vs } // GetProperties returns the value of the Properties field in SchemaInfo as @@ -14785,13 +14785,13 @@ func (o SseEncryptionDetails) Type(ctx context.Context) attr.Type { type StorageCredentialInfo struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // Time at which this Credential was created, in epoch milliseconds. @@ -14799,7 +14799,7 @@ type StorageCredentialInfo struct { // Username of credential creator. CreatedBy types.String `tfsdk:"created_by" tf:"optional"` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // The full name of the credential. FullName types.String `tfsdk:"full_name" tf:"optional"` // The unique identifier of the credential. @@ -14878,34 +14878,24 @@ func (o StorageCredentialInfo) ToObjectValue(ctx context.Context) basetypes.Obje func (o StorageCredentialInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleResponse{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityResponse{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), - }, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountResponse{}.Type(ctx), - }, - "full_name": types.StringType, - "id": types.StringType, - "isolation_mode": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "read_only": types.BoolType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "used_for_managed_storage": types.BoolType, + "aws_iam_role": AwsIamRoleResponse{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentityResponse{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "cloudflare_api_token": CloudflareApiToken{}.Type(ctx), + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccountResponse{}.Type(ctx), + "full_name": types.StringType, + "id": types.StringType, + "isolation_mode": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "used_for_managed_storage": types.BoolType, }, } } @@ -14919,7 +14909,10 @@ func (o *StorageCredentialInfo) GetAwsIamRole(ctx context.Context) (AwsIamRoleRe return e, false } var v []AwsIamRoleResponse - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14931,9 +14924,8 @@ func (o *StorageCredentialInfo) GetAwsIamRole(ctx context.Context) (AwsIamRoleRe // SetAwsIamRole sets the value of the AwsIamRole field in StorageCredentialInfo. func (o *StorageCredentialInfo) SetAwsIamRole(ctx context.Context, v AwsIamRoleResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in StorageCredentialInfo as @@ -14945,7 +14937,10 @@ func (o *StorageCredentialInfo) GetAzureManagedIdentity(ctx context.Context) (Az return e, false } var v []AzureManagedIdentityResponse - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14957,9 +14952,8 @@ func (o *StorageCredentialInfo) GetAzureManagedIdentity(ctx context.Context) (Az // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in StorageCredentialInfo. func (o *StorageCredentialInfo) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in StorageCredentialInfo as @@ -14971,7 +14965,10 @@ func (o *StorageCredentialInfo) GetAzureServicePrincipal(ctx context.Context) (A return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14983,9 +14980,8 @@ func (o *StorageCredentialInfo) GetAzureServicePrincipal(ctx context.Context) (A // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in StorageCredentialInfo. func (o *StorageCredentialInfo) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetCloudflareApiToken returns the value of the CloudflareApiToken field in StorageCredentialInfo as @@ -14997,7 +14993,10 @@ func (o *StorageCredentialInfo) GetCloudflareApiToken(ctx context.Context) (Clou return e, false } var v []CloudflareApiToken - d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + d := o.CloudflareApiToken.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15009,9 +15008,8 @@ func (o *StorageCredentialInfo) GetCloudflareApiToken(ctx context.Context) (Clou // SetCloudflareApiToken sets the value of the CloudflareApiToken field in StorageCredentialInfo. func (o *StorageCredentialInfo) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] - o.CloudflareApiToken = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudflareApiToken = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in StorageCredentialInfo as @@ -15023,7 +15021,10 @@ func (o *StorageCredentialInfo) GetDatabricksGcpServiceAccount(ctx context.Conte return e, false } var v []DatabricksGcpServiceAccountResponse - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15035,9 +15036,8 @@ func (o *StorageCredentialInfo) GetDatabricksGcpServiceAccount(ctx context.Conte // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in StorageCredentialInfo. func (o *StorageCredentialInfo) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } type SystemSchemaInfo struct { @@ -15091,11 +15091,11 @@ func (o SystemSchemaInfo) Type(ctx context.Context) attr.Type { // __primary_key_constraint__, __foreign_key_constraint__, // __named_table_constraint__. type TableConstraint struct { - ForeignKeyConstraint types.List `tfsdk:"foreign_key_constraint" tf:"optional,object"` + ForeignKeyConstraint types.Object `tfsdk:"foreign_key_constraint" tf:"optional,object"` - NamedTableConstraint types.List `tfsdk:"named_table_constraint" tf:"optional,object"` + NamedTableConstraint types.Object `tfsdk:"named_table_constraint" tf:"optional,object"` - PrimaryKeyConstraint types.List `tfsdk:"primary_key_constraint" tf:"optional,object"` + PrimaryKeyConstraint types.Object `tfsdk:"primary_key_constraint" tf:"optional,object"` } func (newState *TableConstraint) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableConstraint) { @@ -15136,15 +15136,9 @@ func (o TableConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o TableConstraint) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "foreign_key_constraint": basetypes.ListType{ - ElemType: ForeignKeyConstraint{}.Type(ctx), - }, - "named_table_constraint": basetypes.ListType{ - ElemType: NamedTableConstraint{}.Type(ctx), - }, - "primary_key_constraint": basetypes.ListType{ - ElemType: PrimaryKeyConstraint{}.Type(ctx), - }, + "foreign_key_constraint": ForeignKeyConstraint{}.Type(ctx), + "named_table_constraint": NamedTableConstraint{}.Type(ctx), + "primary_key_constraint": PrimaryKeyConstraint{}.Type(ctx), }, } } @@ -15158,7 +15152,10 @@ func (o *TableConstraint) GetForeignKeyConstraint(ctx context.Context) (ForeignK return e, false } var v []ForeignKeyConstraint - d := o.ForeignKeyConstraint.ElementsAs(ctx, &v, true) + d := o.ForeignKeyConstraint.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15170,9 +15167,8 @@ func (o *TableConstraint) GetForeignKeyConstraint(ctx context.Context) (ForeignK // SetForeignKeyConstraint sets the value of the ForeignKeyConstraint field in TableConstraint. func (o *TableConstraint) SetForeignKeyConstraint(ctx context.Context, v ForeignKeyConstraint) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_key_constraint"] - o.ForeignKeyConstraint = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForeignKeyConstraint = vs } // GetNamedTableConstraint returns the value of the NamedTableConstraint field in TableConstraint as @@ -15184,7 +15180,10 @@ func (o *TableConstraint) GetNamedTableConstraint(ctx context.Context) (NamedTab return e, false } var v []NamedTableConstraint - d := o.NamedTableConstraint.ElementsAs(ctx, &v, true) + d := o.NamedTableConstraint.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15196,9 +15195,8 @@ func (o *TableConstraint) GetNamedTableConstraint(ctx context.Context) (NamedTab // SetNamedTableConstraint sets the value of the NamedTableConstraint field in TableConstraint. func (o *TableConstraint) SetNamedTableConstraint(ctx context.Context, v NamedTableConstraint) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["named_table_constraint"] - o.NamedTableConstraint = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NamedTableConstraint = vs } // GetPrimaryKeyConstraint returns the value of the PrimaryKeyConstraint field in TableConstraint as @@ -15210,7 +15208,10 @@ func (o *TableConstraint) GetPrimaryKeyConstraint(ctx context.Context) (PrimaryK return e, false } var v []PrimaryKeyConstraint - d := o.PrimaryKeyConstraint.ElementsAs(ctx, &v, true) + d := o.PrimaryKeyConstraint.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15222,9 +15223,8 @@ func (o *TableConstraint) GetPrimaryKeyConstraint(ctx context.Context) (PrimaryK // SetPrimaryKeyConstraint sets the value of the PrimaryKeyConstraint field in TableConstraint. func (o *TableConstraint) SetPrimaryKeyConstraint(ctx context.Context, v PrimaryKeyConstraint) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["primary_key_constraint"] - o.PrimaryKeyConstraint = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PrimaryKeyConstraint = vs } // A table that is dependent on a SQL object. @@ -15338,14 +15338,14 @@ type TableInfo struct { // omitted if table is not deleted. DeletedAt types.Int64 `tfsdk:"deleted_at" tf:"optional"` // Information pertaining to current state of the delta table. - DeltaRuntimePropertiesKvpairs types.List `tfsdk:"delta_runtime_properties_kvpairs" tf:"optional,object"` + DeltaRuntimePropertiesKvpairs types.Object `tfsdk:"delta_runtime_properties_kvpairs" tf:"optional,object"` - EffectivePredictiveOptimizationFlag types.List `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` + EffectivePredictiveOptimizationFlag types.Object `tfsdk:"effective_predictive_optimization_flag" tf:"optional,object"` // Whether predictive optimization should be enabled for this object and // objects under it. EnablePredictiveOptimization types.String `tfsdk:"enable_predictive_optimization" tf:"optional"` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` // Full name of table, in form of // __catalog_name__.__schema_name__.__table_name__ FullName types.String `tfsdk:"full_name" tf:"optional"` @@ -15361,7 +15361,7 @@ type TableInfo struct { // A map of key-value properties attached to the securable. Properties types.Map `tfsdk:"properties" tf:"optional"` - RowFilter types.List `tfsdk:"row_filter" tf:"optional,object"` + RowFilter types.Object `tfsdk:"row_filter" tf:"optional,object"` // Name of parent schema relative to its parent catalog. SchemaName types.String `tfsdk:"schema_name" tf:"optional"` // List of schemes whose objects can be referenced without qualification. @@ -15390,7 +15390,7 @@ type TableInfo struct { // provided; - when DependencyList is an empty list, the dependency is // provided but is empty; - when DependencyList is not an empty list, // dependencies are provided and recorded. - ViewDependencies types.List `tfsdk:"view_dependencies" tf:"optional,object"` + ViewDependencies types.Object `tfsdk:"view_dependencies" tf:"optional,object"` } func (newState *TableInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableInfo) { @@ -15471,33 +15471,25 @@ func (o TableInfo) Type(ctx context.Context) attr.Type { "columns": basetypes.ListType{ ElemType: ColumnInfo{}.Type(ctx), }, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "data_access_configuration_id": types.StringType, - "data_source_format": types.StringType, - "deleted_at": types.Int64Type, - "delta_runtime_properties_kvpairs": basetypes.ListType{ - ElemType: DeltaRuntimePropertiesKvPairs{}.Type(ctx), - }, - "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), - }, - "enable_predictive_optimization": types.StringType, - "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), - }, - "full_name": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "pipeline_id": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_access_configuration_id": types.StringType, + "data_source_format": types.StringType, + "deleted_at": types.Int64Type, + "delta_runtime_properties_kvpairs": DeltaRuntimePropertiesKvPairs{}.Type(ctx), + "effective_predictive_optimization_flag": EffectivePredictiveOptimizationFlag{}.Type(ctx), + "enable_predictive_optimization": types.StringType, + "encryption_details": EncryptionDetails{}.Type(ctx), + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "pipeline_id": types.StringType, "properties": basetypes.MapType{ ElemType: types.StringType, }, - "row_filter": basetypes.ListType{ - ElemType: TableRowFilter{}.Type(ctx), - }, + "row_filter": TableRowFilter{}.Type(ctx), "schema_name": types.StringType, "sql_path": types.StringType, "storage_credential_name": types.StringType, @@ -15505,14 +15497,12 @@ func (o TableInfo) Type(ctx context.Context) attr.Type { "table_constraints": basetypes.ListType{ ElemType: TableConstraint{}.Type(ctx), }, - "table_id": types.StringType, - "table_type": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "view_definition": types.StringType, - "view_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), - }, + "table_id": types.StringType, + "table_type": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "view_definition": types.StringType, + "view_dependencies": DependencyList{}.Type(ctx), }, } } @@ -15552,7 +15542,10 @@ func (o *TableInfo) GetDeltaRuntimePropertiesKvpairs(ctx context.Context) (Delta return e, false } var v []DeltaRuntimePropertiesKvPairs - d := o.DeltaRuntimePropertiesKvpairs.ElementsAs(ctx, &v, true) + d := o.DeltaRuntimePropertiesKvpairs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15564,9 +15557,8 @@ func (o *TableInfo) GetDeltaRuntimePropertiesKvpairs(ctx context.Context) (Delta // SetDeltaRuntimePropertiesKvpairs sets the value of the DeltaRuntimePropertiesKvpairs field in TableInfo. func (o *TableInfo) SetDeltaRuntimePropertiesKvpairs(ctx context.Context, v DeltaRuntimePropertiesKvPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_runtime_properties_kvpairs"] - o.DeltaRuntimePropertiesKvpairs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DeltaRuntimePropertiesKvpairs = vs } // GetEffectivePredictiveOptimizationFlag returns the value of the EffectivePredictiveOptimizationFlag field in TableInfo as @@ -15578,7 +15570,10 @@ func (o *TableInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context) return e, false } var v []EffectivePredictiveOptimizationFlag - d := o.EffectivePredictiveOptimizationFlag.ElementsAs(ctx, &v, true) + d := o.EffectivePredictiveOptimizationFlag.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15590,9 +15585,8 @@ func (o *TableInfo) GetEffectivePredictiveOptimizationFlag(ctx context.Context) // SetEffectivePredictiveOptimizationFlag sets the value of the EffectivePredictiveOptimizationFlag field in TableInfo. func (o *TableInfo) SetEffectivePredictiveOptimizationFlag(ctx context.Context, v EffectivePredictiveOptimizationFlag) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_predictive_optimization_flag"] - o.EffectivePredictiveOptimizationFlag = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EffectivePredictiveOptimizationFlag = vs } // GetEncryptionDetails returns the value of the EncryptionDetails field in TableInfo as @@ -15604,7 +15598,10 @@ func (o *TableInfo) GetEncryptionDetails(ctx context.Context) (EncryptionDetails return e, false } var v []EncryptionDetails - d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + d := o.EncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15616,9 +15613,8 @@ func (o *TableInfo) GetEncryptionDetails(ctx context.Context) (EncryptionDetails // SetEncryptionDetails sets the value of the EncryptionDetails field in TableInfo. func (o *TableInfo) SetEncryptionDetails(ctx context.Context, v EncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] - o.EncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EncryptionDetails = vs } // GetProperties returns the value of the Properties field in TableInfo as @@ -15656,7 +15652,10 @@ func (o *TableInfo) GetRowFilter(ctx context.Context) (TableRowFilter, bool) { return e, false } var v []TableRowFilter - d := o.RowFilter.ElementsAs(ctx, &v, true) + d := o.RowFilter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15668,9 +15667,8 @@ func (o *TableInfo) GetRowFilter(ctx context.Context) (TableRowFilter, bool) { // SetRowFilter sets the value of the RowFilter field in TableInfo. func (o *TableInfo) SetRowFilter(ctx context.Context, v TableRowFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["row_filter"] - o.RowFilter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RowFilter = vs } // GetTableConstraints returns the value of the TableConstraints field in TableInfo as @@ -15708,7 +15706,10 @@ func (o *TableInfo) GetViewDependencies(ctx context.Context) (DependencyList, bo return e, false } var v []DependencyList - d := o.ViewDependencies.ElementsAs(ctx, &v, true) + d := o.ViewDependencies.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15720,9 +15721,8 @@ func (o *TableInfo) GetViewDependencies(ctx context.Context) (DependencyList, bo // SetViewDependencies sets the value of the ViewDependencies field in TableInfo. func (o *TableInfo) SetViewDependencies(ctx context.Context, v DependencyList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view_dependencies"] - o.ViewDependencies = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ViewDependencies = vs } type TableRowFilter struct { @@ -15852,11 +15852,11 @@ func (o TableSummary) Type(ctx context.Context) attr.Type { type TemporaryCredentials struct { // AWS temporary credentials for API authentication. Read more at // https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html. - AwsTempCredentials types.List `tfsdk:"aws_temp_credentials" tf:"optional,object"` + AwsTempCredentials types.Object `tfsdk:"aws_temp_credentials" tf:"optional,object"` // Azure Active Directory token, essentially the Oauth token for Azure // Service Principal or Managed Identity. Read more at // https://learn.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/service-prin-aad-token - AzureAad types.List `tfsdk:"azure_aad" tf:"optional,object"` + AzureAad types.Object `tfsdk:"azure_aad" tf:"optional,object"` // Server time when the credential will expire, in epoch milliseconds. The // API client is advised to cache the credential given this expiration time. ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` @@ -15899,13 +15899,9 @@ func (o TemporaryCredentials) ToObjectValue(ctx context.Context) basetypes.Objec func (o TemporaryCredentials) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_temp_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), - }, - "azure_aad": basetypes.ListType{ - ElemType: AzureActiveDirectoryToken{}.Type(ctx), - }, - "expiration_time": types.Int64Type, + "aws_temp_credentials": AwsCredentials{}.Type(ctx), + "azure_aad": AzureActiveDirectoryToken{}.Type(ctx), + "expiration_time": types.Int64Type, }, } } @@ -15919,7 +15915,10 @@ func (o *TemporaryCredentials) GetAwsTempCredentials(ctx context.Context) (AwsCr return e, false } var v []AwsCredentials - d := o.AwsTempCredentials.ElementsAs(ctx, &v, true) + d := o.AwsTempCredentials.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15931,9 +15930,8 @@ func (o *TemporaryCredentials) GetAwsTempCredentials(ctx context.Context) (AwsCr // SetAwsTempCredentials sets the value of the AwsTempCredentials field in TemporaryCredentials. func (o *TemporaryCredentials) SetAwsTempCredentials(ctx context.Context, v AwsCredentials) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_temp_credentials"] - o.AwsTempCredentials = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsTempCredentials = vs } // GetAzureAad returns the value of the AzureAad field in TemporaryCredentials as @@ -15945,7 +15943,10 @@ func (o *TemporaryCredentials) GetAzureAad(ctx context.Context) (AzureActiveDire return e, false } var v []AzureActiveDirectoryToken - d := o.AzureAad.ElementsAs(ctx, &v, true) + d := o.AzureAad.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15957,9 +15958,8 @@ func (o *TemporaryCredentials) GetAzureAad(ctx context.Context) (AzureActiveDire // SetAzureAad sets the value of the AzureAad field in TemporaryCredentials. func (o *TemporaryCredentials) SetAzureAad(ctx context.Context, v AzureActiveDirectoryToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_aad"] - o.AzureAad = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAad = vs } // Detailed status of an online table. Shown if the online table is in the @@ -15973,7 +15973,7 @@ type TriggeredUpdateStatus struct { // table to the online table. Timestamp types.String `tfsdk:"timestamp" tf:"optional"` // Progress of the active data synchronization pipeline. - TriggeredUpdateProgress types.List `tfsdk:"triggered_update_progress" tf:"optional,object"` + TriggeredUpdateProgress types.Object `tfsdk:"triggered_update_progress" tf:"optional,object"` } func (newState *TriggeredUpdateStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggeredUpdateStatus) { @@ -16014,9 +16014,7 @@ func (o TriggeredUpdateStatus) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "last_processed_commit_version": types.Int64Type, "timestamp": types.StringType, - "triggered_update_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), - }, + "triggered_update_progress": PipelineProgress{}.Type(ctx), }, } } @@ -16030,7 +16028,10 @@ func (o *TriggeredUpdateStatus) GetTriggeredUpdateProgress(ctx context.Context) return e, false } var v []PipelineProgress - d := o.TriggeredUpdateProgress.ElementsAs(ctx, &v, true) + d := o.TriggeredUpdateProgress.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16042,9 +16043,8 @@ func (o *TriggeredUpdateStatus) GetTriggeredUpdateProgress(ctx context.Context) // SetTriggeredUpdateProgress sets the value of the TriggeredUpdateProgress field in TriggeredUpdateStatus. func (o *TriggeredUpdateStatus) SetTriggeredUpdateProgress(ctx context.Context, v PipelineProgress) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["triggered_update_progress"] - o.TriggeredUpdateProgress = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TriggeredUpdateProgress = vs } // Delete an assignment @@ -16350,17 +16350,17 @@ func (o *UpdateConnection) SetOptions(ctx context.Context, v map[string]types.St type UpdateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. Only applicable when purpose // is **STORAGE**. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // GCP long-lived credential. Databricks-created Google Cloud Storage // service account. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // Force an update even if there are dependent services (when purpose is // **SERVICE**) or dependent external locations and external tables (when // purpose is **STORAGE**). @@ -16430,26 +16430,18 @@ func (o UpdateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.Ob func (o UpdateCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "comment": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), - }, - "force": types.BoolType, - "isolation_mode": types.StringType, - "name_arg": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, + "aws_iam_role": AwsIamRole{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentity{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "comment": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccount{}.Type(ctx), + "force": types.BoolType, + "isolation_mode": types.StringType, + "name_arg": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, }, } } @@ -16463,7 +16455,10 @@ func (o *UpdateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRole return e, false } var v []AwsIamRole - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16475,9 +16470,8 @@ func (o *UpdateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRole // SetAwsIamRole sets the value of the AwsIamRole field in UpdateCredentialRequest. func (o *UpdateCredentialRequest) SetAwsIamRole(ctx context.Context, v AwsIamRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in UpdateCredentialRequest as @@ -16489,7 +16483,10 @@ func (o *UpdateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) ( return e, false } var v []AzureManagedIdentity - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16501,9 +16498,8 @@ func (o *UpdateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) ( // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in UpdateCredentialRequest. func (o *UpdateCredentialRequest) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in UpdateCredentialRequest as @@ -16515,7 +16511,10 @@ func (o *UpdateCredentialRequest) GetAzureServicePrincipal(ctx context.Context) return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16527,9 +16526,8 @@ func (o *UpdateCredentialRequest) GetAzureServicePrincipal(ctx context.Context) // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in UpdateCredentialRequest. func (o *UpdateCredentialRequest) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in UpdateCredentialRequest as @@ -16541,7 +16539,10 @@ func (o *UpdateCredentialRequest) GetDatabricksGcpServiceAccount(ctx context.Con return e, false } var v []DatabricksGcpServiceAccount - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16553,9 +16554,8 @@ func (o *UpdateCredentialRequest) GetDatabricksGcpServiceAccount(ctx context.Con // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in UpdateCredentialRequest. func (o *UpdateCredentialRequest) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccount) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } type UpdateExternalLocation struct { @@ -16566,7 +16566,7 @@ type UpdateExternalLocation struct { // Name of the storage credential used with this location. CredentialName types.String `tfsdk:"credential_name" tf:"optional"` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` // Indicates whether fallback mode is enabled for this external location. // When fallback mode is enabled, the access to the location falls back to // cluster credentials if UC credentials are not sufficient. @@ -16637,21 +16637,19 @@ func (o UpdateExternalLocation) ToObjectValue(ctx context.Context) basetypes.Obj func (o UpdateExternalLocation) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "access_point": types.StringType, - "comment": types.StringType, - "credential_name": types.StringType, - "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), - }, - "fallback": types.BoolType, - "force": types.BoolType, - "isolation_mode": types.StringType, - "name": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, - "url": types.StringType, + "access_point": types.StringType, + "comment": types.StringType, + "credential_name": types.StringType, + "encryption_details": EncryptionDetails{}.Type(ctx), + "fallback": types.BoolType, + "force": types.BoolType, + "isolation_mode": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, + "url": types.StringType, }, } } @@ -16665,7 +16663,10 @@ func (o *UpdateExternalLocation) GetEncryptionDetails(ctx context.Context) (Encr return e, false } var v []EncryptionDetails - d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + d := o.EncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16677,9 +16678,8 @@ func (o *UpdateExternalLocation) GetEncryptionDetails(ctx context.Context) (Encr // SetEncryptionDetails sets the value of the EncryptionDetails field in UpdateExternalLocation. func (o *UpdateExternalLocation) SetEncryptionDetails(ctx context.Context, v EncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] - o.EncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EncryptionDetails = vs } type UpdateFunction struct { @@ -16916,15 +16916,15 @@ type UpdateMonitor struct { // if the monitor is in PENDING state. DashboardId types.String `tfsdk:"dashboard_id" tf:"optional"` // The data classification config for the monitor. - DataClassificationConfig types.List `tfsdk:"data_classification_config" tf:"optional,object"` + DataClassificationConfig types.Object `tfsdk:"data_classification_config" tf:"optional,object"` // Configuration for monitoring inference logs. - InferenceLog types.List `tfsdk:"inference_log" tf:"optional,object"` + InferenceLog types.Object `tfsdk:"inference_log" tf:"optional,object"` // The notification settings for the monitor. - Notifications types.List `tfsdk:"notifications" tf:"optional,object"` + Notifications types.Object `tfsdk:"notifications" tf:"optional,object"` // Schema where output metric tables are created. OutputSchemaName types.String `tfsdk:"output_schema_name" tf:""` // The schedule for automatically updating and refreshing metric tables. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // List of column expressions to slice data with for targeted analysis. The // data is grouped by each expression independently, resulting in a separate // slice for each predicate and its complements. For high-cardinality @@ -16932,11 +16932,11 @@ type UpdateMonitor struct { // slices. SlicingExprs types.List `tfsdk:"slicing_exprs" tf:"optional"` // Configuration for monitoring snapshot tables. - Snapshot types.List `tfsdk:"snapshot" tf:"optional,object"` + Snapshot types.Object `tfsdk:"snapshot" tf:"optional,object"` // Full name of the table. TableName types.String `tfsdk:"-"` // Configuration for monitoring time series tables. - TimeSeries types.List `tfsdk:"time_series" tf:"optional,object"` + TimeSeries types.Object `tfsdk:"time_series" tf:"optional,object"` } func (newState *UpdateMonitor) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateMonitor) { @@ -16995,30 +16995,18 @@ func (o UpdateMonitor) Type(ctx context.Context) attr.Type { "custom_metrics": basetypes.ListType{ ElemType: MonitorMetric{}.Type(ctx), }, - "dashboard_id": types.StringType, - "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), - }, - "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), - }, - "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), - }, - "output_schema_name": types.StringType, - "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), - }, + "dashboard_id": types.StringType, + "data_classification_config": MonitorDataClassificationConfig{}.Type(ctx), + "inference_log": MonitorInferenceLog{}.Type(ctx), + "notifications": MonitorNotifications{}.Type(ctx), + "output_schema_name": types.StringType, + "schedule": MonitorCronSchedule{}.Type(ctx), "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, - "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), - }, - "table_name": types.StringType, - "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), - }, + "snapshot": MonitorSnapshot{}.Type(ctx), + "table_name": types.StringType, + "time_series": MonitorTimeSeries{}.Type(ctx), }, } } @@ -17058,7 +17046,10 @@ func (o *UpdateMonitor) GetDataClassificationConfig(ctx context.Context) (Monito return e, false } var v []MonitorDataClassificationConfig - d := o.DataClassificationConfig.ElementsAs(ctx, &v, true) + d := o.DataClassificationConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17070,9 +17061,8 @@ func (o *UpdateMonitor) GetDataClassificationConfig(ctx context.Context) (Monito // SetDataClassificationConfig sets the value of the DataClassificationConfig field in UpdateMonitor. func (o *UpdateMonitor) SetDataClassificationConfig(ctx context.Context, v MonitorDataClassificationConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_classification_config"] - o.DataClassificationConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataClassificationConfig = vs } // GetInferenceLog returns the value of the InferenceLog field in UpdateMonitor as @@ -17084,7 +17074,10 @@ func (o *UpdateMonitor) GetInferenceLog(ctx context.Context) (MonitorInferenceLo return e, false } var v []MonitorInferenceLog - d := o.InferenceLog.ElementsAs(ctx, &v, true) + d := o.InferenceLog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17096,9 +17089,8 @@ func (o *UpdateMonitor) GetInferenceLog(ctx context.Context) (MonitorInferenceLo // SetInferenceLog sets the value of the InferenceLog field in UpdateMonitor. func (o *UpdateMonitor) SetInferenceLog(ctx context.Context, v MonitorInferenceLog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_log"] - o.InferenceLog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceLog = vs } // GetNotifications returns the value of the Notifications field in UpdateMonitor as @@ -17110,7 +17102,10 @@ func (o *UpdateMonitor) GetNotifications(ctx context.Context) (MonitorNotificati return e, false } var v []MonitorNotifications - d := o.Notifications.ElementsAs(ctx, &v, true) + d := o.Notifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17122,9 +17117,8 @@ func (o *UpdateMonitor) GetNotifications(ctx context.Context) (MonitorNotificati // SetNotifications sets the value of the Notifications field in UpdateMonitor. func (o *UpdateMonitor) SetNotifications(ctx context.Context, v MonitorNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notifications"] - o.Notifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Notifications = vs } // GetSchedule returns the value of the Schedule field in UpdateMonitor as @@ -17136,7 +17130,10 @@ func (o *UpdateMonitor) GetSchedule(ctx context.Context) (MonitorCronSchedule, b return e, false } var v []MonitorCronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17148,9 +17145,8 @@ func (o *UpdateMonitor) GetSchedule(ctx context.Context) (MonitorCronSchedule, b // SetSchedule sets the value of the Schedule field in UpdateMonitor. func (o *UpdateMonitor) SetSchedule(ctx context.Context, v MonitorCronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetSlicingExprs returns the value of the SlicingExprs field in UpdateMonitor as @@ -17188,7 +17184,10 @@ func (o *UpdateMonitor) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) return e, false } var v []MonitorSnapshot - d := o.Snapshot.ElementsAs(ctx, &v, true) + d := o.Snapshot.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17200,9 +17199,8 @@ func (o *UpdateMonitor) GetSnapshot(ctx context.Context) (MonitorSnapshot, bool) // SetSnapshot sets the value of the Snapshot field in UpdateMonitor. func (o *UpdateMonitor) SetSnapshot(ctx context.Context, v MonitorSnapshot) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["snapshot"] - o.Snapshot = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Snapshot = vs } // GetTimeSeries returns the value of the TimeSeries field in UpdateMonitor as @@ -17214,7 +17212,10 @@ func (o *UpdateMonitor) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, b return e, false } var v []MonitorTimeSeries - d := o.TimeSeries.ElementsAs(ctx, &v, true) + d := o.TimeSeries.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17226,9 +17227,8 @@ func (o *UpdateMonitor) GetTimeSeries(ctx context.Context) (MonitorTimeSeries, b // SetTimeSeries sets the value of the TimeSeries field in UpdateMonitor. func (o *UpdateMonitor) SetTimeSeries(ctx context.Context, v MonitorTimeSeries) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["time_series"] - o.TimeSeries = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TimeSeries = vs } type UpdatePermissions struct { @@ -17496,17 +17496,17 @@ func (o *UpdateSchema) SetProperties(ctx context.Context, v map[string]types.Str type UpdateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` // Comment associated with the credential. Comment types.String `tfsdk:"comment" tf:"optional"` // The Databricks managed GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // Force update even if there are dependent external locations or external // tables. Force types.Bool `tfsdk:"force" tf:"optional"` @@ -17575,29 +17575,19 @@ func (o UpdateStorageCredential) ToObjectValue(ctx context.Context) basetypes.Ob func (o UpdateStorageCredential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityResponse{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), - }, - "comment": types.StringType, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), - }, - "force": types.BoolType, - "isolation_mode": types.StringType, - "name": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "read_only": types.BoolType, - "skip_validation": types.BoolType, + "aws_iam_role": AwsIamRoleRequest{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentityResponse{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "cloudflare_api_token": CloudflareApiToken{}.Type(ctx), + "comment": types.StringType, + "databricks_gcp_service_account": DatabricksGcpServiceAccountRequest{}.Type(ctx), + "force": types.BoolType, + "isolation_mode": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "read_only": types.BoolType, + "skip_validation": types.BoolType, }, } } @@ -17611,7 +17601,10 @@ func (o *UpdateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRole return e, false } var v []AwsIamRoleRequest - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17623,9 +17616,8 @@ func (o *UpdateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRole // SetAwsIamRole sets the value of the AwsIamRole field in UpdateStorageCredential. func (o *UpdateStorageCredential) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in UpdateStorageCredential as @@ -17637,7 +17629,10 @@ func (o *UpdateStorageCredential) GetAzureManagedIdentity(ctx context.Context) ( return e, false } var v []AzureManagedIdentityResponse - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17649,9 +17644,8 @@ func (o *UpdateStorageCredential) GetAzureManagedIdentity(ctx context.Context) ( // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in UpdateStorageCredential. func (o *UpdateStorageCredential) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in UpdateStorageCredential as @@ -17663,7 +17657,10 @@ func (o *UpdateStorageCredential) GetAzureServicePrincipal(ctx context.Context) return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17675,9 +17672,8 @@ func (o *UpdateStorageCredential) GetAzureServicePrincipal(ctx context.Context) // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in UpdateStorageCredential. func (o *UpdateStorageCredential) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetCloudflareApiToken returns the value of the CloudflareApiToken field in UpdateStorageCredential as @@ -17689,7 +17685,10 @@ func (o *UpdateStorageCredential) GetCloudflareApiToken(ctx context.Context) (Cl return e, false } var v []CloudflareApiToken - d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + d := o.CloudflareApiToken.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17701,9 +17700,8 @@ func (o *UpdateStorageCredential) GetCloudflareApiToken(ctx context.Context) (Cl // SetCloudflareApiToken sets the value of the CloudflareApiToken field in UpdateStorageCredential. func (o *UpdateStorageCredential) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] - o.CloudflareApiToken = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudflareApiToken = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in UpdateStorageCredential as @@ -17715,7 +17713,10 @@ func (o *UpdateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.Con return e, false } var v []DatabricksGcpServiceAccountRequest - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -17727,9 +17728,8 @@ func (o *UpdateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.Con // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in UpdateStorageCredential. func (o *UpdateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } // Update a table owner. @@ -18057,9 +18057,9 @@ func (o *UpdateWorkspaceBindingsParameters) SetRemove(ctx context.Context, v []W type ValidateCredentialRequest struct { // The AWS IAM role configuration - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // Required. The name of an existing credential or long-lived cloud // credential to validate. CredentialName types.String `tfsdk:"credential_name" tf:"optional"` @@ -18118,12 +18118,8 @@ func (o ValidateCredentialRequest) ToObjectValue(ctx context.Context) basetypes. func (o ValidateCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), - }, + "aws_iam_role": AwsIamRole{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentity{}.Type(ctx), "credential_name": types.StringType, "external_location_name": types.StringType, "purpose": types.StringType, @@ -18142,7 +18138,10 @@ func (o *ValidateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRo return e, false } var v []AwsIamRole - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18154,9 +18153,8 @@ func (o *ValidateCredentialRequest) GetAwsIamRole(ctx context.Context) (AwsIamRo // SetAwsIamRole sets the value of the AwsIamRole field in ValidateCredentialRequest. func (o *ValidateCredentialRequest) SetAwsIamRole(ctx context.Context, v AwsIamRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in ValidateCredentialRequest as @@ -18168,7 +18166,10 @@ func (o *ValidateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) return e, false } var v []AzureManagedIdentity - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18180,9 +18181,8 @@ func (o *ValidateCredentialRequest) GetAzureManagedIdentity(ctx context.Context) // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in ValidateCredentialRequest. func (o *ValidateCredentialRequest) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } type ValidateCredentialResponse struct { @@ -18264,15 +18264,15 @@ func (o *ValidateCredentialResponse) SetResults(ctx context.Context, v []Credent type ValidateStorageCredential struct { // The AWS IAM role configuration. - AwsIamRole types.List `tfsdk:"aws_iam_role" tf:"optional,object"` + AwsIamRole types.Object `tfsdk:"aws_iam_role" tf:"optional,object"` // The Azure managed identity configuration. - AzureManagedIdentity types.List `tfsdk:"azure_managed_identity" tf:"optional,object"` + AzureManagedIdentity types.Object `tfsdk:"azure_managed_identity" tf:"optional,object"` // The Azure service principal configuration. - AzureServicePrincipal types.List `tfsdk:"azure_service_principal" tf:"optional,object"` + AzureServicePrincipal types.Object `tfsdk:"azure_service_principal" tf:"optional,object"` // The Cloudflare API token configuration. - CloudflareApiToken types.List `tfsdk:"cloudflare_api_token" tf:"optional,object"` + CloudflareApiToken types.Object `tfsdk:"cloudflare_api_token" tf:"optional,object"` // The Databricks created GCP service account configuration. - DatabricksGcpServiceAccount types.List `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` + DatabricksGcpServiceAccount types.Object `tfsdk:"databricks_gcp_service_account" tf:"optional,object"` // The name of an existing external location to validate. ExternalLocationName types.String `tfsdk:"external_location_name" tf:"optional"` // Whether the storage credential is only usable for read operations. @@ -18329,25 +18329,15 @@ func (o ValidateStorageCredential) ToObjectValue(ctx context.Context) basetypes. func (o ValidateStorageCredential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), - }, - "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityRequest{}.Type(ctx), - }, - "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), - }, - "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), - }, - "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), - }, - "external_location_name": types.StringType, - "read_only": types.BoolType, - "storage_credential_name": types.StringType, - "url": types.StringType, + "aws_iam_role": AwsIamRoleRequest{}.Type(ctx), + "azure_managed_identity": AzureManagedIdentityRequest{}.Type(ctx), + "azure_service_principal": AzureServicePrincipal{}.Type(ctx), + "cloudflare_api_token": CloudflareApiToken{}.Type(ctx), + "databricks_gcp_service_account": DatabricksGcpServiceAccountRequest{}.Type(ctx), + "external_location_name": types.StringType, + "read_only": types.BoolType, + "storage_credential_name": types.StringType, + "url": types.StringType, }, } } @@ -18361,7 +18351,10 @@ func (o *ValidateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRo return e, false } var v []AwsIamRoleRequest - d := o.AwsIamRole.ElementsAs(ctx, &v, true) + d := o.AwsIamRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18373,9 +18366,8 @@ func (o *ValidateStorageCredential) GetAwsIamRole(ctx context.Context) (AwsIamRo // SetAwsIamRole sets the value of the AwsIamRole field in ValidateStorageCredential. func (o *ValidateStorageCredential) SetAwsIamRole(ctx context.Context, v AwsIamRoleRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_iam_role"] - o.AwsIamRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsIamRole = vs } // GetAzureManagedIdentity returns the value of the AzureManagedIdentity field in ValidateStorageCredential as @@ -18387,7 +18379,10 @@ func (o *ValidateStorageCredential) GetAzureManagedIdentity(ctx context.Context) return e, false } var v []AzureManagedIdentityRequest - d := o.AzureManagedIdentity.ElementsAs(ctx, &v, true) + d := o.AzureManagedIdentity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18399,9 +18394,8 @@ func (o *ValidateStorageCredential) GetAzureManagedIdentity(ctx context.Context) // SetAzureManagedIdentity sets the value of the AzureManagedIdentity field in ValidateStorageCredential. func (o *ValidateStorageCredential) SetAzureManagedIdentity(ctx context.Context, v AzureManagedIdentityRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_managed_identity"] - o.AzureManagedIdentity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureManagedIdentity = vs } // GetAzureServicePrincipal returns the value of the AzureServicePrincipal field in ValidateStorageCredential as @@ -18413,7 +18407,10 @@ func (o *ValidateStorageCredential) GetAzureServicePrincipal(ctx context.Context return e, false } var v []AzureServicePrincipal - d := o.AzureServicePrincipal.ElementsAs(ctx, &v, true) + d := o.AzureServicePrincipal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18425,9 +18422,8 @@ func (o *ValidateStorageCredential) GetAzureServicePrincipal(ctx context.Context // SetAzureServicePrincipal sets the value of the AzureServicePrincipal field in ValidateStorageCredential. func (o *ValidateStorageCredential) SetAzureServicePrincipal(ctx context.Context, v AzureServicePrincipal) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_principal"] - o.AzureServicePrincipal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServicePrincipal = vs } // GetCloudflareApiToken returns the value of the CloudflareApiToken field in ValidateStorageCredential as @@ -18439,7 +18435,10 @@ func (o *ValidateStorageCredential) GetCloudflareApiToken(ctx context.Context) ( return e, false } var v []CloudflareApiToken - d := o.CloudflareApiToken.ElementsAs(ctx, &v, true) + d := o.CloudflareApiToken.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18451,9 +18450,8 @@ func (o *ValidateStorageCredential) GetCloudflareApiToken(ctx context.Context) ( // SetCloudflareApiToken sets the value of the CloudflareApiToken field in ValidateStorageCredential. func (o *ValidateStorageCredential) SetCloudflareApiToken(ctx context.Context, v CloudflareApiToken) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloudflare_api_token"] - o.CloudflareApiToken = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudflareApiToken = vs } // GetDatabricksGcpServiceAccount returns the value of the DatabricksGcpServiceAccount field in ValidateStorageCredential as @@ -18465,7 +18463,10 @@ func (o *ValidateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.C return e, false } var v []DatabricksGcpServiceAccountRequest - d := o.DatabricksGcpServiceAccount.ElementsAs(ctx, &v, true) + d := o.DatabricksGcpServiceAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18477,9 +18478,8 @@ func (o *ValidateStorageCredential) GetDatabricksGcpServiceAccount(ctx context.C // SetDatabricksGcpServiceAccount sets the value of the DatabricksGcpServiceAccount field in ValidateStorageCredential. func (o *ValidateStorageCredential) SetDatabricksGcpServiceAccount(ctx context.Context, v DatabricksGcpServiceAccountRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_gcp_service_account"] - o.DatabricksGcpServiceAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksGcpServiceAccount = vs } type ValidateStorageCredentialResponse struct { @@ -18624,7 +18624,7 @@ type VolumeInfo struct { // The identifier of the user who created the volume CreatedBy types.String `tfsdk:"created_by" tf:"optional"` // Encryption options that apply to clients connecting to cloud storage. - EncryptionDetails types.List `tfsdk:"encryption_details" tf:"optional,object"` + EncryptionDetails types.Object `tfsdk:"encryption_details" tf:"optional,object"` // The three-level (fully qualified) name of the volume FullName types.String `tfsdk:"full_name" tf:"optional"` // The unique identifier of the metastore @@ -18697,25 +18697,23 @@ func (o VolumeInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o VolumeInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "access_point": types.StringType, - "browse_only": types.BoolType, - "catalog_name": types.StringType, - "comment": types.StringType, - "created_at": types.Int64Type, - "created_by": types.StringType, - "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), - }, - "full_name": types.StringType, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "schema_name": types.StringType, - "storage_location": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "volume_id": types.StringType, - "volume_type": types.StringType, + "access_point": types.StringType, + "browse_only": types.BoolType, + "catalog_name": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "encryption_details": EncryptionDetails{}.Type(ctx), + "full_name": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "schema_name": types.StringType, + "storage_location": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "volume_id": types.StringType, + "volume_type": types.StringType, }, } } @@ -18729,7 +18727,10 @@ func (o *VolumeInfo) GetEncryptionDetails(ctx context.Context) (EncryptionDetail return e, false } var v []EncryptionDetails - d := o.EncryptionDetails.ElementsAs(ctx, &v, true) + d := o.EncryptionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -18741,9 +18742,8 @@ func (o *VolumeInfo) GetEncryptionDetails(ctx context.Context) (EncryptionDetail // SetEncryptionDetails sets the value of the EncryptionDetails field in VolumeInfo. func (o *VolumeInfo) SetEncryptionDetails(ctx context.Context, v EncryptionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["encryption_details"] - o.EncryptionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EncryptionDetails = vs } type WorkspaceBinding struct { diff --git a/internal/service/cleanrooms_tf/legacy_model.go b/internal/service/cleanrooms_tf/legacy_model.go new file mode 100755 index 000000000..4167e7723 --- /dev/null +++ b/internal/service/cleanrooms_tf/legacy_model.go @@ -0,0 +1,2677 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package cleanrooms_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" + "github.com/databricks/terraform-provider-databricks/internal/service/jobs_tf" + "github.com/databricks/terraform-provider-databricks/internal/service/settings_tf" + "github.com/databricks/terraform-provider-databricks/internal/service/sharing_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type CleanRoom_SdkV2 struct { + // Whether clean room access is restricted due to [CSP] + // + // [CSP]: https://docs.databricks.com/en/security/privacy/security-profile.html + AccessRestricted types.String `tfsdk:"access_restricted" tf:"computed"` + + Comment types.String `tfsdk:"comment" tf:"optional"` + // When the clean room was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + // The alias of the collaborator tied to the local clean room. + LocalCollaboratorAlias types.String `tfsdk:"local_collaborator_alias" tf:"computed"` + // The name of the clean room. It should follow [UC securable naming + // requirements]. + // + // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements + Name types.String `tfsdk:"name" tf:"optional"` + // Output catalog of the clean room. It is an output only field. Output + // catalog is manipulated using the separate CreateCleanRoomOutputCatalog + // API. + OutputCatalog types.List `tfsdk:"output_catalog" tf:"computed,object"` + // This is Databricks username of the owner of the local clean room + // securable for permission management. + Owner types.String `tfsdk:"owner" tf:"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. + RemoteDetailedInfo types.List `tfsdk:"remote_detailed_info" tf:"optional,object"` + // Clean room status. + Status types.String `tfsdk:"status" tf:"computed"` + // When the clean room was last updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` +} + +func (newState *CleanRoom_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoom_SdkV2) { +} + +func (newState *CleanRoom_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoom_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoom. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoom_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "output_catalog": reflect.TypeOf(CleanRoomOutputCatalog_SdkV2{}), + "remote_detailed_info": reflect.TypeOf(CleanRoomRemoteDetail_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, CleanRoom_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoom_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_restricted": o.AccessRestricted, + "comment": o.Comment, + "created_at": o.CreatedAt, + "local_collaborator_alias": o.LocalCollaboratorAlias, + "name": o.Name, + "output_catalog": o.OutputCatalog, + "owner": o.Owner, + "remote_detailed_info": o.RemoteDetailedInfo, + "status": o.Status, + "updated_at": o.UpdatedAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoom_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_restricted": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "local_collaborator_alias": types.StringType, + "name": types.StringType, + "output_catalog": basetypes.ListType{ + ElemType: CleanRoomOutputCatalog{}.Type(ctx), + }, + "owner": types.StringType, + "remote_detailed_info": basetypes.ListType{ + ElemType: CleanRoomRemoteDetail{}.Type(ctx), + }, + "status": types.StringType, + "updated_at": types.Int64Type, + }, + } +} + +// GetOutputCatalog returns the value of the OutputCatalog field in CleanRoom_SdkV2 as +// a CleanRoomOutputCatalog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoom_SdkV2) GetOutputCatalog(ctx context.Context) (CleanRoomOutputCatalog_SdkV2, bool) { + var e CleanRoomOutputCatalog_SdkV2 + if o.OutputCatalog.IsNull() || o.OutputCatalog.IsUnknown() { + return e, false + } + var v []CleanRoomOutputCatalog_SdkV2 + d := o.OutputCatalog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOutputCatalog sets the value of the OutputCatalog field in CleanRoom_SdkV2. +func (o *CleanRoom_SdkV2) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] + o.OutputCatalog = types.ListValueMust(t, vs) +} + +// GetRemoteDetailedInfo returns the value of the RemoteDetailedInfo field in CleanRoom_SdkV2 as +// a CleanRoomRemoteDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoom_SdkV2) GetRemoteDetailedInfo(ctx context.Context) (CleanRoomRemoteDetail_SdkV2, bool) { + var e CleanRoomRemoteDetail_SdkV2 + if o.RemoteDetailedInfo.IsNull() || o.RemoteDetailedInfo.IsUnknown() { + return e, false + } + var v []CleanRoomRemoteDetail_SdkV2 + d := o.RemoteDetailedInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRemoteDetailedInfo sets the value of the RemoteDetailedInfo field in CleanRoom_SdkV2. +func (o *CleanRoom_SdkV2) SetRemoteDetailedInfo(ctx context.Context, v CleanRoomRemoteDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["remote_detailed_info"] + o.RemoteDetailedInfo = types.ListValueMust(t, vs) +} + +// Metadata of the clean room asset +type CleanRoomAsset_SdkV2 struct { + // When the asset is added to the clean room, in epoch milliseconds. + AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + // The type of the asset. + AssetType types.String `tfsdk:"asset_type" tf:"optional"` + // Foreign table details available to all collaborators of the clean room. + // Present if and only if **asset_type** is **FOREIGN_TABLE** + ForeignTable types.List `tfsdk:"foreign_table" tf:"optional,object"` + // Local details for a foreign that are only available to its owner. Present + // if and only if **asset_type** is **FOREIGN_TABLE** + ForeignTableLocalDetails types.List `tfsdk:"foreign_table_local_details" tf:"optional,object"` + // A fully qualified name that uniquely identifies the asset within the + // clean room. This is also the name displayed in the clean room UI. + // + // For UC securable assets (tables, volumes, etc.), the format is + // *shared_catalog*.*shared_schema*.*asset_name* + // + // For notebooks, the name is the notebook file name. + Name types.String `tfsdk:"name" tf:"optional"` + // Notebook details available to all collaborators of the clean room. + // Present if and only if **asset_type** is **NOTEBOOK_FILE** + Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + // The alias of the collaborator who owns this asset + OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:"computed"` + // Status of the asset + Status types.String `tfsdk:"status" tf:"computed"` + // Table details available to all collaborators of the clean room. Present + // if and only if **asset_type** is **TABLE** + Table types.List `tfsdk:"table" tf:"optional,object"` + // Local details for a table that are only available to its owner. Present + // if and only if **asset_type** is **TABLE** + TableLocalDetails types.List `tfsdk:"table_local_details" tf:"optional,object"` + // View details available to all collaborators of the clean room. Present if + // and only if **asset_type** is **VIEW** + View types.List `tfsdk:"view" tf:"optional,object"` + // Local details for a view that are only available to its owner. Present if + // and only if **asset_type** is **VIEW** + ViewLocalDetails types.List `tfsdk:"view_local_details" tf:"optional,object"` + // Local details for a volume that are only available to its owner. Present + // if and only if **asset_type** is **VOLUME** + VolumeLocalDetails types.List `tfsdk:"volume_local_details" tf:"optional,object"` +} + +func (newState *CleanRoomAsset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAsset_SdkV2) { +} + +func (newState *CleanRoomAsset_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAsset_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAsset. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAsset_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "foreign_table": reflect.TypeOf(CleanRoomAssetForeignTable_SdkV2{}), + "foreign_table_local_details": reflect.TypeOf(CleanRoomAssetForeignTableLocalDetails_SdkV2{}), + "notebook": reflect.TypeOf(CleanRoomAssetNotebook_SdkV2{}), + "table": reflect.TypeOf(CleanRoomAssetTable_SdkV2{}), + "table_local_details": reflect.TypeOf(CleanRoomAssetTableLocalDetails_SdkV2{}), + "view": reflect.TypeOf(CleanRoomAssetView_SdkV2{}), + "view_local_details": reflect.TypeOf(CleanRoomAssetViewLocalDetails_SdkV2{}), + "volume_local_details": reflect.TypeOf(CleanRoomAssetVolumeLocalDetails_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, CleanRoomAsset_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAsset_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "added_at": o.AddedAt, + "asset_type": o.AssetType, + "foreign_table": o.ForeignTable, + "foreign_table_local_details": o.ForeignTableLocalDetails, + "name": o.Name, + "notebook": o.Notebook, + "owner_collaborator_alias": o.OwnerCollaboratorAlias, + "status": o.Status, + "table": o.Table, + "table_local_details": o.TableLocalDetails, + "view": o.View, + "view_local_details": o.ViewLocalDetails, + "volume_local_details": o.VolumeLocalDetails, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAsset_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "added_at": types.Int64Type, + "asset_type": types.StringType, + "foreign_table": basetypes.ListType{ + ElemType: CleanRoomAssetForeignTable{}.Type(ctx), + }, + "foreign_table_local_details": basetypes.ListType{ + ElemType: CleanRoomAssetForeignTableLocalDetails{}.Type(ctx), + }, + "name": types.StringType, + "notebook": basetypes.ListType{ + ElemType: CleanRoomAssetNotebook{}.Type(ctx), + }, + "owner_collaborator_alias": types.StringType, + "status": types.StringType, + "table": basetypes.ListType{ + ElemType: CleanRoomAssetTable{}.Type(ctx), + }, + "table_local_details": basetypes.ListType{ + ElemType: CleanRoomAssetTableLocalDetails{}.Type(ctx), + }, + "view": basetypes.ListType{ + ElemType: CleanRoomAssetView{}.Type(ctx), + }, + "view_local_details": basetypes.ListType{ + ElemType: CleanRoomAssetViewLocalDetails{}.Type(ctx), + }, + "volume_local_details": basetypes.ListType{ + ElemType: CleanRoomAssetVolumeLocalDetails{}.Type(ctx), + }, + }, + } +} + +// GetForeignTable returns the value of the ForeignTable field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetForeignTable_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetForeignTable(ctx context.Context) (CleanRoomAssetForeignTable_SdkV2, bool) { + var e CleanRoomAssetForeignTable_SdkV2 + if o.ForeignTable.IsNull() || o.ForeignTable.IsUnknown() { + return e, false + } + var v []CleanRoomAssetForeignTable_SdkV2 + d := o.ForeignTable.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForeignTable sets the value of the ForeignTable field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetForeignTable(ctx context.Context, v CleanRoomAssetForeignTable_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_table"] + o.ForeignTable = types.ListValueMust(t, vs) +} + +// GetForeignTableLocalDetails returns the value of the ForeignTableLocalDetails field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetForeignTableLocalDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetForeignTableLocalDetails(ctx context.Context) (CleanRoomAssetForeignTableLocalDetails_SdkV2, bool) { + var e CleanRoomAssetForeignTableLocalDetails_SdkV2 + if o.ForeignTableLocalDetails.IsNull() || o.ForeignTableLocalDetails.IsUnknown() { + return e, false + } + var v []CleanRoomAssetForeignTableLocalDetails_SdkV2 + d := o.ForeignTableLocalDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForeignTableLocalDetails sets the value of the ForeignTableLocalDetails field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetForeignTableLocalDetails(ctx context.Context, v CleanRoomAssetForeignTableLocalDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_table_local_details"] + o.ForeignTableLocalDetails = types.ListValueMust(t, vs) +} + +// GetNotebook returns the value of the Notebook field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetNotebook_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetNotebook(ctx context.Context) (CleanRoomAssetNotebook_SdkV2, bool) { + var e CleanRoomAssetNotebook_SdkV2 + if o.Notebook.IsNull() || o.Notebook.IsUnknown() { + return e, false + } + var v []CleanRoomAssetNotebook_SdkV2 + d := o.Notebook.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebook sets the value of the Notebook field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetNotebook(ctx context.Context, v CleanRoomAssetNotebook_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook"] + o.Notebook = types.ListValueMust(t, vs) +} + +// GetTable returns the value of the Table field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetTable_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetTable(ctx context.Context) (CleanRoomAssetTable_SdkV2, bool) { + var e CleanRoomAssetTable_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []CleanRoomAssetTable_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 CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetTable(ctx context.Context, v CleanRoomAssetTable_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +// GetTableLocalDetails returns the value of the TableLocalDetails field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetTableLocalDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetTableLocalDetails(ctx context.Context) (CleanRoomAssetTableLocalDetails_SdkV2, bool) { + var e CleanRoomAssetTableLocalDetails_SdkV2 + if o.TableLocalDetails.IsNull() || o.TableLocalDetails.IsUnknown() { + return e, false + } + var v []CleanRoomAssetTableLocalDetails_SdkV2 + d := o.TableLocalDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableLocalDetails sets the value of the TableLocalDetails field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetTableLocalDetails(ctx context.Context, v CleanRoomAssetTableLocalDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_local_details"] + o.TableLocalDetails = types.ListValueMust(t, vs) +} + +// GetView returns the value of the View field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetView_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetView(ctx context.Context) (CleanRoomAssetView_SdkV2, bool) { + var e CleanRoomAssetView_SdkV2 + if o.View.IsNull() || o.View.IsUnknown() { + return e, false + } + var v []CleanRoomAssetView_SdkV2 + d := o.View.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetView sets the value of the View field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetView(ctx context.Context, v CleanRoomAssetView_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view"] + o.View = types.ListValueMust(t, vs) +} + +// GetViewLocalDetails returns the value of the ViewLocalDetails field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetViewLocalDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetViewLocalDetails(ctx context.Context) (CleanRoomAssetViewLocalDetails_SdkV2, bool) { + var e CleanRoomAssetViewLocalDetails_SdkV2 + if o.ViewLocalDetails.IsNull() || o.ViewLocalDetails.IsUnknown() { + return e, false + } + var v []CleanRoomAssetViewLocalDetails_SdkV2 + d := o.ViewLocalDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetViewLocalDetails sets the value of the ViewLocalDetails field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetViewLocalDetails(ctx context.Context, v CleanRoomAssetViewLocalDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view_local_details"] + o.ViewLocalDetails = types.ListValueMust(t, vs) +} + +// GetVolumeLocalDetails returns the value of the VolumeLocalDetails field in CleanRoomAsset_SdkV2 as +// a CleanRoomAssetVolumeLocalDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAsset_SdkV2) GetVolumeLocalDetails(ctx context.Context) (CleanRoomAssetVolumeLocalDetails_SdkV2, bool) { + var e CleanRoomAssetVolumeLocalDetails_SdkV2 + if o.VolumeLocalDetails.IsNull() || o.VolumeLocalDetails.IsUnknown() { + return e, false + } + var v []CleanRoomAssetVolumeLocalDetails_SdkV2 + d := o.VolumeLocalDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVolumeLocalDetails sets the value of the VolumeLocalDetails field in CleanRoomAsset_SdkV2. +func (o *CleanRoomAsset_SdkV2) SetVolumeLocalDetails(ctx context.Context, v CleanRoomAssetVolumeLocalDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["volume_local_details"] + o.VolumeLocalDetails = types.ListValueMust(t, vs) +} + +type CleanRoomAssetForeignTable_SdkV2 struct { + // The metadata information of the columns in the foreign table + Columns types.List `tfsdk:"columns" tf:"computed"` +} + +func (newState *CleanRoomAssetForeignTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTable_SdkV2) { +} + +func (newState *CleanRoomAssetForeignTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTable_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTable. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetForeignTable_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(catalog_tf.ColumnInfo_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, CleanRoomAssetForeignTable_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetForeignTable_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetForeignTable_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in CleanRoomAssetForeignTable_SdkV2 as +// a slice of catalog_tf.ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAssetForeignTable_SdkV2) GetColumns(ctx context.Context) ([]catalog_tf.ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []catalog_tf.ColumnInfo_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 CleanRoomAssetForeignTable_SdkV2. +func (o *CleanRoomAssetForeignTable_SdkV2) SetColumns(ctx context.Context, v []catalog_tf.ColumnInfo_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) +} + +type CleanRoomAssetForeignTableLocalDetails_SdkV2 struct { + // The fully qualified name of the foreign table in its owner's local + // metastore, in the format of *catalog*.*schema*.*foreign_table_name* + LocalName types.String `tfsdk:"local_name" tf:"optional"` +} + +func (newState *CleanRoomAssetForeignTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetForeignTableLocalDetails_SdkV2) { +} + +func (newState *CleanRoomAssetForeignTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetForeignTableLocalDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetForeignTableLocalDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetForeignTableLocalDetails_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, CleanRoomAssetForeignTableLocalDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetForeignTableLocalDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "local_name": o.LocalName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetForeignTableLocalDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "local_name": types.StringType, + }, + } +} + +type CleanRoomAssetNotebook_SdkV2 struct { + // Server generated checksum that represents the notebook version. + Etag types.String `tfsdk:"etag" tf:"computed"` + // Base 64 representation of the notebook contents. This is the same format + // as returned by :method:workspace/export with the format of **HTML**. + NotebookContent types.String `tfsdk:"notebook_content" tf:"optional"` +} + +func (newState *CleanRoomAssetNotebook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetNotebook_SdkV2) { +} + +func (newState *CleanRoomAssetNotebook_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetNotebook_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetNotebook. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetNotebook_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, CleanRoomAssetNotebook_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetNotebook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "notebook_content": o.NotebookContent, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetNotebook_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "notebook_content": types.StringType, + }, + } +} + +type CleanRoomAssetTable_SdkV2 struct { + // The metadata information of the columns in the table + Columns types.List `tfsdk:"columns" tf:"computed"` +} + +func (newState *CleanRoomAssetTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTable_SdkV2) { +} + +func (newState *CleanRoomAssetTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTable_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTable. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetTable_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(catalog_tf.ColumnInfo_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, CleanRoomAssetTable_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetTable_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetTable_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in CleanRoomAssetTable_SdkV2 as +// a slice of catalog_tf.ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAssetTable_SdkV2) GetColumns(ctx context.Context) ([]catalog_tf.ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []catalog_tf.ColumnInfo_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 CleanRoomAssetTable_SdkV2. +func (o *CleanRoomAssetTable_SdkV2) SetColumns(ctx context.Context, v []catalog_tf.ColumnInfo_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) +} + +type CleanRoomAssetTableLocalDetails_SdkV2 struct { + // The fully qualified name of the table in its owner's local metastore, in + // the format of *catalog*.*schema*.*table_name* + LocalName types.String `tfsdk:"local_name" tf:"optional"` + // Partition filtering specification for a shared table. + Partitions types.List `tfsdk:"partitions" tf:"optional"` +} + +func (newState *CleanRoomAssetTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetTableLocalDetails_SdkV2) { +} + +func (newState *CleanRoomAssetTableLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetTableLocalDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetTableLocalDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetTableLocalDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "partitions": reflect.TypeOf(sharing_tf.PartitionSpecificationPartition_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, CleanRoomAssetTableLocalDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetTableLocalDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "local_name": o.LocalName, + "partitions": o.Partitions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetTableLocalDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "local_name": types.StringType, + "partitions": basetypes.ListType{ + ElemType: sharing_tf.PartitionSpecificationPartition{}.Type(ctx), + }, + }, + } +} + +// GetPartitions returns the value of the Partitions field in CleanRoomAssetTableLocalDetails_SdkV2 as +// a slice of sharing_tf.PartitionSpecificationPartition_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAssetTableLocalDetails_SdkV2) GetPartitions(ctx context.Context) ([]sharing_tf.PartitionSpecificationPartition_SdkV2, bool) { + if o.Partitions.IsNull() || o.Partitions.IsUnknown() { + return nil, false + } + var v []sharing_tf.PartitionSpecificationPartition_SdkV2 + d := o.Partitions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPartitions sets the value of the Partitions field in CleanRoomAssetTableLocalDetails_SdkV2. +func (o *CleanRoomAssetTableLocalDetails_SdkV2) SetPartitions(ctx context.Context, v []sharing_tf.PartitionSpecificationPartition_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["partitions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Partitions = types.ListValueMust(t, vs) +} + +type CleanRoomAssetView_SdkV2 struct { + // The metadata information of the columns in the view + Columns types.List `tfsdk:"columns" tf:"computed"` +} + +func (newState *CleanRoomAssetView_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetView_SdkV2) { +} + +func (newState *CleanRoomAssetView_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetView_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetView. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetView_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(catalog_tf.ColumnInfo_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, CleanRoomAssetView_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetView_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetView_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in CleanRoomAssetView_SdkV2 as +// a slice of catalog_tf.ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomAssetView_SdkV2) GetColumns(ctx context.Context) ([]catalog_tf.ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []catalog_tf.ColumnInfo_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 CleanRoomAssetView_SdkV2. +func (o *CleanRoomAssetView_SdkV2) SetColumns(ctx context.Context, v []catalog_tf.ColumnInfo_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) +} + +type CleanRoomAssetViewLocalDetails_SdkV2 struct { + // The fully qualified name of the view in its owner's local metastore, in + // the format of *catalog*.*schema*.*view_name* + LocalName types.String `tfsdk:"local_name" tf:"optional"` +} + +func (newState *CleanRoomAssetViewLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetViewLocalDetails_SdkV2) { +} + +func (newState *CleanRoomAssetViewLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetViewLocalDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetViewLocalDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetViewLocalDetails_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, CleanRoomAssetViewLocalDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetViewLocalDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "local_name": o.LocalName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetViewLocalDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "local_name": types.StringType, + }, + } +} + +type CleanRoomAssetVolumeLocalDetails_SdkV2 struct { + // The fully qualified name of the volume in its owner's local metastore, in + // the format of *catalog*.*schema*.*volume_name* + LocalName types.String `tfsdk:"local_name" tf:"optional"` +} + +func (newState *CleanRoomAssetVolumeLocalDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAssetVolumeLocalDetails_SdkV2) { +} + +func (newState *CleanRoomAssetVolumeLocalDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomAssetVolumeLocalDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomAssetVolumeLocalDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomAssetVolumeLocalDetails_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, CleanRoomAssetVolumeLocalDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomAssetVolumeLocalDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "local_name": o.LocalName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomAssetVolumeLocalDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "local_name": types.StringType, + }, + } +} + +// Publicly visible clean room collaborator. +type CleanRoomCollaborator_SdkV2 struct { + // 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]. + // + // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + // Generated display name for the collaborator. In the case of a single + // metastore clean room, it is the clean room name. For x-metastore clean + // rooms, it is the organization name of the metastore. It is not restricted + // to these values and could change in the future + DisplayName types.String `tfsdk:"display_name" tf:"computed"` + // The global Unity Catalog metastore id of the collaborator. The identifier + // is of format cloud:region:metastore-uuid. + GlobalMetastoreId types.String `tfsdk:"global_metastore_id" tf:"optional"` + // Email of the user who is receiving the clean room "invitation". It should + // be empty for the creator of the clean room, and non-empty for the + // invitees of the clean room. It is only returned in the output when clean + // room creator calls GET + InviteRecipientEmail types.String `tfsdk:"invite_recipient_email" tf:"optional"` + // Workspace ID of the user who is receiving the clean room "invitation". + // Must be specified if invite_recipient_email is specified. It should be + // empty when the collaborator is the creator of the clean room. + InviteRecipientWorkspaceId types.Int64 `tfsdk:"invite_recipient_workspace_id" tf:"optional"` + // [Organization + // name](:method:metastores/list#metastores-delta_sharing_organization_name) + // configured in the metastore + OrganizationName types.String `tfsdk:"organization_name" tf:"computed"` +} + +func (newState *CleanRoomCollaborator_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomCollaborator_SdkV2) { +} + +func (newState *CleanRoomCollaborator_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomCollaborator_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomCollaborator. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomCollaborator_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, CleanRoomCollaborator_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomCollaborator_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "collaborator_alias": o.CollaboratorAlias, + "display_name": o.DisplayName, + "global_metastore_id": o.GlobalMetastoreId, + "invite_recipient_email": o.InviteRecipientEmail, + "invite_recipient_workspace_id": o.InviteRecipientWorkspaceId, + "organization_name": o.OrganizationName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomCollaborator_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "collaborator_alias": types.StringType, + "display_name": types.StringType, + "global_metastore_id": types.StringType, + "invite_recipient_email": types.StringType, + "invite_recipient_workspace_id": types.Int64Type, + "organization_name": types.StringType, + }, + } +} + +// Stores information about a single task run. +type CleanRoomNotebookTaskRun_SdkV2 struct { + // Job run info of the task in the runner's local workspace. This field is + // only included in the LIST API. if the task was run within the same + // workspace the API is being called. If the task run was in a different + // workspace under the same metastore, only the workspace_id is included. + CollaboratorJobRunInfo types.List `tfsdk:"collaborator_job_run_info" tf:"optional,object"` + // State of the task run. + NotebookJobRunState types.List `tfsdk:"notebook_job_run_state" tf:"optional,object"` + // Asset name of the notebook executed in this task run. + NotebookName types.String `tfsdk:"notebook_name" tf:"optional"` + // Expiration time of the output schema of the task run (if any), in epoch + // milliseconds. + OutputSchemaExpirationTime types.Int64 `tfsdk:"output_schema_expiration_time" tf:"optional"` + // Name of the output schema associated with the clean rooms notebook task + // run. + OutputSchemaName types.String `tfsdk:"output_schema_name" tf:"optional"` + // Duration of the task run, in milliseconds. + RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + // When the task run started, in epoch milliseconds. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` +} + +func (newState *CleanRoomNotebookTaskRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomNotebookTaskRun_SdkV2) { +} + +func (newState *CleanRoomNotebookTaskRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomNotebookTaskRun_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomNotebookTaskRun. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomNotebookTaskRun_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "collaborator_job_run_info": reflect.TypeOf(CollaboratorJobRunInfo_SdkV2{}), + "notebook_job_run_state": reflect.TypeOf(jobs_tf.CleanRoomTaskRunState_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, CleanRoomNotebookTaskRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomNotebookTaskRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "collaborator_job_run_info": o.CollaboratorJobRunInfo, + "notebook_job_run_state": o.NotebookJobRunState, + "notebook_name": o.NotebookName, + "output_schema_expiration_time": o.OutputSchemaExpirationTime, + "output_schema_name": o.OutputSchemaName, + "run_duration": o.RunDuration, + "start_time": o.StartTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomNotebookTaskRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "collaborator_job_run_info": basetypes.ListType{ + ElemType: CollaboratorJobRunInfo{}.Type(ctx), + }, + "notebook_job_run_state": basetypes.ListType{ + ElemType: jobs_tf.CleanRoomTaskRunState{}.Type(ctx), + }, + "notebook_name": types.StringType, + "output_schema_expiration_time": types.Int64Type, + "output_schema_name": types.StringType, + "run_duration": types.Int64Type, + "start_time": types.Int64Type, + }, + } +} + +// GetCollaboratorJobRunInfo returns the value of the CollaboratorJobRunInfo field in CleanRoomNotebookTaskRun_SdkV2 as +// a CollaboratorJobRunInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomNotebookTaskRun_SdkV2) GetCollaboratorJobRunInfo(ctx context.Context) (CollaboratorJobRunInfo_SdkV2, bool) { + var e CollaboratorJobRunInfo_SdkV2 + if o.CollaboratorJobRunInfo.IsNull() || o.CollaboratorJobRunInfo.IsUnknown() { + return e, false + } + var v []CollaboratorJobRunInfo_SdkV2 + d := o.CollaboratorJobRunInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCollaboratorJobRunInfo sets the value of the CollaboratorJobRunInfo field in CleanRoomNotebookTaskRun_SdkV2. +func (o *CleanRoomNotebookTaskRun_SdkV2) SetCollaboratorJobRunInfo(ctx context.Context, v CollaboratorJobRunInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["collaborator_job_run_info"] + o.CollaboratorJobRunInfo = types.ListValueMust(t, vs) +} + +// GetNotebookJobRunState returns the value of the NotebookJobRunState field in CleanRoomNotebookTaskRun_SdkV2 as +// a jobs_tf.CleanRoomTaskRunState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomNotebookTaskRun_SdkV2) GetNotebookJobRunState(ctx context.Context) (jobs_tf.CleanRoomTaskRunState_SdkV2, bool) { + var e jobs_tf.CleanRoomTaskRunState_SdkV2 + if o.NotebookJobRunState.IsNull() || o.NotebookJobRunState.IsUnknown() { + return e, false + } + var v []jobs_tf.CleanRoomTaskRunState_SdkV2 + d := o.NotebookJobRunState.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookJobRunState sets the value of the NotebookJobRunState field in CleanRoomNotebookTaskRun_SdkV2. +func (o *CleanRoomNotebookTaskRun_SdkV2) SetNotebookJobRunState(ctx context.Context, v jobs_tf.CleanRoomTaskRunState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_job_run_state"] + o.NotebookJobRunState = types.ListValueMust(t, vs) +} + +type CleanRoomOutputCatalog_SdkV2 struct { + // The name of the output catalog in UC. It should follow [UC securable + // naming requirements]. The field will always exist if status is CREATED. + // + // [UC securable naming requirements]: https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + + Status types.String `tfsdk:"status" tf:"computed"` +} + +func (newState *CleanRoomOutputCatalog_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomOutputCatalog_SdkV2) { +} + +func (newState *CleanRoomOutputCatalog_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomOutputCatalog_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomOutputCatalog. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomOutputCatalog_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, CleanRoomOutputCatalog_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomOutputCatalog_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomOutputCatalog_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "status": types.StringType, + }, + } +} + +// Publicly visible central clean room details. +type CleanRoomRemoteDetail_SdkV2 struct { + // Central clean room ID. + CentralCleanRoomId types.String `tfsdk:"central_clean_room_id" tf:"computed"` + // Cloud vendor (aws,azure,gcp) of the central clean room. + CloudVendor types.String `tfsdk:"cloud_vendor" tf:"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. + Collaborators types.List `tfsdk:"collaborators" tf:"optional"` + // The compliance security profile used to process regulated data following + // compliance standards. + ComplianceSecurityProfile types.List `tfsdk:"compliance_security_profile" tf:"optional,object"` + // Collaborator who creates the clean room. + Creator types.List `tfsdk:"creator" tf:"computed,object"` + // Egress network policy to apply to the central clean room workspace. + EgressNetworkPolicy types.List `tfsdk:"egress_network_policy" tf:"optional,object"` + // Region of the central clean room. + Region types.String `tfsdk:"region" tf:"optional"` +} + +func (newState *CleanRoomRemoteDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomRemoteDetail_SdkV2) { +} + +func (newState *CleanRoomRemoteDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomRemoteDetail_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomRemoteDetail. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomRemoteDetail_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "collaborators": reflect.TypeOf(CleanRoomCollaborator_SdkV2{}), + "compliance_security_profile": reflect.TypeOf(ComplianceSecurityProfile_SdkV2{}), + "creator": reflect.TypeOf(CleanRoomCollaborator_SdkV2{}), + "egress_network_policy": reflect.TypeOf(settings_tf.EgressNetworkPolicy_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, CleanRoomRemoteDetail_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomRemoteDetail_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "central_clean_room_id": o.CentralCleanRoomId, + "cloud_vendor": o.CloudVendor, + "collaborators": o.Collaborators, + "compliance_security_profile": o.ComplianceSecurityProfile, + "creator": o.Creator, + "egress_network_policy": o.EgressNetworkPolicy, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomRemoteDetail_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "central_clean_room_id": types.StringType, + "cloud_vendor": types.StringType, + "collaborators": basetypes.ListType{ + ElemType: CleanRoomCollaborator{}.Type(ctx), + }, + "compliance_security_profile": basetypes.ListType{ + ElemType: ComplianceSecurityProfile{}.Type(ctx), + }, + "creator": basetypes.ListType{ + ElemType: CleanRoomCollaborator{}.Type(ctx), + }, + "egress_network_policy": basetypes.ListType{ + ElemType: settings_tf.EgressNetworkPolicy{}.Type(ctx), + }, + "region": types.StringType, + }, + } +} + +// GetCollaborators returns the value of the Collaborators field in CleanRoomRemoteDetail_SdkV2 as +// a slice of CleanRoomCollaborator_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomRemoteDetail_SdkV2) GetCollaborators(ctx context.Context) ([]CleanRoomCollaborator_SdkV2, bool) { + if o.Collaborators.IsNull() || o.Collaborators.IsUnknown() { + return nil, false + } + var v []CleanRoomCollaborator_SdkV2 + d := o.Collaborators.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCollaborators sets the value of the Collaborators field in CleanRoomRemoteDetail_SdkV2. +func (o *CleanRoomRemoteDetail_SdkV2) SetCollaborators(ctx context.Context, v []CleanRoomCollaborator_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["collaborators"] + t = t.(attr.TypeWithElementType).ElementType() + o.Collaborators = types.ListValueMust(t, vs) +} + +// GetComplianceSecurityProfile returns the value of the ComplianceSecurityProfile field in CleanRoomRemoteDetail_SdkV2 as +// a ComplianceSecurityProfile_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomRemoteDetail_SdkV2) GetComplianceSecurityProfile(ctx context.Context) (ComplianceSecurityProfile_SdkV2, bool) { + var e ComplianceSecurityProfile_SdkV2 + if o.ComplianceSecurityProfile.IsNull() || o.ComplianceSecurityProfile.IsUnknown() { + return e, false + } + var v []ComplianceSecurityProfile_SdkV2 + d := o.ComplianceSecurityProfile.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetComplianceSecurityProfile sets the value of the ComplianceSecurityProfile field in CleanRoomRemoteDetail_SdkV2. +func (o *CleanRoomRemoteDetail_SdkV2) SetComplianceSecurityProfile(ctx context.Context, v ComplianceSecurityProfile_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["compliance_security_profile"] + o.ComplianceSecurityProfile = types.ListValueMust(t, vs) +} + +// GetCreator returns the value of the Creator field in CleanRoomRemoteDetail_SdkV2 as +// a CleanRoomCollaborator_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomRemoteDetail_SdkV2) GetCreator(ctx context.Context) (CleanRoomCollaborator_SdkV2, bool) { + var e CleanRoomCollaborator_SdkV2 + if o.Creator.IsNull() || o.Creator.IsUnknown() { + return e, false + } + var v []CleanRoomCollaborator_SdkV2 + d := o.Creator.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCreator sets the value of the Creator field in CleanRoomRemoteDetail_SdkV2. +func (o *CleanRoomRemoteDetail_SdkV2) SetCreator(ctx context.Context, v CleanRoomCollaborator_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["creator"] + o.Creator = types.ListValueMust(t, vs) +} + +// GetEgressNetworkPolicy returns the value of the EgressNetworkPolicy field in CleanRoomRemoteDetail_SdkV2 as +// a settings_tf.EgressNetworkPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CleanRoomRemoteDetail_SdkV2) GetEgressNetworkPolicy(ctx context.Context) (settings_tf.EgressNetworkPolicy_SdkV2, bool) { + var e settings_tf.EgressNetworkPolicy_SdkV2 + if o.EgressNetworkPolicy.IsNull() || o.EgressNetworkPolicy.IsUnknown() { + return e, false + } + var v []settings_tf.EgressNetworkPolicy_SdkV2 + d := o.EgressNetworkPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEgressNetworkPolicy sets the value of the EgressNetworkPolicy field in CleanRoomRemoteDetail_SdkV2. +func (o *CleanRoomRemoteDetail_SdkV2) SetEgressNetworkPolicy(ctx context.Context, v settings_tf.EgressNetworkPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["egress_network_policy"] + o.EgressNetworkPolicy = types.ListValueMust(t, vs) +} + +type CollaboratorJobRunInfo_SdkV2 struct { + // Alias of the collaborator that triggered the task run. + CollaboratorAlias types.String `tfsdk:"collaborator_alias" tf:"optional"` + // Job ID of the task run in the collaborator's workspace. + CollaboratorJobId types.Int64 `tfsdk:"collaborator_job_id" tf:"optional"` + // Job run ID of the task run in the collaborator's workspace. + CollaboratorJobRunId types.Int64 `tfsdk:"collaborator_job_run_id" tf:"optional"` + // Task run ID of the task run in the collaborator's workspace. + CollaboratorTaskRunId types.Int64 `tfsdk:"collaborator_task_run_id" tf:"optional"` + // ID of the collaborator's workspace that triggered the task run. + CollaboratorWorkspaceId types.Int64 `tfsdk:"collaborator_workspace_id" tf:"optional"` +} + +func (newState *CollaboratorJobRunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CollaboratorJobRunInfo_SdkV2) { +} + +func (newState *CollaboratorJobRunInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CollaboratorJobRunInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CollaboratorJobRunInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CollaboratorJobRunInfo_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, CollaboratorJobRunInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CollaboratorJobRunInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "collaborator_alias": o.CollaboratorAlias, + "collaborator_job_id": o.CollaboratorJobId, + "collaborator_job_run_id": o.CollaboratorJobRunId, + "collaborator_task_run_id": o.CollaboratorTaskRunId, + "collaborator_workspace_id": o.CollaboratorWorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CollaboratorJobRunInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "collaborator_alias": types.StringType, + "collaborator_job_id": types.Int64Type, + "collaborator_job_run_id": types.Int64Type, + "collaborator_task_run_id": types.Int64Type, + "collaborator_workspace_id": types.Int64Type, + }, + } +} + +// The compliance security profile used to process regulated data following +// compliance standards. +type ComplianceSecurityProfile_SdkV2 struct { + // The list of compliance standards that the compliance security profile is + // configured to enforce. + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + // Whether the compliance security profile is enabled. + IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` +} + +func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile_SdkV2) { +} + +func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ComplianceSecurityProfile_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "compliance_standards": 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, ComplianceSecurityProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ComplianceSecurityProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "compliance_standards": o.ComplianceStandards, + "is_enabled": o.IsEnabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ComplianceSecurityProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "compliance_standards": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_enabled": types.BoolType, + }, + } +} + +// GetComplianceStandards returns the value of the ComplianceStandards field in ComplianceSecurityProfile_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ComplianceSecurityProfile_SdkV2) GetComplianceStandards(ctx context.Context) ([]types.String, bool) { + if o.ComplianceStandards.IsNull() || o.ComplianceStandards.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ComplianceStandards.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetComplianceStandards sets the value of the ComplianceStandards field in ComplianceSecurityProfile_SdkV2. +func (o *ComplianceSecurityProfile_SdkV2) SetComplianceStandards(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["compliance_standards"] + t = t.(attr.TypeWithElementType).ElementType() + o.ComplianceStandards = types.ListValueMust(t, vs) +} + +// Create an asset +type CreateCleanRoomAssetRequest_SdkV2 struct { + // Metadata of the clean room asset + Asset types.List `tfsdk:"asset" tf:"optional,object"` + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` +} + +func (newState *CreateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomAssetRequest_SdkV2) { +} + +func (newState *CreateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomAssetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomAssetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCleanRoomAssetRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "asset": reflect.TypeOf(CleanRoomAsset_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, CreateCleanRoomAssetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCleanRoomAssetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "asset": o.Asset, + "clean_room_name": o.CleanRoomName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "asset": basetypes.ListType{ + ElemType: CleanRoomAsset{}.Type(ctx), + }, + "clean_room_name": types.StringType, + }, + } +} + +// GetAsset returns the value of the Asset field in CreateCleanRoomAssetRequest_SdkV2 as +// a CleanRoomAsset_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCleanRoomAssetRequest_SdkV2) GetAsset(ctx context.Context) (CleanRoomAsset_SdkV2, bool) { + var e CleanRoomAsset_SdkV2 + if o.Asset.IsNull() || o.Asset.IsUnknown() { + return e, false + } + var v []CleanRoomAsset_SdkV2 + d := o.Asset.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAsset sets the value of the Asset field in CreateCleanRoomAssetRequest_SdkV2. +func (o *CreateCleanRoomAssetRequest_SdkV2) SetAsset(ctx context.Context, v CleanRoomAsset_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["asset"] + o.Asset = types.ListValueMust(t, vs) +} + +// Create an output catalog +type CreateCleanRoomOutputCatalogRequest_SdkV2 struct { + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` + + OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` +} + +func (newState *CreateCleanRoomOutputCatalogRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogRequest_SdkV2) { +} + +func (newState *CreateCleanRoomOutputCatalogRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCleanRoomOutputCatalogRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "output_catalog": reflect.TypeOf(CleanRoomOutputCatalog_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, CreateCleanRoomOutputCatalogRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCleanRoomOutputCatalogRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room_name": o.CleanRoomName, + "output_catalog": o.OutputCatalog, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCleanRoomOutputCatalogRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room_name": types.StringType, + "output_catalog": basetypes.ListType{ + ElemType: CleanRoomOutputCatalog{}.Type(ctx), + }, + }, + } +} + +// GetOutputCatalog returns the value of the OutputCatalog field in CreateCleanRoomOutputCatalogRequest_SdkV2 as +// a CleanRoomOutputCatalog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCleanRoomOutputCatalogRequest_SdkV2) GetOutputCatalog(ctx context.Context) (CleanRoomOutputCatalog_SdkV2, bool) { + var e CleanRoomOutputCatalog_SdkV2 + if o.OutputCatalog.IsNull() || o.OutputCatalog.IsUnknown() { + return e, false + } + var v []CleanRoomOutputCatalog_SdkV2 + d := o.OutputCatalog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOutputCatalog sets the value of the OutputCatalog field in CreateCleanRoomOutputCatalogRequest_SdkV2. +func (o *CreateCleanRoomOutputCatalogRequest_SdkV2) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] + o.OutputCatalog = types.ListValueMust(t, vs) +} + +type CreateCleanRoomOutputCatalogResponse_SdkV2 struct { + OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` +} + +func (newState *CreateCleanRoomOutputCatalogResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogResponse_SdkV2) { +} + +func (newState *CreateCleanRoomOutputCatalogResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomOutputCatalogResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomOutputCatalogResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCleanRoomOutputCatalogResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "output_catalog": reflect.TypeOf(CleanRoomOutputCatalog_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, CreateCleanRoomOutputCatalogResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCleanRoomOutputCatalogResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "output_catalog": o.OutputCatalog, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCleanRoomOutputCatalogResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "output_catalog": basetypes.ListType{ + ElemType: CleanRoomOutputCatalog{}.Type(ctx), + }, + }, + } +} + +// GetOutputCatalog returns the value of the OutputCatalog field in CreateCleanRoomOutputCatalogResponse_SdkV2 as +// a CleanRoomOutputCatalog_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCleanRoomOutputCatalogResponse_SdkV2) GetOutputCatalog(ctx context.Context) (CleanRoomOutputCatalog_SdkV2, bool) { + var e CleanRoomOutputCatalog_SdkV2 + if o.OutputCatalog.IsNull() || o.OutputCatalog.IsUnknown() { + return e, false + } + var v []CleanRoomOutputCatalog_SdkV2 + d := o.OutputCatalog.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOutputCatalog sets the value of the OutputCatalog field in CreateCleanRoomOutputCatalogResponse_SdkV2. +func (o *CreateCleanRoomOutputCatalogResponse_SdkV2) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] + o.OutputCatalog = types.ListValueMust(t, vs) +} + +// Create a clean room +type CreateCleanRoomRequest_SdkV2 struct { + CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` +} + +func (newState *CreateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomRequest_SdkV2) { +} + +func (newState *CreateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCleanRoomRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCleanRoomRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCleanRoomRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clean_room": reflect.TypeOf(CleanRoom_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, CreateCleanRoomRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCleanRoomRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room": o.CleanRoom, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room": basetypes.ListType{ + ElemType: CleanRoom{}.Type(ctx), + }, + }, + } +} + +// GetCleanRoom returns the value of the CleanRoom field in CreateCleanRoomRequest_SdkV2 as +// a CleanRoom_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCleanRoomRequest_SdkV2) GetCleanRoom(ctx context.Context) (CleanRoom_SdkV2, bool) { + var e CleanRoom_SdkV2 + if o.CleanRoom.IsNull() || o.CleanRoom.IsUnknown() { + return e, false + } + var v []CleanRoom_SdkV2 + d := o.CleanRoom.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCleanRoom sets the value of the CleanRoom field in CreateCleanRoomRequest_SdkV2. +func (o *CreateCleanRoomRequest_SdkV2) SetCleanRoom(ctx context.Context, v CleanRoom_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_room"] + o.CleanRoom = types.ListValueMust(t, vs) +} + +// Delete an asset +type DeleteCleanRoomAssetRequest_SdkV2 struct { + // The fully qualified name of the asset, it is same as the name field in + // CleanRoomAsset. + AssetFullName types.String `tfsdk:"-"` + // The type of the asset. + AssetType types.String `tfsdk:"-"` + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` +} + +func (newState *DeleteCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomAssetRequest_SdkV2) { +} + +func (newState *DeleteCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCleanRoomAssetRequest_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, DeleteCleanRoomAssetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCleanRoomAssetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "asset_full_name": o.AssetFullName, + "asset_type": o.AssetType, + "clean_room_name": o.CleanRoomName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "asset_full_name": types.StringType, + "asset_type": types.StringType, + "clean_room_name": types.StringType, + }, + } +} + +// Response for delete clean room request. Using an empty message since the +// generic Empty proto does not externd UnshadedMessageMarker. +type DeleteCleanRoomAssetResponse_SdkV2 struct { +} + +func (newState *DeleteCleanRoomAssetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomAssetResponse_SdkV2) { +} + +func (newState *DeleteCleanRoomAssetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomAssetResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomAssetResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCleanRoomAssetResponse_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, DeleteCleanRoomAssetResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCleanRoomAssetResponse_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 DeleteCleanRoomAssetResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a clean room +type DeleteCleanRoomRequest_SdkV2 struct { + // Name of the clean room. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCleanRoomRequest_SdkV2) { +} + +func (newState *DeleteCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCleanRoomRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCleanRoomRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCleanRoomRequest_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, DeleteCleanRoomRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCleanRoomRequest_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 DeleteCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Get an asset +type GetCleanRoomAssetRequest_SdkV2 struct { + // The fully qualified name of the asset, it is same as the name field in + // CleanRoomAsset. + AssetFullName types.String `tfsdk:"-"` + // The type of the asset. + AssetType types.String `tfsdk:"-"` + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` +} + +func (newState *GetCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomAssetRequest_SdkV2) { +} + +func (newState *GetCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomAssetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomAssetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCleanRoomAssetRequest_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, GetCleanRoomAssetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCleanRoomAssetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "asset_full_name": o.AssetFullName, + "asset_type": o.AssetType, + "clean_room_name": o.CleanRoomName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "asset_full_name": types.StringType, + "asset_type": types.StringType, + "clean_room_name": types.StringType, + }, + } +} + +// Get a clean room +type GetCleanRoomRequest_SdkV2 struct { + Name types.String `tfsdk:"-"` +} + +func (newState *GetCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCleanRoomRequest_SdkV2) { +} + +func (newState *GetCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCleanRoomRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCleanRoomRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCleanRoomRequest_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, GetCleanRoomRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCleanRoomRequest_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 GetCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// List assets +type ListCleanRoomAssetsRequest_SdkV2 struct { + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCleanRoomAssetsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsRequest_SdkV2) { +} + +func (newState *ListCleanRoomAssetsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomAssetsRequest_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, ListCleanRoomAssetsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomAssetsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room_name": o.CleanRoomName, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCleanRoomAssetsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room_name": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ListCleanRoomAssetsResponse_SdkV2 struct { + // Assets in the clean room. + Assets types.List `tfsdk:"assets" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. page_token should be set to this value for the next request + // (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListCleanRoomAssetsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomAssetsResponse_SdkV2) { +} + +func (newState *ListCleanRoomAssetsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomAssetsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomAssetsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomAssetsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assets": reflect.TypeOf(CleanRoomAsset_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, ListCleanRoomAssetsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomAssetsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets": o.Assets, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCleanRoomAssetsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets": basetypes.ListType{ + ElemType: CleanRoomAsset{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetAssets returns the value of the Assets field in ListCleanRoomAssetsResponse_SdkV2 as +// a slice of CleanRoomAsset_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCleanRoomAssetsResponse_SdkV2) GetAssets(ctx context.Context) ([]CleanRoomAsset_SdkV2, bool) { + if o.Assets.IsNull() || o.Assets.IsUnknown() { + return nil, false + } + var v []CleanRoomAsset_SdkV2 + d := o.Assets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssets sets the value of the Assets field in ListCleanRoomAssetsResponse_SdkV2. +func (o *ListCleanRoomAssetsResponse_SdkV2) SetAssets(ctx context.Context, v []CleanRoomAsset_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["assets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Assets = types.ListValueMust(t, vs) +} + +// List notebook task runs +type ListCleanRoomNotebookTaskRunsRequest_SdkV2 struct { + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` + // Notebook name + NotebookName types.String `tfsdk:"-"` + // The maximum number of task runs to return + PageSize types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCleanRoomNotebookTaskRunsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsRequest_SdkV2) { +} + +func (newState *ListCleanRoomNotebookTaskRunsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomNotebookTaskRunsRequest_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, ListCleanRoomNotebookTaskRunsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomNotebookTaskRunsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room_name": o.CleanRoomName, + "notebook_name": o.NotebookName, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCleanRoomNotebookTaskRunsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room_name": types.StringType, + "notebook_name": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListCleanRoomNotebookTaskRunsResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. page_token should be set to this value for the next request + // (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Name of the clean room. + Runs types.List `tfsdk:"runs" tf:"optional"` +} + +func (newState *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomNotebookTaskRunsResponse_SdkV2) { +} + +func (newState *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomNotebookTaskRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomNotebookTaskRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomNotebookTaskRunsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "runs": reflect.TypeOf(CleanRoomNotebookTaskRun_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, ListCleanRoomNotebookTaskRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomNotebookTaskRunsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "runs": o.Runs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCleanRoomNotebookTaskRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "runs": basetypes.ListType{ + ElemType: CleanRoomNotebookTaskRun{}.Type(ctx), + }, + }, + } +} + +// GetRuns returns the value of the Runs field in ListCleanRoomNotebookTaskRunsResponse_SdkV2 as +// a slice of CleanRoomNotebookTaskRun_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCleanRoomNotebookTaskRunsResponse_SdkV2) GetRuns(ctx context.Context) ([]CleanRoomNotebookTaskRun_SdkV2, bool) { + if o.Runs.IsNull() || o.Runs.IsUnknown() { + return nil, false + } + var v []CleanRoomNotebookTaskRun_SdkV2 + d := o.Runs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRuns sets the value of the Runs field in ListCleanRoomNotebookTaskRunsResponse_SdkV2. +func (o *ListCleanRoomNotebookTaskRunsResponse_SdkV2) SetRuns(ctx context.Context, v []CleanRoomNotebookTaskRun_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["runs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Runs = types.ListValueMust(t, vs) +} + +// List clean rooms +type ListCleanRoomsRequest_SdkV2 struct { + // Maximum number of clean rooms to return (i.e., the page length). Defaults + // to 100. + PageSize types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCleanRoomsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsRequest_SdkV2) { +} + +func (newState *ListCleanRoomsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomsRequest_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, ListCleanRoomsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomsRequest_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 ListCleanRoomsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListCleanRoomsResponse_SdkV2 struct { + CleanRooms types.List `tfsdk:"clean_rooms" tf:"optional"` + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. page_token should be set to this value for the next request + // (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListCleanRoomsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCleanRoomsResponse_SdkV2) { +} + +func (newState *ListCleanRoomsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCleanRoomsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCleanRoomsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCleanRoomsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clean_rooms": reflect.TypeOf(CleanRoom_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, ListCleanRoomsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCleanRoomsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_rooms": o.CleanRooms, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCleanRoomsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_rooms": basetypes.ListType{ + ElemType: CleanRoom{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetCleanRooms returns the value of the CleanRooms field in ListCleanRoomsResponse_SdkV2 as +// a slice of CleanRoom_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCleanRoomsResponse_SdkV2) GetCleanRooms(ctx context.Context) ([]CleanRoom_SdkV2, bool) { + if o.CleanRooms.IsNull() || o.CleanRooms.IsUnknown() { + return nil, false + } + var v []CleanRoom_SdkV2 + d := o.CleanRooms.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCleanRooms sets the value of the CleanRooms field in ListCleanRoomsResponse_SdkV2. +func (o *ListCleanRoomsResponse_SdkV2) SetCleanRooms(ctx context.Context, v []CleanRoom_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["clean_rooms"] + t = t.(attr.TypeWithElementType).ElementType() + o.CleanRooms = types.ListValueMust(t, vs) +} + +// Update an asset +type UpdateCleanRoomAssetRequest_SdkV2 struct { + // Metadata of the clean room asset + Asset types.List `tfsdk:"asset" tf:"optional,object"` + // The type of the asset. + AssetType types.String `tfsdk:"-"` + // Name of the clean room. + CleanRoomName types.String `tfsdk:"-"` + // A fully qualified name that uniquely identifies the asset within the + // clean room. This is also the name displayed in the clean room UI. + // + // For UC securable assets (tables, volumes, etc.), the format is + // *shared_catalog*.*shared_schema*.*asset_name* + // + // For notebooks, the name is the notebook file name. + Name types.String `tfsdk:"-"` +} + +func (newState *UpdateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomAssetRequest_SdkV2) { +} + +func (newState *UpdateCleanRoomAssetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomAssetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCleanRoomAssetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCleanRoomAssetRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "asset": reflect.TypeOf(CleanRoomAsset_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, UpdateCleanRoomAssetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCleanRoomAssetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "asset": o.Asset, + "asset_type": o.AssetType, + "clean_room_name": o.CleanRoomName, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "asset": basetypes.ListType{ + ElemType: CleanRoomAsset{}.Type(ctx), + }, + "asset_type": types.StringType, + "clean_room_name": types.StringType, + "name": types.StringType, + }, + } +} + +// GetAsset returns the value of the Asset field in UpdateCleanRoomAssetRequest_SdkV2 as +// a CleanRoomAsset_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCleanRoomAssetRequest_SdkV2) GetAsset(ctx context.Context) (CleanRoomAsset_SdkV2, bool) { + var e CleanRoomAsset_SdkV2 + if o.Asset.IsNull() || o.Asset.IsUnknown() { + return e, false + } + var v []CleanRoomAsset_SdkV2 + d := o.Asset.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAsset sets the value of the Asset field in UpdateCleanRoomAssetRequest_SdkV2. +func (o *UpdateCleanRoomAssetRequest_SdkV2) SetAsset(ctx context.Context, v CleanRoomAsset_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["asset"] + o.Asset = types.ListValueMust(t, vs) +} + +type UpdateCleanRoomRequest_SdkV2 struct { + CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` + // Name of the clean room. + Name types.String `tfsdk:"-"` +} + +func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCleanRoomRequest_SdkV2) { +} + +func (newState *UpdateCleanRoomRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCleanRoomRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCleanRoomRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clean_room": reflect.TypeOf(CleanRoom_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, UpdateCleanRoomRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCleanRoomRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room": o.CleanRoom, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room": basetypes.ListType{ + ElemType: CleanRoom{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetCleanRoom returns the value of the CleanRoom field in UpdateCleanRoomRequest_SdkV2 as +// a CleanRoom_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCleanRoomRequest_SdkV2) GetCleanRoom(ctx context.Context) (CleanRoom_SdkV2, bool) { + var e CleanRoom_SdkV2 + if o.CleanRoom.IsNull() || o.CleanRoom.IsUnknown() { + return e, false + } + var v []CleanRoom_SdkV2 + d := o.CleanRoom.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCleanRoom sets the value of the CleanRoom field in UpdateCleanRoomRequest_SdkV2. +func (o *UpdateCleanRoomRequest_SdkV2) SetCleanRoom(ctx context.Context, v CleanRoom_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_room"] + o.CleanRoom = types.ListValueMust(t, vs) +} diff --git a/internal/service/cleanrooms_tf/model.go b/internal/service/cleanrooms_tf/model.go index 3c8ef5ba7..0f9a3581f 100755 --- a/internal/service/cleanrooms_tf/model.go +++ b/internal/service/cleanrooms_tf/model.go @@ -44,14 +44,14 @@ type CleanRoom struct { // Output catalog of the clean room. It is an output only field. Output // catalog is manipulated using the separate CreateCleanRoomOutputCatalog // API. - OutputCatalog types.List `tfsdk:"output_catalog" tf:"computed,object"` + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"computed,object"` // This is Databricks username of the owner of the local clean room // securable for permission management. Owner types.String `tfsdk:"owner" tf:"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. - RemoteDetailedInfo types.List `tfsdk:"remote_detailed_info" tf:"optional,object"` + RemoteDetailedInfo types.Object `tfsdk:"remote_detailed_info" tf:"optional,object"` // Clean room status. Status types.String `tfsdk:"status" tf:"computed"` // When the clean room was last updated, in epoch milliseconds. @@ -107,15 +107,11 @@ func (o CleanRoom) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "local_collaborator_alias": types.StringType, "name": types.StringType, - "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), - }, - "owner": types.StringType, - "remote_detailed_info": basetypes.ListType{ - ElemType: CleanRoomRemoteDetail{}.Type(ctx), - }, - "status": types.StringType, - "updated_at": types.Int64Type, + "output_catalog": CleanRoomOutputCatalog{}.Type(ctx), + "owner": types.StringType, + "remote_detailed_info": CleanRoomRemoteDetail{}.Type(ctx), + "status": types.StringType, + "updated_at": types.Int64Type, }, } } @@ -129,7 +125,10 @@ func (o *CleanRoom) GetOutputCatalog(ctx context.Context) (CleanRoomOutputCatalo return e, false } var v []CleanRoomOutputCatalog - d := o.OutputCatalog.ElementsAs(ctx, &v, true) + d := o.OutputCatalog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -141,9 +140,8 @@ func (o *CleanRoom) GetOutputCatalog(ctx context.Context) (CleanRoomOutputCatalo // SetOutputCatalog sets the value of the OutputCatalog field in CleanRoom. func (o *CleanRoom) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] - o.OutputCatalog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OutputCatalog = vs } // GetRemoteDetailedInfo returns the value of the RemoteDetailedInfo field in CleanRoom as @@ -155,7 +153,10 @@ func (o *CleanRoom) GetRemoteDetailedInfo(ctx context.Context) (CleanRoomRemoteD return e, false } var v []CleanRoomRemoteDetail - d := o.RemoteDetailedInfo.ElementsAs(ctx, &v, true) + d := o.RemoteDetailedInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -167,9 +168,8 @@ func (o *CleanRoom) GetRemoteDetailedInfo(ctx context.Context) (CleanRoomRemoteD // SetRemoteDetailedInfo sets the value of the RemoteDetailedInfo field in CleanRoom. func (o *CleanRoom) SetRemoteDetailedInfo(ctx context.Context, v CleanRoomRemoteDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["remote_detailed_info"] - o.RemoteDetailedInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RemoteDetailedInfo = vs } // Metadata of the clean room asset @@ -180,10 +180,10 @@ type CleanRoomAsset struct { AssetType types.String `tfsdk:"asset_type" tf:"optional"` // Foreign table details available to all collaborators of the clean room. // Present if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTable types.List `tfsdk:"foreign_table" tf:"optional,object"` + ForeignTable types.Object `tfsdk:"foreign_table" tf:"optional,object"` // Local details for a foreign that are only available to its owner. Present // if and only if **asset_type** is **FOREIGN_TABLE** - ForeignTableLocalDetails types.List `tfsdk:"foreign_table_local_details" tf:"optional,object"` + ForeignTableLocalDetails types.Object `tfsdk:"foreign_table_local_details" tf:"optional,object"` // A fully qualified name that uniquely identifies the asset within the // clean room. This is also the name displayed in the clean room UI. // @@ -194,26 +194,26 @@ type CleanRoomAsset struct { Name types.String `tfsdk:"name" tf:"optional"` // Notebook details available to all collaborators of the clean room. // Present if and only if **asset_type** is **NOTEBOOK_FILE** - Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + Notebook types.Object `tfsdk:"notebook" tf:"optional,object"` // The alias of the collaborator who owns this asset OwnerCollaboratorAlias types.String `tfsdk:"owner_collaborator_alias" tf:"computed"` // Status of the asset Status types.String `tfsdk:"status" tf:"computed"` // Table details available to all collaborators of the clean room. Present // if and only if **asset_type** is **TABLE** - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"optional,object"` // Local details for a table that are only available to its owner. Present // if and only if **asset_type** is **TABLE** - TableLocalDetails types.List `tfsdk:"table_local_details" tf:"optional,object"` + TableLocalDetails types.Object `tfsdk:"table_local_details" tf:"optional,object"` // View details available to all collaborators of the clean room. Present if // and only if **asset_type** is **VIEW** - View types.List `tfsdk:"view" tf:"optional,object"` + View types.Object `tfsdk:"view" tf:"optional,object"` // Local details for a view that are only available to its owner. Present if // and only if **asset_type** is **VIEW** - ViewLocalDetails types.List `tfsdk:"view_local_details" tf:"optional,object"` + ViewLocalDetails types.Object `tfsdk:"view_local_details" tf:"optional,object"` // Local details for a volume that are only available to its owner. Present // if and only if **asset_type** is **VOLUME** - VolumeLocalDetails types.List `tfsdk:"volume_local_details" tf:"optional,object"` + VolumeLocalDetails types.Object `tfsdk:"volume_local_details" tf:"optional,object"` } func (newState *CleanRoomAsset) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomAsset) { @@ -269,35 +269,19 @@ func (o CleanRoomAsset) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o CleanRoomAsset) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "added_at": types.Int64Type, - "asset_type": types.StringType, - "foreign_table": basetypes.ListType{ - ElemType: CleanRoomAssetForeignTable{}.Type(ctx), - }, - "foreign_table_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetForeignTableLocalDetails{}.Type(ctx), - }, - "name": types.StringType, - "notebook": basetypes.ListType{ - ElemType: CleanRoomAssetNotebook{}.Type(ctx), - }, - "owner_collaborator_alias": types.StringType, - "status": types.StringType, - "table": basetypes.ListType{ - ElemType: CleanRoomAssetTable{}.Type(ctx), - }, - "table_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetTableLocalDetails{}.Type(ctx), - }, - "view": basetypes.ListType{ - ElemType: CleanRoomAssetView{}.Type(ctx), - }, - "view_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetViewLocalDetails{}.Type(ctx), - }, - "volume_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetVolumeLocalDetails{}.Type(ctx), - }, + "added_at": types.Int64Type, + "asset_type": types.StringType, + "foreign_table": CleanRoomAssetForeignTable{}.Type(ctx), + "foreign_table_local_details": CleanRoomAssetForeignTableLocalDetails{}.Type(ctx), + "name": types.StringType, + "notebook": CleanRoomAssetNotebook{}.Type(ctx), + "owner_collaborator_alias": types.StringType, + "status": types.StringType, + "table": CleanRoomAssetTable{}.Type(ctx), + "table_local_details": CleanRoomAssetTableLocalDetails{}.Type(ctx), + "view": CleanRoomAssetView{}.Type(ctx), + "view_local_details": CleanRoomAssetViewLocalDetails{}.Type(ctx), + "volume_local_details": CleanRoomAssetVolumeLocalDetails{}.Type(ctx), }, } } @@ -311,7 +295,10 @@ func (o *CleanRoomAsset) GetForeignTable(ctx context.Context) (CleanRoomAssetFor return e, false } var v []CleanRoomAssetForeignTable - d := o.ForeignTable.ElementsAs(ctx, &v, true) + d := o.ForeignTable.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -323,9 +310,8 @@ func (o *CleanRoomAsset) GetForeignTable(ctx context.Context) (CleanRoomAssetFor // SetForeignTable sets the value of the ForeignTable field in CleanRoomAsset. func (o *CleanRoomAsset) SetForeignTable(ctx context.Context, v CleanRoomAssetForeignTable) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_table"] - o.ForeignTable = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForeignTable = vs } // GetForeignTableLocalDetails returns the value of the ForeignTableLocalDetails field in CleanRoomAsset as @@ -337,7 +323,10 @@ func (o *CleanRoomAsset) GetForeignTableLocalDetails(ctx context.Context) (Clean return e, false } var v []CleanRoomAssetForeignTableLocalDetails - d := o.ForeignTableLocalDetails.ElementsAs(ctx, &v, true) + d := o.ForeignTableLocalDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -349,9 +338,8 @@ func (o *CleanRoomAsset) GetForeignTableLocalDetails(ctx context.Context) (Clean // SetForeignTableLocalDetails sets the value of the ForeignTableLocalDetails field in CleanRoomAsset. func (o *CleanRoomAsset) SetForeignTableLocalDetails(ctx context.Context, v CleanRoomAssetForeignTableLocalDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foreign_table_local_details"] - o.ForeignTableLocalDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForeignTableLocalDetails = vs } // GetNotebook returns the value of the Notebook field in CleanRoomAsset as @@ -363,7 +351,10 @@ func (o *CleanRoomAsset) GetNotebook(ctx context.Context) (CleanRoomAssetNoteboo return e, false } var v []CleanRoomAssetNotebook - d := o.Notebook.ElementsAs(ctx, &v, true) + d := o.Notebook.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -375,9 +366,8 @@ func (o *CleanRoomAsset) GetNotebook(ctx context.Context) (CleanRoomAssetNoteboo // SetNotebook sets the value of the Notebook field in CleanRoomAsset. func (o *CleanRoomAsset) SetNotebook(ctx context.Context, v CleanRoomAssetNotebook) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook"] - o.Notebook = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Notebook = vs } // GetTable returns the value of the Table field in CleanRoomAsset as @@ -389,7 +379,10 @@ func (o *CleanRoomAsset) GetTable(ctx context.Context) (CleanRoomAssetTable, boo return e, false } var v []CleanRoomAssetTable - d := o.Table.ElementsAs(ctx, &v, true) + d := o.Table.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -401,9 +394,8 @@ func (o *CleanRoomAsset) GetTable(ctx context.Context) (CleanRoomAssetTable, boo // SetTable sets the value of the Table field in CleanRoomAsset. func (o *CleanRoomAsset) SetTable(ctx context.Context, v CleanRoomAssetTable) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] - o.Table = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Table = vs } // GetTableLocalDetails returns the value of the TableLocalDetails field in CleanRoomAsset as @@ -415,7 +407,10 @@ func (o *CleanRoomAsset) GetTableLocalDetails(ctx context.Context) (CleanRoomAss return e, false } var v []CleanRoomAssetTableLocalDetails - d := o.TableLocalDetails.ElementsAs(ctx, &v, true) + d := o.TableLocalDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -427,9 +422,8 @@ func (o *CleanRoomAsset) GetTableLocalDetails(ctx context.Context) (CleanRoomAss // SetTableLocalDetails sets the value of the TableLocalDetails field in CleanRoomAsset. func (o *CleanRoomAsset) SetTableLocalDetails(ctx context.Context, v CleanRoomAssetTableLocalDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_local_details"] - o.TableLocalDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableLocalDetails = vs } // GetView returns the value of the View field in CleanRoomAsset as @@ -441,7 +435,10 @@ func (o *CleanRoomAsset) GetView(ctx context.Context) (CleanRoomAssetView, bool) return e, false } var v []CleanRoomAssetView - d := o.View.ElementsAs(ctx, &v, true) + d := o.View.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -453,9 +450,8 @@ func (o *CleanRoomAsset) GetView(ctx context.Context) (CleanRoomAssetView, bool) // SetView sets the value of the View field in CleanRoomAsset. func (o *CleanRoomAsset) SetView(ctx context.Context, v CleanRoomAssetView) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view"] - o.View = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.View = vs } // GetViewLocalDetails returns the value of the ViewLocalDetails field in CleanRoomAsset as @@ -467,7 +463,10 @@ func (o *CleanRoomAsset) GetViewLocalDetails(ctx context.Context) (CleanRoomAsse return e, false } var v []CleanRoomAssetViewLocalDetails - d := o.ViewLocalDetails.ElementsAs(ctx, &v, true) + d := o.ViewLocalDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -479,9 +478,8 @@ func (o *CleanRoomAsset) GetViewLocalDetails(ctx context.Context) (CleanRoomAsse // SetViewLocalDetails sets the value of the ViewLocalDetails field in CleanRoomAsset. func (o *CleanRoomAsset) SetViewLocalDetails(ctx context.Context, v CleanRoomAssetViewLocalDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["view_local_details"] - o.ViewLocalDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ViewLocalDetails = vs } // GetVolumeLocalDetails returns the value of the VolumeLocalDetails field in CleanRoomAsset as @@ -493,7 +491,10 @@ func (o *CleanRoomAsset) GetVolumeLocalDetails(ctx context.Context) (CleanRoomAs return e, false } var v []CleanRoomAssetVolumeLocalDetails - d := o.VolumeLocalDetails.ElementsAs(ctx, &v, true) + d := o.VolumeLocalDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -505,9 +506,8 @@ func (o *CleanRoomAsset) GetVolumeLocalDetails(ctx context.Context) (CleanRoomAs // SetVolumeLocalDetails sets the value of the VolumeLocalDetails field in CleanRoomAsset. func (o *CleanRoomAsset) SetVolumeLocalDetails(ctx context.Context, v CleanRoomAssetVolumeLocalDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["volume_local_details"] - o.VolumeLocalDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.VolumeLocalDetails = vs } type CleanRoomAssetForeignTable struct { @@ -1065,9 +1065,9 @@ type CleanRoomNotebookTaskRun struct { // only included in the LIST API. if the task was run within the same // workspace the API is being called. If the task run was in a different // workspace under the same metastore, only the workspace_id is included. - CollaboratorJobRunInfo types.List `tfsdk:"collaborator_job_run_info" tf:"optional,object"` + CollaboratorJobRunInfo types.Object `tfsdk:"collaborator_job_run_info" tf:"optional,object"` // State of the task run. - NotebookJobRunState types.List `tfsdk:"notebook_job_run_state" tf:"optional,object"` + NotebookJobRunState types.Object `tfsdk:"notebook_job_run_state" tf:"optional,object"` // Asset name of the notebook executed in this task run. NotebookName types.String `tfsdk:"notebook_name" tf:"optional"` // Expiration time of the output schema of the task run (if any), in epoch @@ -1123,12 +1123,8 @@ func (o CleanRoomNotebookTaskRun) ToObjectValue(ctx context.Context) basetypes.O func (o CleanRoomNotebookTaskRun) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "collaborator_job_run_info": basetypes.ListType{ - ElemType: CollaboratorJobRunInfo{}.Type(ctx), - }, - "notebook_job_run_state": basetypes.ListType{ - ElemType: jobs_tf.CleanRoomTaskRunState{}.Type(ctx), - }, + "collaborator_job_run_info": CollaboratorJobRunInfo{}.Type(ctx), + "notebook_job_run_state": jobs_tf.CleanRoomTaskRunState{}.Type(ctx), "notebook_name": types.StringType, "output_schema_expiration_time": types.Int64Type, "output_schema_name": types.StringType, @@ -1147,7 +1143,10 @@ func (o *CleanRoomNotebookTaskRun) GetCollaboratorJobRunInfo(ctx context.Context return e, false } var v []CollaboratorJobRunInfo - d := o.CollaboratorJobRunInfo.ElementsAs(ctx, &v, true) + d := o.CollaboratorJobRunInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1159,9 +1158,8 @@ func (o *CleanRoomNotebookTaskRun) GetCollaboratorJobRunInfo(ctx context.Context // SetCollaboratorJobRunInfo sets the value of the CollaboratorJobRunInfo field in CleanRoomNotebookTaskRun. func (o *CleanRoomNotebookTaskRun) SetCollaboratorJobRunInfo(ctx context.Context, v CollaboratorJobRunInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["collaborator_job_run_info"] - o.CollaboratorJobRunInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CollaboratorJobRunInfo = vs } // GetNotebookJobRunState returns the value of the NotebookJobRunState field in CleanRoomNotebookTaskRun as @@ -1173,7 +1171,10 @@ func (o *CleanRoomNotebookTaskRun) GetNotebookJobRunState(ctx context.Context) ( return e, false } var v []jobs_tf.CleanRoomTaskRunState - d := o.NotebookJobRunState.ElementsAs(ctx, &v, true) + d := o.NotebookJobRunState.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1185,9 +1186,8 @@ func (o *CleanRoomNotebookTaskRun) GetNotebookJobRunState(ctx context.Context) ( // SetNotebookJobRunState sets the value of the NotebookJobRunState field in CleanRoomNotebookTaskRun. func (o *CleanRoomNotebookTaskRun) SetNotebookJobRunState(ctx context.Context, v jobs_tf.CleanRoomTaskRunState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_job_run_state"] - o.NotebookJobRunState = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookJobRunState = vs } type CleanRoomOutputCatalog struct { @@ -1255,11 +1255,11 @@ type CleanRoomRemoteDetail struct { Collaborators types.List `tfsdk:"collaborators" tf:"optional"` // The compliance security profile used to process regulated data following // compliance standards. - ComplianceSecurityProfile types.List `tfsdk:"compliance_security_profile" tf:"optional,object"` + ComplianceSecurityProfile types.Object `tfsdk:"compliance_security_profile" tf:"optional,object"` // Collaborator who creates the clean room. - Creator types.List `tfsdk:"creator" tf:"computed,object"` + Creator types.Object `tfsdk:"creator" tf:"computed,object"` // Egress network policy to apply to the central clean room workspace. - EgressNetworkPolicy types.List `tfsdk:"egress_network_policy" tf:"optional,object"` + EgressNetworkPolicy types.Object `tfsdk:"egress_network_policy" tf:"optional,object"` // Region of the central clean room. Region types.String `tfsdk:"region" tf:"optional"` } @@ -1312,16 +1312,10 @@ func (o CleanRoomRemoteDetail) Type(ctx context.Context) attr.Type { "collaborators": basetypes.ListType{ ElemType: CleanRoomCollaborator{}.Type(ctx), }, - "compliance_security_profile": basetypes.ListType{ - ElemType: ComplianceSecurityProfile{}.Type(ctx), - }, - "creator": basetypes.ListType{ - ElemType: CleanRoomCollaborator{}.Type(ctx), - }, - "egress_network_policy": basetypes.ListType{ - ElemType: settings_tf.EgressNetworkPolicy{}.Type(ctx), - }, - "region": types.StringType, + "compliance_security_profile": ComplianceSecurityProfile{}.Type(ctx), + "creator": CleanRoomCollaborator{}.Type(ctx), + "egress_network_policy": settings_tf.EgressNetworkPolicy{}.Type(ctx), + "region": types.StringType, }, } } @@ -1361,7 +1355,10 @@ func (o *CleanRoomRemoteDetail) GetComplianceSecurityProfile(ctx context.Context return e, false } var v []ComplianceSecurityProfile - d := o.ComplianceSecurityProfile.ElementsAs(ctx, &v, true) + d := o.ComplianceSecurityProfile.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1373,9 +1370,8 @@ func (o *CleanRoomRemoteDetail) GetComplianceSecurityProfile(ctx context.Context // SetComplianceSecurityProfile sets the value of the ComplianceSecurityProfile field in CleanRoomRemoteDetail. func (o *CleanRoomRemoteDetail) SetComplianceSecurityProfile(ctx context.Context, v ComplianceSecurityProfile) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["compliance_security_profile"] - o.ComplianceSecurityProfile = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ComplianceSecurityProfile = vs } // GetCreator returns the value of the Creator field in CleanRoomRemoteDetail as @@ -1387,7 +1383,10 @@ func (o *CleanRoomRemoteDetail) GetCreator(ctx context.Context) (CleanRoomCollab return e, false } var v []CleanRoomCollaborator - d := o.Creator.ElementsAs(ctx, &v, true) + d := o.Creator.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1399,9 +1398,8 @@ func (o *CleanRoomRemoteDetail) GetCreator(ctx context.Context) (CleanRoomCollab // SetCreator sets the value of the Creator field in CleanRoomRemoteDetail. func (o *CleanRoomRemoteDetail) SetCreator(ctx context.Context, v CleanRoomCollaborator) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["creator"] - o.Creator = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Creator = vs } // GetEgressNetworkPolicy returns the value of the EgressNetworkPolicy field in CleanRoomRemoteDetail as @@ -1413,7 +1411,10 @@ func (o *CleanRoomRemoteDetail) GetEgressNetworkPolicy(ctx context.Context) (set return e, false } var v []settings_tf.EgressNetworkPolicy - d := o.EgressNetworkPolicy.ElementsAs(ctx, &v, true) + d := o.EgressNetworkPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1425,9 +1426,8 @@ func (o *CleanRoomRemoteDetail) GetEgressNetworkPolicy(ctx context.Context) (set // SetEgressNetworkPolicy sets the value of the EgressNetworkPolicy field in CleanRoomRemoteDetail. func (o *CleanRoomRemoteDetail) SetEgressNetworkPolicy(ctx context.Context, v settings_tf.EgressNetworkPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["egress_network_policy"] - o.EgressNetworkPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EgressNetworkPolicy = vs } type CollaboratorJobRunInfo struct { @@ -1570,7 +1570,7 @@ func (o *ComplianceSecurityProfile) SetComplianceStandards(ctx context.Context, // Create an asset type CreateCleanRoomAssetRequest struct { // Metadata of the clean room asset - Asset types.List `tfsdk:"asset" tf:"optional,object"` + Asset types.Object `tfsdk:"asset" tf:"optional,object"` // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` } @@ -1610,9 +1610,7 @@ func (o CreateCleanRoomAssetRequest) ToObjectValue(ctx context.Context) basetype func (o CreateCleanRoomAssetRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "asset": basetypes.ListType{ - ElemType: CleanRoomAsset{}.Type(ctx), - }, + "asset": CleanRoomAsset{}.Type(ctx), "clean_room_name": types.StringType, }, } @@ -1627,7 +1625,10 @@ func (o *CreateCleanRoomAssetRequest) GetAsset(ctx context.Context) (CleanRoomAs return e, false } var v []CleanRoomAsset - d := o.Asset.ElementsAs(ctx, &v, true) + d := o.Asset.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1639,9 +1640,8 @@ func (o *CreateCleanRoomAssetRequest) GetAsset(ctx context.Context) (CleanRoomAs // SetAsset sets the value of the Asset field in CreateCleanRoomAssetRequest. func (o *CreateCleanRoomAssetRequest) SetAsset(ctx context.Context, v CleanRoomAsset) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["asset"] - o.Asset = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Asset = vs } // Create an output catalog @@ -1649,7 +1649,7 @@ type CreateCleanRoomOutputCatalogRequest struct { // Name of the clean room. CleanRoomName types.String `tfsdk:"-"` - OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"optional,object"` } func (newState *CreateCleanRoomOutputCatalogRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogRequest) { @@ -1688,9 +1688,7 @@ func (o CreateCleanRoomOutputCatalogRequest) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_room_name": types.StringType, - "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), - }, + "output_catalog": CleanRoomOutputCatalog{}.Type(ctx), }, } } @@ -1704,7 +1702,10 @@ func (o *CreateCleanRoomOutputCatalogRequest) GetOutputCatalog(ctx context.Conte return e, false } var v []CleanRoomOutputCatalog - d := o.OutputCatalog.ElementsAs(ctx, &v, true) + d := o.OutputCatalog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1716,13 +1717,12 @@ func (o *CreateCleanRoomOutputCatalogRequest) GetOutputCatalog(ctx context.Conte // SetOutputCatalog sets the value of the OutputCatalog field in CreateCleanRoomOutputCatalogRequest. func (o *CreateCleanRoomOutputCatalogRequest) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] - o.OutputCatalog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OutputCatalog = vs } type CreateCleanRoomOutputCatalogResponse struct { - OutputCatalog types.List `tfsdk:"output_catalog" tf:"optional,object"` + OutputCatalog types.Object `tfsdk:"output_catalog" tf:"optional,object"` } func (newState *CreateCleanRoomOutputCatalogResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomOutputCatalogResponse) { @@ -1759,9 +1759,7 @@ func (o CreateCleanRoomOutputCatalogResponse) ToObjectValue(ctx context.Context) func (o CreateCleanRoomOutputCatalogResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), - }, + "output_catalog": CleanRoomOutputCatalog{}.Type(ctx), }, } } @@ -1775,7 +1773,10 @@ func (o *CreateCleanRoomOutputCatalogResponse) GetOutputCatalog(ctx context.Cont return e, false } var v []CleanRoomOutputCatalog - d := o.OutputCatalog.ElementsAs(ctx, &v, true) + d := o.OutputCatalog.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1787,14 +1788,13 @@ func (o *CreateCleanRoomOutputCatalogResponse) GetOutputCatalog(ctx context.Cont // SetOutputCatalog sets the value of the OutputCatalog field in CreateCleanRoomOutputCatalogResponse. func (o *CreateCleanRoomOutputCatalogResponse) SetOutputCatalog(ctx context.Context, v CleanRoomOutputCatalog) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output_catalog"] - o.OutputCatalog = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OutputCatalog = vs } // Create a clean room type CreateCleanRoomRequest struct { - CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` + CleanRoom types.Object `tfsdk:"clean_room" tf:"optional,object"` } func (newState *CreateCleanRoomRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCleanRoomRequest) { @@ -1831,9 +1831,7 @@ func (o CreateCleanRoomRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateCleanRoomRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "clean_room": basetypes.ListType{ - ElemType: CleanRoom{}.Type(ctx), - }, + "clean_room": CleanRoom{}.Type(ctx), }, } } @@ -1847,7 +1845,10 @@ func (o *CreateCleanRoomRequest) GetCleanRoom(ctx context.Context) (CleanRoom, b return e, false } var v []CleanRoom - d := o.CleanRoom.ElementsAs(ctx, &v, true) + d := o.CleanRoom.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1859,9 +1860,8 @@ func (o *CreateCleanRoomRequest) GetCleanRoom(ctx context.Context) (CleanRoom, b // SetCleanRoom sets the value of the CleanRoom field in CreateCleanRoomRequest. func (o *CreateCleanRoomRequest) SetCleanRoom(ctx context.Context, v CleanRoom) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_room"] - o.CleanRoom = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CleanRoom = vs } // Delete an asset @@ -2513,7 +2513,7 @@ func (o *ListCleanRoomsResponse) SetCleanRooms(ctx context.Context, v []CleanRoo // Update an asset type UpdateCleanRoomAssetRequest struct { // Metadata of the clean room asset - Asset types.List `tfsdk:"asset" tf:"optional,object"` + Asset types.Object `tfsdk:"asset" tf:"optional,object"` // The type of the asset. AssetType types.String `tfsdk:"-"` // Name of the clean room. @@ -2565,9 +2565,7 @@ func (o UpdateCleanRoomAssetRequest) ToObjectValue(ctx context.Context) basetype func (o UpdateCleanRoomAssetRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "asset": basetypes.ListType{ - ElemType: CleanRoomAsset{}.Type(ctx), - }, + "asset": CleanRoomAsset{}.Type(ctx), "asset_type": types.StringType, "clean_room_name": types.StringType, "name": types.StringType, @@ -2584,7 +2582,10 @@ func (o *UpdateCleanRoomAssetRequest) GetAsset(ctx context.Context) (CleanRoomAs return e, false } var v []CleanRoomAsset - d := o.Asset.ElementsAs(ctx, &v, true) + d := o.Asset.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2596,13 +2597,12 @@ func (o *UpdateCleanRoomAssetRequest) GetAsset(ctx context.Context) (CleanRoomAs // SetAsset sets the value of the Asset field in UpdateCleanRoomAssetRequest. func (o *UpdateCleanRoomAssetRequest) SetAsset(ctx context.Context, v CleanRoomAsset) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["asset"] - o.Asset = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Asset = vs } type UpdateCleanRoomRequest struct { - CleanRoom types.List `tfsdk:"clean_room" tf:"optional,object"` + CleanRoom types.Object `tfsdk:"clean_room" tf:"optional,object"` // Name of the clean room. Name types.String `tfsdk:"-"` } @@ -2642,10 +2642,8 @@ func (o UpdateCleanRoomRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o UpdateCleanRoomRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "clean_room": basetypes.ListType{ - ElemType: CleanRoom{}.Type(ctx), - }, - "name": types.StringType, + "clean_room": CleanRoom{}.Type(ctx), + "name": types.StringType, }, } } @@ -2659,7 +2657,10 @@ func (o *UpdateCleanRoomRequest) GetCleanRoom(ctx context.Context) (CleanRoom, b return e, false } var v []CleanRoom - d := o.CleanRoom.ElementsAs(ctx, &v, true) + d := o.CleanRoom.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2671,7 +2672,6 @@ func (o *UpdateCleanRoomRequest) GetCleanRoom(ctx context.Context) (CleanRoom, b // SetCleanRoom sets the value of the CleanRoom field in UpdateCleanRoomRequest. func (o *UpdateCleanRoomRequest) SetCleanRoom(ctx context.Context, v CleanRoom) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_room"] - o.CleanRoom = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CleanRoom = vs } diff --git a/internal/service/compute_tf/legacy_model.go b/internal/service/compute_tf/legacy_model.go new file mode 100755 index 000000000..8aa22622d --- /dev/null +++ b/internal/service/compute_tf/legacy_model.go @@ -0,0 +1,16258 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package compute_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AddInstanceProfile_SdkV2 struct { + // The AWS IAM role ARN of the role associated with the instance profile. + // This field is required if your role name and instance profile name do not + // match and you want to use the instance profile with [Databricks SQL + // Serverless]. + // + // Otherwise, this field is optional. + // + // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + // The AWS ARN of the instance profile to register with Databricks. This + // field is required. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` + // Boolean flag indicating whether the instance profile should only be used + // in credential passthrough scenarios. If true, it means the instance + // profile contains an meta IAM role which could assume a wide range of + // roles. Therefore it should always be used with authorization. This field + // is optional, the default value is `false`. + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` + // By default, Databricks validates that it has sufficient permissions to + // launch instances with the instance profile. This validation uses AWS + // dry-run mode for the RunInstances API. If validation fails with an error + // message that does not indicate an IAM related permission issue, (e.g. + // “Your requested instance type is not supported in your requested + // availability zone”), you can pass this flag to skip the validation and + // forcibly add the instance profile. + SkipValidation types.Bool `tfsdk:"skip_validation" tf:"optional"` +} + +func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddInstanceProfile_SdkV2) { +} + +func (newState *AddInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddInstanceProfile_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddInstanceProfile_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, AddInstanceProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddInstanceProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "iam_role_arn": o.IamRoleArn, + "instance_profile_arn": o.InstanceProfileArn, + "is_meta_instance_profile": o.IsMetaInstanceProfile, + "skip_validation": o.SkipValidation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AddInstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "iam_role_arn": types.StringType, + "instance_profile_arn": types.StringType, + "is_meta_instance_profile": types.BoolType, + "skip_validation": types.BoolType, + }, + } +} + +type AddResponse_SdkV2 struct { +} + +func (newState *AddResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddResponse_SdkV2) { +} + +func (newState *AddResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AddResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddResponse_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, AddResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddResponse_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 AddResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Adlsgen2Info_SdkV2 struct { + // abfss destination, e.g. + // `abfss://@.dfs.core.windows.net/`. + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *Adlsgen2Info_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Adlsgen2Info_SdkV2) { +} + +func (newState *Adlsgen2Info_SdkV2) SyncEffectiveFieldsDuringRead(existingState Adlsgen2Info_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Adlsgen2Info. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Adlsgen2Info_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, Adlsgen2Info_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Adlsgen2Info_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Adlsgen2Info_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} + +type AutoScale_SdkV2 struct { + // The maximum number of workers to which the cluster can scale up when + // overloaded. Note that `max_workers` must be strictly greater than + // `min_workers`. + MaxWorkers types.Int64 `tfsdk:"max_workers" tf:"optional"` + // The minimum number of workers to which the cluster can scale down when + // underutilized. It is also the initial number of workers the cluster will + // have after creation. + MinWorkers types.Int64 `tfsdk:"min_workers" tf:"optional"` +} + +func (newState *AutoScale_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoScale_SdkV2) { +} + +func (newState *AutoScale_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoScale_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoScale. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AutoScale_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, AutoScale_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AutoScale_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_workers": o.MaxWorkers, + "min_workers": o.MinWorkers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AutoScale_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_workers": types.Int64Type, + "min_workers": types.Int64Type, + }, + } +} + +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" tf:"optional"` + // The number of volumes launched for each instance. Users can choose up to + // 10 volumes. This feature is only enabled for supported node types. Legacy + // node types cannot specify custom EBS volumes. For node types with no + // instance store, at least one EBS volume needs to be specified; otherwise, + // cluster creation will fail. + // + // These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance + // store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. + // + // If EBS volumes are attached, Databricks will configure Spark to use only + // the EBS volumes for scratch storage because heterogenously sized scratch + // devices can lead to inefficient disk utilization. If no EBS volumes are + // attached, Databricks will configure Spark to use instance store volumes. + // + // Please note that if EBS volumes are specified, then the Spark + // configuration `spark.local.dir` will be overridden. + EbsVolumeCount types.Int64 `tfsdk:"ebs_volume_count" tf:"optional"` + // If using gp3 volumes, what IOPS to use for the disk. If this is not set, + // the maximum performance of a gp2 volume with the same volume size will be + // used. + EbsVolumeIops types.Int64 `tfsdk:"ebs_volume_iops" tf:"optional"` + // The size of each EBS volume (in GiB) launched for each instance. For + // general purpose SSD, this value must be within the range 100 - 4096. For + // throughput optimized HDD, this value must be within the range 500 - 4096. + EbsVolumeSize types.Int64 `tfsdk:"ebs_volume_size" tf:"optional"` + // If using gp3 volumes, what throughput to use for the disk. If this is not + // set, the maximum performance of a gp2 volume with the same volume size + // will be used. + EbsVolumeThroughput types.Int64 `tfsdk:"ebs_volume_throughput" tf:"optional"` + // The type of EBS volumes that will be launched with this cluster. + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` + // The first `first_on_demand` nodes of the cluster will be placed on + // on-demand instances. If this value is greater than 0, the cluster driver + // node in particular will be placed on an on-demand instance. If this value + // is greater than or equal to the current cluster size, all nodes will be + // placed on on-demand instances. If this value is less than the current + // cluster size, `first_on_demand` nodes will be placed on on-demand + // instances and the remainder will be placed on `availability` instances. + // Note that this value does not affect cluster size and cannot currently be + // mutated over the lifetime of a cluster. + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + // Nodes for this cluster will only be placed on AWS instances with this + // instance profile. If ommitted, nodes will be placed on instances without + // an IAM instance profile. The instance profile must have previously been + // added to the Databricks environment by an account administrator. + // + // This feature may only be available to certain customer plans. + // + // If this field is ommitted, we will pull in the default from the conf if + // it exists. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // The bid price for AWS spot instances, as a percentage of the + // corresponding instance type's on-demand price. For example, if this field + // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then + // the bid price is half of the price of on-demand `r3.xlarge` instances. + // Similarly, if this field is set to 200, the bid price is twice the price + // of on-demand `r3.xlarge` instances. If not specified, the default value + // is 100. When spot instances are requested for this cluster, only spot + // instances whose bid price percentage matches this field will be + // considered. Note that, for safety, we enforce this field to be no more + // than 10000. + // + // The default value and documentation here should be kept consistent with + // CommonConf.defaultSpotBidPricePercent and + // CommonConf.maxSpotBidPricePercent. + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + // Identifier for the availability zone/datacenter in which the cluster + // resides. This string will be of a form like "us-west-2a". The provided + // availability zone must be in the same region as the Databricks + // deployment. For example, "us-west-2a" is not a valid zone id if the + // Databricks deployment resides in the "us-east-1" region. This is an + // optional field at cluster creation, and if not specified, a default zone + // will be used. If the zone specified is "auto", will try to place cluster + // in a zone with high availability, and will retry placement in a different + // AZ if there is not enough capacity. The list of available zones as well + // as the default value can be found by using the `List Zones` method. + ZoneId types.String `tfsdk:"zone_id" tf:"optional"` +} + +func (newState *AwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsAttributes_SdkV2) { +} + +func (newState *AwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsAttributes_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, AwsAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "availability": o.Availability, + "ebs_volume_count": o.EbsVolumeCount, + "ebs_volume_iops": o.EbsVolumeIops, + "ebs_volume_size": o.EbsVolumeSize, + "ebs_volume_throughput": o.EbsVolumeThroughput, + "ebs_volume_type": o.EbsVolumeType, + "first_on_demand": o.FirstOnDemand, + "instance_profile_arn": o.InstanceProfileArn, + "spot_bid_price_percent": o.SpotBidPricePercent, + "zone_id": o.ZoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "availability": types.StringType, + "ebs_volume_count": types.Int64Type, + "ebs_volume_iops": types.Int64Type, + "ebs_volume_size": types.Int64Type, + "ebs_volume_throughput": types.Int64Type, + "ebs_volume_type": types.StringType, + "first_on_demand": types.Int64Type, + "instance_profile_arn": types.StringType, + "spot_bid_price_percent": types.Int64Type, + "zone_id": types.StringType, + }, + } +} + +type AzureAttributes_SdkV2 struct { + // Availability type used for all subsequent nodes past the + // `first_on_demand` ones. Note: If `first_on_demand` is zero (which only + // happens on pool clusters), this availability type will be used for the + // entire cluster. + Availability types.String `tfsdk:"availability" tf:"optional"` + // The first `first_on_demand` nodes of the cluster will be placed on + // on-demand instances. This value should be greater than 0, to make sure + // the cluster driver node is placed on an on-demand instance. If this value + // is greater than or equal to the current cluster size, all nodes will be + // placed on on-demand instances. If this value is less than the current + // cluster size, `first_on_demand` nodes will be placed on on-demand + // instances and the remainder will be placed on `availability` instances. + // Note that this value does not affect cluster size and cannot currently be + // mutated over the lifetime of a cluster. + FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` + // Defines values necessary to configure and run Azure Log Analytics agent + LogAnalyticsInfo types.List `tfsdk:"log_analytics_info" tf:"optional,object"` + // The max bid price to be used for Azure spot instances. The Max price for + // the bid cannot be higher than the on-demand price of the instance. If not + // specified, the default value is -1, which specifies that the instance + // cannot be evicted on the basis of price, and only on the basis of + // availability. Further, the value should > 0 or -1. + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` +} + +func (newState *AzureAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureAttributes_SdkV2) { +} + +func (newState *AzureAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureAttributes_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "log_analytics_info": reflect.TypeOf(LogAnalyticsInfo_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, AzureAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "availability": o.Availability, + "first_on_demand": o.FirstOnDemand, + "log_analytics_info": o.LogAnalyticsInfo, + "spot_bid_max_price": o.SpotBidMaxPrice, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "availability": types.StringType, + "first_on_demand": types.Int64Type, + "log_analytics_info": basetypes.ListType{ + ElemType: LogAnalyticsInfo{}.Type(ctx), + }, + "spot_bid_max_price": types.Float64Type, + }, + } +} + +// GetLogAnalyticsInfo returns the value of the LogAnalyticsInfo field in AzureAttributes_SdkV2 as +// a LogAnalyticsInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AzureAttributes_SdkV2) GetLogAnalyticsInfo(ctx context.Context) (LogAnalyticsInfo_SdkV2, bool) { + var e LogAnalyticsInfo_SdkV2 + if o.LogAnalyticsInfo.IsNull() || o.LogAnalyticsInfo.IsUnknown() { + return e, false + } + var v []LogAnalyticsInfo_SdkV2 + d := o.LogAnalyticsInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLogAnalyticsInfo sets the value of the LogAnalyticsInfo field in AzureAttributes_SdkV2. +func (o *AzureAttributes_SdkV2) SetLogAnalyticsInfo(ctx context.Context, v LogAnalyticsInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_analytics_info"] + o.LogAnalyticsInfo = types.ListValueMust(t, vs) +} + +type CancelCommand_SdkV2 struct { + ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + + CommandId types.String `tfsdk:"commandId" tf:"optional"` + + ContextId types.String `tfsdk:"contextId" tf:"optional"` +} + +func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelCommand_SdkV2) { +} + +func (newState *CancelCommand_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelCommand_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelCommand_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, CancelCommand_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelCommand_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "commandId": o.CommandId, + "contextId": o.ContextId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CancelCommand_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "commandId": types.StringType, + "contextId": types.StringType, + }, + } +} + +type CancelResponse_SdkV2 struct { +} + +func (newState *CancelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelResponse_SdkV2) { +} + +func (newState *CancelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelResponse_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, CancelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelResponse_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 CancelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ChangeClusterOwner_SdkV2 struct { + // + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // New owner of the cluster_id after this RPC. + OwnerUsername types.String `tfsdk:"owner_username" tf:""` +} + +func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChangeClusterOwner_SdkV2) { +} + +func (newState *ChangeClusterOwner_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwner_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ChangeClusterOwner_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, ChangeClusterOwner_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ChangeClusterOwner_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "owner_username": o.OwnerUsername, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ChangeClusterOwner_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "owner_username": types.StringType, + }, + } +} + +type ChangeClusterOwnerResponse_SdkV2 struct { +} + +func (newState *ChangeClusterOwnerResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChangeClusterOwnerResponse_SdkV2) { +} + +func (newState *ChangeClusterOwnerResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChangeClusterOwnerResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ChangeClusterOwnerResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ChangeClusterOwnerResponse_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, ChangeClusterOwnerResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ChangeClusterOwnerResponse_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 ChangeClusterOwnerResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ClientsTypes_SdkV2 struct { + // With jobs set, the cluster can be used for jobs + Jobs types.Bool `tfsdk:"jobs" tf:"optional"` + // With notebooks set, this cluster can be used for notebooks + Notebooks types.Bool `tfsdk:"notebooks" tf:"optional"` +} + +func (newState *ClientsTypes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClientsTypes_SdkV2) { +} + +func (newState *ClientsTypes_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClientsTypes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClientsTypes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClientsTypes_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, ClientsTypes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClientsTypes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "jobs": o.Jobs, + "notebooks": o.Notebooks, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClientsTypes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "jobs": types.BoolType, + "notebooks": types.BoolType, + }, + } +} + +type CloneCluster_SdkV2 struct { + // The cluster that is being cloned. + SourceClusterId types.String `tfsdk:"source_cluster_id" tf:""` +} + +func (newState *CloneCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloneCluster_SdkV2) { +} + +func (newState *CloneCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloneCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CloneCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CloneCluster_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, CloneCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CloneCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "source_cluster_id": o.SourceClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CloneCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "source_cluster_id": types.StringType, + }, + } +} + +type CloudProviderNodeInfo_SdkV2 struct { + Status types.List `tfsdk:"status" tf:"optional"` +} + +func (newState *CloudProviderNodeInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudProviderNodeInfo_SdkV2) { +} + +func (newState *CloudProviderNodeInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudProviderNodeInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudProviderNodeInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CloudProviderNodeInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "status": 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, CloudProviderNodeInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CloudProviderNodeInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CloudProviderNodeInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetStatus returns the value of the Status field in CloudProviderNodeInfo_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CloudProviderNodeInfo_SdkV2) GetStatus(ctx context.Context) ([]types.String, bool) { + if o.Status.IsNull() || o.Status.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStatus sets the value of the Status field in CloudProviderNodeInfo_SdkV2. +func (o *CloudProviderNodeInfo_SdkV2) SetStatus(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["status"] + t = t.(attr.TypeWithElementType).ElementType() + o.Status = types.ListValueMust(t, vs) +} + +type ClusterAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ClusterAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlRequest_SdkV2) { +} + +func (newState *ClusterAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAccessControlRequest_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, ClusterAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type ClusterAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ClusterAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAccessControlResponse_SdkV2) { +} + +func (newState *ClusterAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(ClusterPermission_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, ClusterAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: ClusterPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in ClusterAccessControlResponse_SdkV2 as +// a slice of ClusterPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]ClusterPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []ClusterPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in ClusterAccessControlResponse_SdkV2. +func (o *ClusterAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []ClusterPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type ClusterAttributes_SdkV2 struct { + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:""` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *ClusterAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAttributes_SdkV2) { +} + +func (newState *ClusterAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAttributes_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "workload_type": reflect.TypeOf(WorkloadType_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, ClusterAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_log_conf": o.ClusterLogConf, + "cluster_name": o.ClusterName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "docker_image": o.DockerImage, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "node_type_id": o.NodeTypeId, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "ssh_public_keys": o.SshPublicKeys, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "node_type_id": types.StringType, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAwsAttributes returns the value of the AwsAttributes field in ClusterAttributes_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in ClusterAttributes_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in ClusterAttributes_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in ClusterAttributes_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 *ClusterAttributes_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in ClusterAttributes_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in ClusterAttributes_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in ClusterAttributes_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in ClusterAttributes_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 *ClusterAttributes_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in ClusterAttributes_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 *ClusterAttributes_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in ClusterAttributes_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in ClusterAttributes_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAttributes_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in ClusterAttributes_SdkV2. +func (o *ClusterAttributes_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +type ClusterCompliance_SdkV2 struct { + // Canonical unique identifier for a cluster. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // Whether this cluster is in compliance with the latest version of its + // policy. + IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + // An object containing key-value mappings representing the first 200 policy + // validation errors. The keys indicate the path where the policy validation + // error is occurring. The values indicate an error message describing the + // policy validation error. + Violations types.Map `tfsdk:"violations" tf:"optional"` +} + +func (newState *ClusterCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterCompliance_SdkV2) { +} + +func (newState *ClusterCompliance_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterCompliance_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterCompliance. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterCompliance_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "violations": 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, ClusterCompliance_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterCompliance_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterCompliance_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "is_compliant": types.BoolType, + "violations": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetViolations returns the value of the Violations field in ClusterCompliance_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 *ClusterCompliance_SdkV2) GetViolations(ctx context.Context) (map[string]types.String, bool) { + if o.Violations.IsNull() || o.Violations.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Violations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetViolations sets the value of the Violations field in ClusterCompliance_SdkV2. +func (o *ClusterCompliance_SdkV2) SetViolations(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["violations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Violations = types.MapValueMust(t, vs) +} + +type ClusterDetails_SdkV2 struct { + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // Number of CPU cores available for this cluster. Note that this can be + // fractional, e.g. 7.5 cores, since certain node types are configured to + // share cores between Spark nodes on the same instance. + ClusterCores types.Float64 `tfsdk:"cluster_cores" tf:"optional"` + // Canonical identifier for the cluster. This id is retained during cluster + // restarts and resizes, while each new cluster has a globally unique id. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster log delivery status. + ClusterLogStatus types.List `tfsdk:"cluster_log_status" tf:"optional,object"` + // Total amount of cluster memory, in megabytes + ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:"optional"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Determines whether the cluster was created by a user through the UI, + // created by the Databricks Jobs Scheduler, or through an API request. This + // is the same as cluster_creator, but read only. + ClusterSource types.String `tfsdk:"cluster_source" tf:"optional"` + // Creator user name. The field won't be included in the response if the + // user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + // Tags that are added by Databricks regardless of any `custom_tags`, + // including: + // + // - Vendor: Databricks + // + // - Creator: + // + // - ClusterName: + // + // - ClusterId: + // + // - Name: + DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // Node on which the Spark driver resides. The driver node contains the + // Spark master and the Databricks application that manages the per-notebook + // Spark REPLs. + Driver types.List `tfsdk:"driver" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Nodes on which the Spark executors reside. + Executors types.List `tfsdk:"executors" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // Port on which Spark JDBC server is listening, in the driver nod. No + // service will be listeningon on this port in executor nodes. + JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:"optional"` + // the timestamp that the cluster was started/restarted + LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:"optional"` + // Time when the cluster driver last lost its state (due to a restart or + // driver failure). + LastStateLossTime types.Int64 `tfsdk:"last_state_loss_time" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // A canonical SparkContext identifier. This value *does* change when the + // Spark driver restarts. The pair `(cluster_id, spark_context_id)` is a + // globally unique identifier over all Spark contexts. + SparkContextId types.Int64 `tfsdk:"spark_context_id" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + // `spec` contains a snapshot of the field values that were used to create + // or edit this cluster. The contents of `spec` can be used in the body of a + // create cluster request. This field might not be populated for older + // clusters. Note: not included in the response of the ListClusters API. + Spec types.List `tfsdk:"spec" tf:"optional,object"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // Time (in epoch milliseconds) when the cluster creation request was + // received (when the cluster entered a `PENDING` state). + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Current state of the cluster. + State types.String `tfsdk:"state" tf:"optional"` + // A message associated with the most recent state transition (e.g., the + // reason why the cluster entered a `TERMINATED` state). + StateMessage types.String `tfsdk:"state_message" tf:"optional"` + // Time (in epoch milliseconds) when the cluster was terminated, if + // applicable. + TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:"optional"` + // Information about why the cluster was terminated. This field only appears + // when the cluster is in a `TERMINATING` or `TERMINATED` state. + TerminationReason types.List `tfsdk:"termination_reason" tf:"optional,object"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *ClusterDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterDetails_SdkV2) { +} + +func (newState *ClusterDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_SdkV2{}), + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "cluster_log_status": reflect.TypeOf(LogSyncStatus_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "default_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "driver": reflect.TypeOf(SparkNode_SdkV2{}), + "executors": reflect.TypeOf(SparkNode_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "spec": reflect.TypeOf(ClusterSpec_SdkV2{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "termination_reason": reflect.TypeOf(TerminationReason_SdkV2{}), + "workload_type": reflect.TypeOf(WorkloadType_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, ClusterDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autoscale": o.Autoscale, + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_cores": o.ClusterCores, + "cluster_id": o.ClusterId, + "cluster_log_conf": o.ClusterLogConf, + "cluster_log_status": o.ClusterLogStatus, + "cluster_memory_mb": o.ClusterMemoryMb, + "cluster_name": o.ClusterName, + "cluster_source": o.ClusterSource, + "creator_user_name": o.CreatorUserName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "default_tags": o.DefaultTags, + "docker_image": o.DockerImage, + "driver": o.Driver, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "executors": o.Executors, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "jdbc_port": o.JdbcPort, + "last_restarted_time": o.LastRestartedTime, + "last_state_loss_time": o.LastStateLossTime, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_context_id": o.SparkContextId, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "spec": o.Spec, + "ssh_public_keys": o.SshPublicKeys, + "start_time": o.StartTime, + "state": o.State, + "state_message": o.StateMessage, + "terminated_time": o.TerminatedTime, + "termination_reason": o.TerminationReason, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "cluster_cores": types.Float64Type, + "cluster_id": types.StringType, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_log_status": basetypes.ListType{ + ElemType: LogSyncStatus{}.Type(ctx), + }, + "cluster_memory_mb": types.Int64Type, + "cluster_name": types.StringType, + "cluster_source": types.StringType, + "creator_user_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "default_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver": basetypes.ListType{ + ElemType: SparkNode{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "executors": basetypes.ListType{ + ElemType: SparkNode{}.Type(ctx), + }, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "jdbc_port": types.Int64Type, + "last_restarted_time": types.Int64Type, + "last_state_loss_time": types.Int64Type, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_context_id": types.Int64Type, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "spec": basetypes.ListType{ + ElemType: ClusterSpec{}.Type(ctx), + }, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "start_time": types.Int64Type, + "state": types.StringType, + "state_message": types.StringType, + "terminated_time": types.Int64Type, + "termination_reason": basetypes.ListType{ + ElemType: TerminationReason{}.Type(ctx), + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in ClusterDetails_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in ClusterDetails_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in ClusterDetails_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in ClusterDetails_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetClusterLogStatus returns the value of the ClusterLogStatus field in ClusterDetails_SdkV2 as +// a LogSyncStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetClusterLogStatus(ctx context.Context) (LogSyncStatus_SdkV2, bool) { + var e LogSyncStatus_SdkV2 + if o.ClusterLogStatus.IsNull() || o.ClusterLogStatus.IsUnknown() { + return e, false + } + var v []LogSyncStatus_SdkV2 + d := o.ClusterLogStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogStatus sets the value of the ClusterLogStatus field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetClusterLogStatus(ctx context.Context, v LogSyncStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_status"] + o.ClusterLogStatus = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in ClusterDetails_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 *ClusterDetails_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDefaultTags returns the value of the DefaultTags field in ClusterDetails_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 *ClusterDetails_SdkV2) GetDefaultTags(ctx context.Context) (map[string]types.String, bool) { + if o.DefaultTags.IsNull() || o.DefaultTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.DefaultTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDefaultTags sets the value of the DefaultTags field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetDefaultTags(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["default_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.DefaultTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in ClusterDetails_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetDriver returns the value of the Driver field in ClusterDetails_SdkV2 as +// a SparkNode_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetDriver(ctx context.Context) (SparkNode_SdkV2, bool) { + var e SparkNode_SdkV2 + if o.Driver.IsNull() || o.Driver.IsUnknown() { + return e, false + } + var v []SparkNode_SdkV2 + d := o.Driver.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDriver sets the value of the Driver field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetDriver(ctx context.Context, v SparkNode_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["driver"] + o.Driver = types.ListValueMust(t, vs) +} + +// GetExecutors returns the value of the Executors field in ClusterDetails_SdkV2 as +// a slice of SparkNode_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetExecutors(ctx context.Context) ([]SparkNode_SdkV2, bool) { + if o.Executors.IsNull() || o.Executors.IsUnknown() { + return nil, false + } + var v []SparkNode_SdkV2 + d := o.Executors.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExecutors sets the value of the Executors field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetExecutors(ctx context.Context, v []SparkNode_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["executors"] + t = t.(attr.TypeWithElementType).ElementType() + o.Executors = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in ClusterDetails_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in ClusterDetails_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in ClusterDetails_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 *ClusterDetails_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in ClusterDetails_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 *ClusterDetails_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSpec returns the value of the Spec field in ClusterDetails_SdkV2 as +// a ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetSpec(ctx context.Context) (ClusterSpec_SdkV2, bool) { + var e ClusterSpec_SdkV2 + if o.Spec.IsNull() || o.Spec.IsUnknown() { + return e, false + } + var v []ClusterSpec_SdkV2 + d := o.Spec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSpec sets the value of the Spec field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetSpec(ctx context.Context, v ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] + o.Spec = types.ListValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in ClusterDetails_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetTerminationReason returns the value of the TerminationReason field in ClusterDetails_SdkV2 as +// a TerminationReason_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetTerminationReason(ctx context.Context) (TerminationReason_SdkV2, bool) { + var e TerminationReason_SdkV2 + if o.TerminationReason.IsNull() || o.TerminationReason.IsUnknown() { + return e, false + } + var v []TerminationReason_SdkV2 + d := o.TerminationReason.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTerminationReason sets the value of the TerminationReason field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetTerminationReason(ctx context.Context, v TerminationReason_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["termination_reason"] + o.TerminationReason = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in ClusterDetails_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterDetails_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in ClusterDetails_SdkV2. +func (o *ClusterDetails_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +type ClusterEvent_SdkV2 struct { + // + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // + DataPlaneEventDetails types.List `tfsdk:"data_plane_event_details" tf:"optional,object"` + // + Details types.List `tfsdk:"details" tf:"optional,object"` + // The timestamp when the event occurred, stored as the number of + // milliseconds since the Unix epoch. If not provided, this will be assigned + // by the Timeline service. + Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *ClusterEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterEvent_SdkV2) { +} + +func (newState *ClusterEvent_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterEvent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterEvent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterEvent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data_plane_event_details": reflect.TypeOf(DataPlaneEventDetails_SdkV2{}), + "details": reflect.TypeOf(EventDetails_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, ClusterEvent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterEvent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "data_plane_event_details": o.DataPlaneEventDetails, + "details": o.Details, + "timestamp": o.Timestamp, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterEvent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "data_plane_event_details": basetypes.ListType{ + ElemType: DataPlaneEventDetails{}.Type(ctx), + }, + "details": basetypes.ListType{ + ElemType: EventDetails{}.Type(ctx), + }, + "timestamp": types.Int64Type, + "type": types.StringType, + }, + } +} + +// GetDataPlaneEventDetails returns the value of the DataPlaneEventDetails field in ClusterEvent_SdkV2 as +// a DataPlaneEventDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterEvent_SdkV2) GetDataPlaneEventDetails(ctx context.Context) (DataPlaneEventDetails_SdkV2, bool) { + var e DataPlaneEventDetails_SdkV2 + if o.DataPlaneEventDetails.IsNull() || o.DataPlaneEventDetails.IsUnknown() { + return e, false + } + var v []DataPlaneEventDetails_SdkV2 + d := o.DataPlaneEventDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataPlaneEventDetails sets the value of the DataPlaneEventDetails field in ClusterEvent_SdkV2. +func (o *ClusterEvent_SdkV2) SetDataPlaneEventDetails(ctx context.Context, v DataPlaneEventDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_event_details"] + o.DataPlaneEventDetails = types.ListValueMust(t, vs) +} + +// GetDetails returns the value of the Details field in ClusterEvent_SdkV2 as +// a EventDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterEvent_SdkV2) GetDetails(ctx context.Context) (EventDetails_SdkV2, bool) { + var e EventDetails_SdkV2 + if o.Details.IsNull() || o.Details.IsUnknown() { + return e, false + } + var v []EventDetails_SdkV2 + d := o.Details.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDetails sets the value of the Details field in ClusterEvent_SdkV2. +func (o *ClusterEvent_SdkV2) SetDetails(ctx context.Context, v EventDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["details"] + o.Details = types.ListValueMust(t, vs) +} + +type ClusterLibraryStatuses_SdkV2 struct { + // Unique identifier for the cluster. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // Status of all libraries on the cluster. + LibraryStatuses types.List `tfsdk:"library_statuses" tf:"optional"` +} + +func (newState *ClusterLibraryStatuses_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLibraryStatuses_SdkV2) { +} + +func (newState *ClusterLibraryStatuses_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterLibraryStatuses_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLibraryStatuses. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterLibraryStatuses_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "library_statuses": reflect.TypeOf(LibraryFullStatus_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, ClusterLibraryStatuses_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterLibraryStatuses_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "library_statuses": o.LibraryStatuses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterLibraryStatuses_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "library_statuses": basetypes.ListType{ + ElemType: LibraryFullStatus{}.Type(ctx), + }, + }, + } +} + +// GetLibraryStatuses returns the value of the LibraryStatuses field in ClusterLibraryStatuses_SdkV2 as +// a slice of LibraryFullStatus_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterLibraryStatuses_SdkV2) GetLibraryStatuses(ctx context.Context) ([]LibraryFullStatus_SdkV2, bool) { + if o.LibraryStatuses.IsNull() || o.LibraryStatuses.IsUnknown() { + return nil, false + } + var v []LibraryFullStatus_SdkV2 + d := o.LibraryStatuses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraryStatuses sets the value of the LibraryStatuses field in ClusterLibraryStatuses_SdkV2. +func (o *ClusterLibraryStatuses_SdkV2) SetLibraryStatuses(ctx context.Context, v []LibraryFullStatus_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["library_statuses"] + t = t.(attr.TypeWithElementType).ElementType() + o.LibraryStatuses = types.ListValueMust(t, vs) +} + +type ClusterLogConf_SdkV2 struct { + // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : + // "dbfs:/home/cluster_log" } }` + Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + // destination and either the region or endpoint need to be provided. e.g. + // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : + // "us-west-2" } }` Cluster iam role is used to access s3, please make sure + // the cluster iam role in `instance_profile_arn` has permission to write + // data to the s3 destination. + S3 types.List `tfsdk:"s3" tf:"optional,object"` +} + +func (newState *ClusterLogConf_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLogConf_SdkV2) { +} + +func (newState *ClusterLogConf_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterLogConf_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterLogConf. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterLogConf_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbfs": reflect.TypeOf(DbfsStorageInfo_SdkV2{}), + "s3": reflect.TypeOf(S3StorageInfo_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, ClusterLogConf_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterLogConf_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbfs": o.Dbfs, + "s3": o.S3, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterLogConf_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbfs": basetypes.ListType{ + ElemType: DbfsStorageInfo{}.Type(ctx), + }, + "s3": basetypes.ListType{ + ElemType: S3StorageInfo{}.Type(ctx), + }, + }, + } +} + +// GetDbfs returns the value of the Dbfs field in ClusterLogConf_SdkV2 as +// a DbfsStorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterLogConf_SdkV2) GetDbfs(ctx context.Context) (DbfsStorageInfo_SdkV2, bool) { + var e DbfsStorageInfo_SdkV2 + if o.Dbfs.IsNull() || o.Dbfs.IsUnknown() { + return e, false + } + var v []DbfsStorageInfo_SdkV2 + d := o.Dbfs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbfs sets the value of the Dbfs field in ClusterLogConf_SdkV2. +func (o *ClusterLogConf_SdkV2) SetDbfs(ctx context.Context, v DbfsStorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbfs"] + o.Dbfs = types.ListValueMust(t, vs) +} + +// GetS3 returns the value of the S3 field in ClusterLogConf_SdkV2 as +// a S3StorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterLogConf_SdkV2) GetS3(ctx context.Context) (S3StorageInfo_SdkV2, bool) { + var e S3StorageInfo_SdkV2 + if o.S3.IsNull() || o.S3.IsUnknown() { + return e, false + } + var v []S3StorageInfo_SdkV2 + d := o.S3.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetS3 sets the value of the S3 field in ClusterLogConf_SdkV2. +func (o *ClusterLogConf_SdkV2) SetS3(ctx context.Context, v S3StorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["s3"] + o.S3 = types.ListValueMust(t, vs) +} + +type ClusterPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ClusterPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermission_SdkV2) { +} + +func (newState *ClusterPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, ClusterPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in ClusterPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in ClusterPermission_SdkV2. +func (o *ClusterPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type ClusterPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *ClusterPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissions_SdkV2) { +} + +func (newState *ClusterPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ClusterAccessControlResponse_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, ClusterPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ClusterAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ClusterPermissions_SdkV2 as +// a slice of ClusterAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]ClusterAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ClusterAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ClusterPermissions_SdkV2. +func (o *ClusterPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []ClusterAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ClusterPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ClusterPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsDescription_SdkV2) { +} + +func (newState *ClusterPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPermissionsDescription_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, ClusterPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type ClusterPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The cluster for which to get or manage permissions. + ClusterId types.String `tfsdk:"-"` +} + +func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPermissionsRequest_SdkV2) { +} + +func (newState *ClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ClusterAccessControlRequest_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, ClusterPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ClusterAccessControlRequest{}.Type(ctx), + }, + "cluster_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ClusterPermissionsRequest_SdkV2 as +// a slice of ClusterAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]ClusterAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ClusterAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ClusterPermissionsRequest_SdkV2. +func (o *ClusterPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []ClusterAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ClusterPolicyAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ClusterPolicyAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlRequest_SdkV2) { +} + +func (newState *ClusterPolicyAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyAccessControlRequest_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, ClusterPolicyAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type ClusterPolicyAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ClusterPolicyAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyAccessControlResponse_SdkV2) { +} + +func (newState *ClusterPolicyAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(ClusterPolicyPermission_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, ClusterPolicyAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: ClusterPolicyPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in ClusterPolicyAccessControlResponse_SdkV2 as +// a slice of ClusterPolicyPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPolicyAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]ClusterPolicyPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []ClusterPolicyPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in ClusterPolicyAccessControlResponse_SdkV2. +func (o *ClusterPolicyAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []ClusterPolicyPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type ClusterPolicyPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ClusterPolicyPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermission_SdkV2) { +} + +func (newState *ClusterPolicyPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, ClusterPolicyPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in ClusterPolicyPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPolicyPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in ClusterPolicyPermission_SdkV2. +func (o *ClusterPolicyPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type ClusterPolicyPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *ClusterPolicyPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissions_SdkV2) { +} + +func (newState *ClusterPolicyPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ClusterPolicyAccessControlResponse_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, ClusterPolicyPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ClusterPolicyAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ClusterPolicyPermissions_SdkV2 as +// a slice of ClusterPolicyAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPolicyPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]ClusterPolicyAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ClusterPolicyAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ClusterPolicyPermissions_SdkV2. +func (o *ClusterPolicyPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []ClusterPolicyAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ClusterPolicyPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ClusterPolicyPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsDescription_SdkV2) { +} + +func (newState *ClusterPolicyPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterPolicyPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyPermissionsDescription_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, ClusterPolicyPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type ClusterPolicyPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The cluster policy for which to get or manage permissions. + ClusterPolicyId types.String `tfsdk:"-"` +} + +func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterPolicyPermissionsRequest_SdkV2) { +} + +func (newState *ClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterPolicyPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterPolicyPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ClusterPolicyAccessControlRequest_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, ClusterPolicyPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "cluster_policy_id": o.ClusterPolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterPolicyPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ClusterPolicyAccessControlRequest{}.Type(ctx), + }, + "cluster_policy_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ClusterPolicyPermissionsRequest_SdkV2 as +// a slice of ClusterPolicyAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterPolicyPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]ClusterPolicyAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ClusterPolicyAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ClusterPolicyPermissionsRequest_SdkV2. +func (o *ClusterPolicyPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []ClusterPolicyAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// Represents a change to the cluster settings required for the cluster to +// become compliant with its policy. +type ClusterSettingsChange_SdkV2 struct { + // The field where this change would be made. + Field types.String `tfsdk:"field" tf:"optional"` + // The new value of this field after enforcing policy compliance (either a + // number, a boolean, or a string) converted to a string. This is intended + // to be read by a human. The typed new value of this field can be retrieved + // by reading the settings field in the API response. + NewValue types.String `tfsdk:"new_value" tf:"optional"` + // The previous value of this field before enforcing policy compliance + // (either a number, a boolean, or a string) converted to a string. This is + // intended to be read by a human. The type of the field can be retrieved by + // reading the settings field in the API response. + PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` +} + +func (newState *ClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSettingsChange_SdkV2) { +} + +func (newState *ClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSettingsChange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSettingsChange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterSettingsChange_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, ClusterSettingsChange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterSettingsChange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "field": o.Field, + "new_value": o.NewValue, + "previous_value": o.PreviousValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterSettingsChange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "field": types.StringType, + "new_value": types.StringType, + "previous_value": types.StringType, + }, + } +} + +type ClusterSize_SdkV2 struct { + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` +} + +func (newState *ClusterSize_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSize_SdkV2) { +} + +func (newState *ClusterSize_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSize_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSize. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterSize_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_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, ClusterSize_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterSize_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autoscale": o.Autoscale, + "num_workers": o.NumWorkers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterSize_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "num_workers": types.Int64Type, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in ClusterSize_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSize_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in ClusterSize_SdkV2. +func (o *ClusterSize_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +type ClusterSpec_SdkV2 struct { + // When set to true, fixed and default values from the policy will be used + // for fields that are omitted. When set to false, only fixed values from + // the policy will be applied. + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec_SdkV2) { +} + +func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_SdkV2{}), + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "workload_type": reflect.TypeOf(WorkloadType_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, ClusterSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_policy_default_values": o.ApplyPolicyDefaultValues, + "autoscale": o.Autoscale, + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_log_conf": o.ClusterLogConf, + "cluster_name": o.ClusterName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "docker_image": o.DockerImage, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "ssh_public_keys": o.SshPublicKeys, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_policy_default_values": types.BoolType, + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in ClusterSpec_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in ClusterSpec_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in ClusterSpec_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in ClusterSpec_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in ClusterSpec_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 *ClusterSpec_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in ClusterSpec_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in ClusterSpec_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in ClusterSpec_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in ClusterSpec_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 *ClusterSpec_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in ClusterSpec_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 *ClusterSpec_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in ClusterSpec_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in ClusterSpec_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +// Get status +type ClusterStatus_SdkV2 struct { + // Unique identifier of the cluster whose status should be retrieved. + ClusterId types.String `tfsdk:"-"` +} + +func (newState *ClusterStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterStatus_SdkV2) { +} + +func (newState *ClusterStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterStatus_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, ClusterStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type Command_SdkV2 struct { + // Running cluster id + ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + // Executable code + Command types.String `tfsdk:"command" tf:"optional"` + // Running context id + ContextId types.String `tfsdk:"contextId" tf:"optional"` + + Language types.String `tfsdk:"language" tf:"optional"` +} + +func (newState *Command_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Command_SdkV2) { +} + +func (newState *Command_SdkV2) SyncEffectiveFieldsDuringRead(existingState Command_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Command_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, Command_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Command_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "command": o.Command, + "contextId": o.ContextId, + "language": o.Language, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Command_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "command": types.StringType, + "contextId": types.StringType, + "language": types.StringType, + }, + } +} + +// Get command info +type CommandStatusRequest_SdkV2 struct { + ClusterId types.String `tfsdk:"-"` + + CommandId types.String `tfsdk:"-"` + + ContextId types.String `tfsdk:"-"` +} + +func (newState *CommandStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusRequest_SdkV2) { +} + +func (newState *CommandStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommandStatusRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CommandStatusRequest_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, CommandStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CommandStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "commandId": o.CommandId, + "contextId": o.ContextId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CommandStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "commandId": types.StringType, + "contextId": types.StringType, + }, + } +} + +type CommandStatusResponse_SdkV2 struct { + Id types.String `tfsdk:"id" tf:"optional"` + + Results types.List `tfsdk:"results" tf:"optional,object"` + + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *CommandStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommandStatusResponse_SdkV2) { +} + +func (newState *CommandStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommandStatusResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CommandStatusResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CommandStatusResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(Results_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, CommandStatusResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CommandStatusResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "results": o.Results, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CommandStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "results": basetypes.ListType{ + ElemType: Results{}.Type(ctx), + }, + "status": types.StringType, + }, + } +} + +// GetResults returns the value of the Results field in CommandStatusResponse_SdkV2 as +// a Results_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CommandStatusResponse_SdkV2) GetResults(ctx context.Context) (Results_SdkV2, bool) { + var e Results_SdkV2 + if o.Results.IsNull() || o.Results.IsUnknown() { + return e, false + } + var v []Results_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResults sets the value of the Results field in CommandStatusResponse_SdkV2. +func (o *CommandStatusResponse_SdkV2) SetResults(ctx context.Context, v Results_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["results"] + o.Results = types.ListValueMust(t, vs) +} + +// Get status +type ContextStatusRequest_SdkV2 struct { + ClusterId types.String `tfsdk:"-"` + + ContextId types.String `tfsdk:"-"` +} + +func (newState *ContextStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusRequest_SdkV2) { +} + +func (newState *ContextStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContextStatusRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ContextStatusRequest_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, ContextStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ContextStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "contextId": o.ContextId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ContextStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "contextId": types.StringType, + }, + } +} + +type ContextStatusResponse_SdkV2 struct { + Id types.String `tfsdk:"id" tf:"optional"` + + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *ContextStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContextStatusResponse_SdkV2) { +} + +func (newState *ContextStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContextStatusResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ContextStatusResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ContextStatusResponse_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, ContextStatusResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ContextStatusResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ContextStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "status": types.StringType, + }, + } +} + +type CreateCluster_SdkV2 struct { + // When set to true, fixed and default values from the policy will be used + // for fields that are omitted. When set to false, only fixed values from + // the policy will be applied. + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // When specified, this clones libraries from a source cluster during the + // creation of a new cluster. + CloneFrom types.List `tfsdk:"clone_from" tf:"optional,object"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:""` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster_SdkV2) { +} + +func (newState *CreateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_SdkV2{}), + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "clone_from": reflect.TypeOf(CloneCluster_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "workload_type": reflect.TypeOf(WorkloadType_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, CreateCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_policy_default_values": o.ApplyPolicyDefaultValues, + "autoscale": o.Autoscale, + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "clone_from": o.CloneFrom, + "cluster_log_conf": o.ClusterLogConf, + "cluster_name": o.ClusterName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "docker_image": o.DockerImage, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "ssh_public_keys": o.SshPublicKeys, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_policy_default_values": types.BoolType, + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "clone_from": basetypes.ListType{ + ElemType: CloneCluster{}.Type(ctx), + }, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in CreateCluster_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in CreateCluster_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in CreateCluster_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetCloneFrom returns the value of the CloneFrom field in CreateCluster_SdkV2 as +// a CloneCluster_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetCloneFrom(ctx context.Context) (CloneCluster_SdkV2, bool) { + var e CloneCluster_SdkV2 + if o.CloneFrom.IsNull() || o.CloneFrom.IsUnknown() { + return e, false + } + var v []CloneCluster_SdkV2 + d := o.CloneFrom.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloneFrom sets the value of the CloneFrom field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetCloneFrom(ctx context.Context, v CloneCluster_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clone_from"] + o.CloneFrom = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in CreateCluster_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in CreateCluster_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 *CreateCluster_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in CreateCluster_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in CreateCluster_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in CreateCluster_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in CreateCluster_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 *CreateCluster_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in CreateCluster_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 *CreateCluster_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in CreateCluster_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in CreateCluster_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCluster_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in CreateCluster_SdkV2. +func (o *CreateCluster_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +type CreateClusterResponse_SdkV2 struct { + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` +} + +func (newState *CreateClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateClusterResponse_SdkV2) { +} + +func (newState *CreateClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateClusterResponse_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, CreateClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateClusterResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type CreateContext_SdkV2 struct { + // Running cluster id + ClusterId types.String `tfsdk:"clusterId" tf:"optional"` + + Language types.String `tfsdk:"language" tf:"optional"` +} + +func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateContext_SdkV2) { +} + +func (newState *CreateContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateContext_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateContext_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, CreateContext_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateContext_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "language": o.Language, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateContext_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "language": types.StringType, + }, + } +} + +type CreateInstancePool_SdkV2 struct { + // Attributes related to instance pools running on Amazon Web Services. If + // not specified at pool creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to instance pools running on Azure. If not specified + // at pool creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // Additional tags for pool resources. Databricks will tag all pool + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Defines the specification of the disks that will be attached to all spark + // containers. + DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + // Autoscaling Local Storage: when enabled, this instances in this pool will + // dynamically acquire additional disk space when its Spark workers are + // running low on disk space. In AWS, this feature requires specific AWS + // permissions to function correctly - refer to the User Guide for more + // details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Attributes related to instance pools running on Google Cloud Platform. If + // not specified at pool creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // Automatically terminates the extra instances in the pool cache after they + // are inactive for this time in minutes if min_idle_instances requirement + // is already met. If not set, the extra pool instances will be + // automatically terminated after a default timeout. If specified, the + // threshold must be between 0 and 10000 minutes. Users can also set this + // value to 0 to instantly remove idle instances from the cache if min cache + // size could still hold. + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + // Pool name requested by the user. Pool name must be unique. Length must be + // between 1 and 100 characters. + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` + // Maximum number of outstanding instances to keep in the pool, including + // both instances used by clusters and idle instances. Clusters that require + // further instance provisioning will fail during upsize requests. + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + // Minimum number of idle instances to keep in the instance pool + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` + // Custom Docker Image BYOC + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + // A list containing at most one preloaded Spark image version for the pool. + // Pool-backed clusters started with the preloaded Spark version will start + // faster. A list of available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` +} + +func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePool_SdkV2) { +} + +func (newState *CreateInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstancePool_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateInstancePool_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_attributes": reflect.TypeOf(InstancePoolAwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(InstancePoolAzureAttributes_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "disk_spec": reflect.TypeOf(DiskSpec_SdkV2{}), + "gcp_attributes": reflect.TypeOf(InstancePoolGcpAttributes_SdkV2{}), + "preloaded_docker_images": reflect.TypeOf(DockerImage_SdkV2{}), + "preloaded_spark_versions": 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, CreateInstancePool_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateInstancePool_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "custom_tags": o.CustomTags, + "disk_spec": o.DiskSpec, + "enable_elastic_disk": o.EnableElasticDisk, + "gcp_attributes": o.GcpAttributes, + "idle_instance_autotermination_minutes": o.IdleInstanceAutoterminationMinutes, + "instance_pool_name": o.InstancePoolName, + "max_capacity": o.MaxCapacity, + "min_idle_instances": o.MinIdleInstances, + "node_type_id": o.NodeTypeId, + "preloaded_docker_images": o.PreloadedDockerImages, + "preloaded_spark_versions": o.PreloadedSparkVersions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateInstancePool_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_attributes": basetypes.ListType{ + ElemType: InstancePoolAwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: InstancePoolAzureAttributes{}.Type(ctx), + }, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "disk_spec": basetypes.ListType{ + ElemType: DiskSpec{}.Type(ctx), + }, + "enable_elastic_disk": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: InstancePoolGcpAttributes{}.Type(ctx), + }, + "idle_instance_autotermination_minutes": types.Int64Type, + "instance_pool_name": types.StringType, + "max_capacity": types.Int64Type, + "min_idle_instances": types.Int64Type, + "node_type_id": types.StringType, + "preloaded_docker_images": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "preloaded_spark_versions": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAwsAttributes returns the value of the AwsAttributes field in CreateInstancePool_SdkV2 as +// a InstancePoolAwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetAwsAttributes(ctx context.Context) (InstancePoolAwsAttributes_SdkV2, bool) { + var e InstancePoolAwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in CreateInstancePool_SdkV2 as +// a InstancePoolAzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetAzureAttributes(ctx context.Context) (InstancePoolAzureAttributes_SdkV2, bool) { + var e InstancePoolAzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in CreateInstancePool_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 *CreateInstancePool_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDiskSpec returns the value of the DiskSpec field in CreateInstancePool_SdkV2 as +// a DiskSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetDiskSpec(ctx context.Context) (DiskSpec_SdkV2, bool) { + var e DiskSpec_SdkV2 + if o.DiskSpec.IsNull() || o.DiskSpec.IsUnknown() { + return e, false + } + var v []DiskSpec_SdkV2 + d := o.DiskSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDiskSpec sets the value of the DiskSpec field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetDiskSpec(ctx context.Context, v DiskSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] + o.DiskSpec = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in CreateInstancePool_SdkV2 as +// a InstancePoolGcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetGcpAttributes(ctx context.Context) (InstancePoolGcpAttributes_SdkV2, bool) { + var e InstancePoolGcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolGcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in CreateInstancePool_SdkV2 as +// a slice of DockerImage_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetPreloadedDockerImages(ctx context.Context) ([]DockerImage_SdkV2, bool) { + if o.PreloadedDockerImages.IsNull() || o.PreloadedDockerImages.IsUnknown() { + return nil, false + } + var v []DockerImage_SdkV2 + d := o.PreloadedDockerImages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedDockerImages sets the value of the PreloadedDockerImages field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetPreloadedDockerImages(ctx context.Context, v []DockerImage_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["preloaded_docker_images"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedDockerImages = types.ListValueMust(t, vs) +} + +// GetPreloadedSparkVersions returns the value of the PreloadedSparkVersions field in CreateInstancePool_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstancePool_SdkV2) GetPreloadedSparkVersions(ctx context.Context) ([]types.String, bool) { + if o.PreloadedSparkVersions.IsNull() || o.PreloadedSparkVersions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PreloadedSparkVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedSparkVersions sets the value of the PreloadedSparkVersions field in CreateInstancePool_SdkV2. +func (o *CreateInstancePool_SdkV2) SetPreloadedSparkVersions(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["preloaded_spark_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedSparkVersions = types.ListValueMust(t, vs) +} + +type CreateInstancePoolResponse_SdkV2 struct { + // The ID of the created instance pool. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` +} + +func (newState *CreateInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstancePoolResponse_SdkV2) { +} + +func (newState *CreateInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstancePoolResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateInstancePoolResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateInstancePoolResponse_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, CreateInstancePoolResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateInstancePoolResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateInstancePoolResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pool_id": types.StringType, + }, + } +} + +type CreatePolicy_SdkV2 struct { + // Policy definition document expressed in [Databricks Cluster Policy + // Definition Language]. + // + // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + Definition types.String `tfsdk:"definition" tf:"optional"` + // Additional human-readable description of the cluster policy. + Description types.String `tfsdk:"description" tf:"optional"` + // A list of libraries to be installed on the next cluster restart that uses + // this policy. The maximum number of libraries is 500. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Max number of clusters per user that can be active using this policy. If + // not present, there is no max limit. + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + // Cluster Policy name requested by the user. This has to be unique. Length + // must be between 1 and 100 characters. + Name types.String `tfsdk:"name" tf:"optional"` + // Policy definition JSON document expressed in [Databricks Policy + // Definition Language]. The JSON document must be passed as a string and + // cannot be embedded in the requests. + // + // You can use this to customize the policy definition inherited from the + // policy family. Policy rules specified here are merged into the inherited + // policy definition. + // + // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + // ID of the policy family. The cluster policy's policy definition inherits + // the policy family's policy definition. + // + // Cannot be used with `definition`. Use + // `policy_family_definition_overrides` instead to customize the policy + // definition. + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` +} + +func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicy_SdkV2) { +} + +func (newState *CreatePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePolicy_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "libraries": reflect.TypeOf(Library_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, CreatePolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "definition": o.Definition, + "description": o.Description, + "libraries": o.Libraries, + "max_clusters_per_user": o.MaxClustersPerUser, + "name": o.Name, + "policy_family_definition_overrides": o.PolicyFamilyDefinitionOverrides, + "policy_family_id": o.PolicyFamilyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "definition": types.StringType, + "description": types.StringType, + "libraries": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + "max_clusters_per_user": types.Int64Type, + "name": types.StringType, + "policy_family_definition_overrides": types.StringType, + "policy_family_id": types.StringType, + }, + } +} + +// GetLibraries returns the value of the Libraries field in CreatePolicy_SdkV2 as +// a slice of Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePolicy_SdkV2) GetLibraries(ctx context.Context) ([]Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in CreatePolicy_SdkV2. +func (o *CreatePolicy_SdkV2) SetLibraries(ctx context.Context, v []Library_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +type CreatePolicyResponse_SdkV2 struct { + // Canonical unique identifier for the cluster policy. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` +} + +func (newState *CreatePolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePolicyResponse_SdkV2) { +} + +func (newState *CreatePolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePolicyResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePolicyResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePolicyResponse_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, CreatePolicyResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePolicyResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + }, + } +} + +type CreateResponse_SdkV2 struct { + // The global init script ID. + ScriptId types.String `tfsdk:"script_id" tf:"optional"` +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateResponse_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, CreateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "script_id": o.ScriptId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "script_id": types.StringType, + }, + } +} + +type Created_SdkV2 struct { + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *Created_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Created_SdkV2) { +} + +func (newState *Created_SdkV2) SyncEffectiveFieldsDuringRead(existingState Created_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Created. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Created_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, Created_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Created_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Created_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DataPlaneEventDetails_SdkV2 struct { + // + EventType types.String `tfsdk:"event_type" tf:"optional"` + // + ExecutorFailures types.Int64 `tfsdk:"executor_failures" tf:"optional"` + // + HostId types.String `tfsdk:"host_id" tf:"optional"` + // + Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` +} + +func (newState *DataPlaneEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneEventDetails_SdkV2) { +} + +func (newState *DataPlaneEventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneEventDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneEventDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataPlaneEventDetails_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, DataPlaneEventDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataPlaneEventDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event_type": o.EventType, + "executor_failures": o.ExecutorFailures, + "host_id": o.HostId, + "timestamp": o.Timestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataPlaneEventDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event_type": types.StringType, + "executor_failures": types.Int64Type, + "host_id": types.StringType, + "timestamp": types.Int64Type, + }, + } +} + +type DbfsStorageInfo_SdkV2 struct { + // dbfs destination, e.g. `dbfs:/my/path` + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *DbfsStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbfsStorageInfo_SdkV2) { +} + +func (newState *DbfsStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbfsStorageInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DbfsStorageInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DbfsStorageInfo_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, DbfsStorageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DbfsStorageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DbfsStorageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} + +type DeleteCluster_SdkV2 struct { + // The cluster to be terminated. + ClusterId types.String `tfsdk:"cluster_id" tf:""` +} + +func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCluster_SdkV2) { +} + +func (newState *DeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCluster_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, DeleteCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type DeleteClusterResponse_SdkV2 struct { +} + +func (newState *DeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteClusterResponse_SdkV2) { +} + +func (newState *DeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteClusterResponse_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, DeleteClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteClusterResponse_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 DeleteClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete init script +type DeleteGlobalInitScriptRequest_SdkV2 struct { + // The ID of the global init script. + ScriptId types.String `tfsdk:"-"` +} + +func (newState *DeleteGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGlobalInitScriptRequest_SdkV2) { +} + +func (newState *DeleteGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteGlobalInitScriptRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGlobalInitScriptRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteGlobalInitScriptRequest_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, DeleteGlobalInitScriptRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteGlobalInitScriptRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "script_id": o.ScriptId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteGlobalInitScriptRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "script_id": types.StringType, + }, + } +} + +type DeleteInstancePool_SdkV2 struct { + // The instance pool to be terminated. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` +} + +func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstancePool_SdkV2) { +} + +func (newState *DeleteInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePool_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteInstancePool_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, DeleteInstancePool_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteInstancePool_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteInstancePool_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pool_id": types.StringType, + }, + } +} + +type DeleteInstancePoolResponse_SdkV2 struct { +} + +func (newState *DeleteInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstancePoolResponse_SdkV2) { +} + +func (newState *DeleteInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstancePoolResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstancePoolResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteInstancePoolResponse_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, DeleteInstancePoolResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteInstancePoolResponse_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 DeleteInstancePoolResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeletePolicy_SdkV2 struct { + // The ID of the policy to delete. + PolicyId types.String `tfsdk:"policy_id" tf:""` +} + +func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePolicy_SdkV2) { +} + +func (newState *DeletePolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePolicy_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePolicy_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, DeletePolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + }, + } +} + +type DeletePolicyResponse_SdkV2 struct { +} + +func (newState *DeletePolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePolicyResponse_SdkV2) { +} + +func (newState *DeletePolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePolicyResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePolicyResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePolicyResponse_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, DeletePolicyResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePolicyResponse_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 DeletePolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 DestroyContext_SdkV2 struct { + ClusterId types.String `tfsdk:"clusterId" tf:""` + + ContextId types.String `tfsdk:"contextId" tf:""` +} + +func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyContext_SdkV2) { +} + +func (newState *DestroyContext_SdkV2) SyncEffectiveFieldsDuringRead(existingState DestroyContext_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DestroyContext_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, DestroyContext_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DestroyContext_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusterId": o.ClusterId, + "contextId": o.ContextId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DestroyContext_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusterId": types.StringType, + "contextId": types.StringType, + }, + } +} + +type DestroyResponse_SdkV2 struct { +} + +func (newState *DestroyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DestroyResponse_SdkV2) { +} + +func (newState *DestroyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DestroyResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DestroyResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DestroyResponse_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, DestroyResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DestroyResponse_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 DestroyResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DiskSpec_SdkV2 struct { + // The number of disks launched for each instance: - This feature is only + // enabled for supported node types. - Users can choose up to the limit of + // the disks supported by the node type. - For node types with no OS disk, + // at least one disk must be specified; otherwise, cluster creation will + // fail. + // + // If disks are attached, Databricks will configure Spark to use only the + // disks for scratch storage, because heterogenously sized scratch devices + // can lead to inefficient disk utilization. If no disks are attached, + // Databricks will configure Spark to use instance store disks. + // + // Note: If disks are specified, then the Spark configuration + // `spark.local.dir` will be overridden. + // + // Disks will be mounted at: - For AWS: `/ebs0`, `/ebs1`, and etc. - For + // Azure: `/remote_volume0`, `/remote_volume1`, and etc. + DiskCount types.Int64 `tfsdk:"disk_count" tf:"optional"` + + DiskIops types.Int64 `tfsdk:"disk_iops" tf:"optional"` + // The size of each disk (in GiB) launched for each instance. Values must + // fall into the supported range for a particular instance type. + // + // For AWS: - General Purpose SSD: 100 - 4096 GiB - Throughput Optimized + // HDD: 500 - 4096 GiB + // + // For Azure: - Premium LRS (SSD): 1 - 1023 GiB - Standard LRS (HDD): 1- + // 1023 GiB + DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + + DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:"optional"` + // The type of disks that will be launched with this cluster. + DiskType types.List `tfsdk:"disk_type" tf:"optional,object"` +} + +func (newState *DiskSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskSpec_SdkV2) { +} + +func (newState *DiskSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState DiskSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DiskSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "disk_type": reflect.TypeOf(DiskType_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, DiskSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DiskSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "disk_count": o.DiskCount, + "disk_iops": o.DiskIops, + "disk_size": o.DiskSize, + "disk_throughput": o.DiskThroughput, + "disk_type": o.DiskType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DiskSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "disk_count": types.Int64Type, + "disk_iops": types.Int64Type, + "disk_size": types.Int64Type, + "disk_throughput": types.Int64Type, + "disk_type": basetypes.ListType{ + ElemType: DiskType{}.Type(ctx), + }, + }, + } +} + +// GetDiskType returns the value of the DiskType field in DiskSpec_SdkV2 as +// a DiskType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DiskSpec_SdkV2) GetDiskType(ctx context.Context) (DiskType_SdkV2, bool) { + var e DiskType_SdkV2 + if o.DiskType.IsNull() || o.DiskType.IsUnknown() { + return e, false + } + var v []DiskType_SdkV2 + d := o.DiskType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDiskType sets the value of the DiskType field in DiskSpec_SdkV2. +func (o *DiskSpec_SdkV2) SetDiskType(ctx context.Context, v DiskType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_type"] + o.DiskType = types.ListValueMust(t, vs) +} + +type DiskType_SdkV2 struct { + AzureDiskVolumeType types.String `tfsdk:"azure_disk_volume_type" tf:"optional"` + + EbsVolumeType types.String `tfsdk:"ebs_volume_type" tf:"optional"` +} + +func (newState *DiskType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskType_SdkV2) { +} + +func (newState *DiskType_SdkV2) SyncEffectiveFieldsDuringRead(existingState DiskType_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DiskType. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DiskType_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, DiskType_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DiskType_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "azure_disk_volume_type": o.AzureDiskVolumeType, + "ebs_volume_type": o.EbsVolumeType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DiskType_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "azure_disk_volume_type": types.StringType, + "ebs_volume_type": types.StringType, + }, + } +} + +type DockerBasicAuth_SdkV2 struct { + // Password of the user + Password types.String `tfsdk:"password" tf:"optional"` + // Name of the user + Username types.String `tfsdk:"username" tf:"optional"` +} + +func (newState *DockerBasicAuth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerBasicAuth_SdkV2) { +} + +func (newState *DockerBasicAuth_SdkV2) SyncEffectiveFieldsDuringRead(existingState DockerBasicAuth_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerBasicAuth. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DockerBasicAuth_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, DockerBasicAuth_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DockerBasicAuth_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "password": o.Password, + "username": o.Username, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DockerBasicAuth_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "password": types.StringType, + "username": types.StringType, + }, + } +} + +type DockerImage_SdkV2 struct { + BasicAuth types.List `tfsdk:"basic_auth" tf:"optional,object"` + // URL of the docker image. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *DockerImage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DockerImage_SdkV2) { +} + +func (newState *DockerImage_SdkV2) SyncEffectiveFieldsDuringRead(existingState DockerImage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DockerImage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DockerImage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "basic_auth": reflect.TypeOf(DockerBasicAuth_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, DockerImage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DockerImage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "basic_auth": o.BasicAuth, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DockerImage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "basic_auth": basetypes.ListType{ + ElemType: DockerBasicAuth{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetBasicAuth returns the value of the BasicAuth field in DockerImage_SdkV2 as +// a DockerBasicAuth_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DockerImage_SdkV2) GetBasicAuth(ctx context.Context) (DockerBasicAuth_SdkV2, bool) { + var e DockerBasicAuth_SdkV2 + if o.BasicAuth.IsNull() || o.BasicAuth.IsUnknown() { + return e, false + } + var v []DockerBasicAuth_SdkV2 + d := o.BasicAuth.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBasicAuth sets the value of the BasicAuth field in DockerImage_SdkV2. +func (o *DockerImage_SdkV2) SetBasicAuth(ctx context.Context, v DockerBasicAuth_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["basic_auth"] + o.BasicAuth = types.ListValueMust(t, vs) +} + +type EditCluster_SdkV2 struct { + // When set to true, fixed and default values from the policy will be used + // for fields that are omitted. When set to false, only fixed values from + // the policy will be applied. + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // ID of the cluster + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:""` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster_SdkV2) { +} + +func (newState *EditCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_SdkV2{}), + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "workload_type": reflect.TypeOf(WorkloadType_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, EditCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_policy_default_values": o.ApplyPolicyDefaultValues, + "autoscale": o.Autoscale, + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_id": o.ClusterId, + "cluster_log_conf": o.ClusterLogConf, + "cluster_name": o.ClusterName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "docker_image": o.DockerImage, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "ssh_public_keys": o.SshPublicKeys, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_policy_default_values": types.BoolType, + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "cluster_id": types.StringType, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in EditCluster_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in EditCluster_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in EditCluster_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in EditCluster_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in EditCluster_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 *EditCluster_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in EditCluster_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in EditCluster_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in EditCluster_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in EditCluster_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 *EditCluster_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in EditCluster_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 *EditCluster_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in EditCluster_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in EditCluster_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditCluster_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in EditCluster_SdkV2. +func (o *EditCluster_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +type EditClusterResponse_SdkV2 struct { +} + +func (newState *EditClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditClusterResponse_SdkV2) { +} + +func (newState *EditClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditClusterResponse_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, EditClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditClusterResponse_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 EditClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EditInstancePool_SdkV2 struct { + // Additional tags for pool resources. Databricks will tag all pool + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Automatically terminates the extra instances in the pool cache after they + // are inactive for this time in minutes if min_idle_instances requirement + // is already met. If not set, the extra pool instances will be + // automatically terminated after a default timeout. If specified, the + // threshold must be between 0 and 10000 minutes. Users can also set this + // value to 0 to instantly remove idle instances from the cache if min cache + // size could still hold. + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + // Instance pool ID + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` + // Pool name requested by the user. Pool name must be unique. Length must be + // between 1 and 100 characters. + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:""` + // Maximum number of outstanding instances to keep in the pool, including + // both instances used by clusters and idle instances. Clusters that require + // further instance provisioning will fail during upsize requests. + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + // Minimum number of idle instances to keep in the instance pool + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` +} + +func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditInstancePool_SdkV2) { +} + +func (newState *EditInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditInstancePool_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditInstancePool_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_tags": 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, EditInstancePool_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditInstancePool_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "custom_tags": o.CustomTags, + "idle_instance_autotermination_minutes": o.IdleInstanceAutoterminationMinutes, + "instance_pool_id": o.InstancePoolId, + "instance_pool_name": o.InstancePoolName, + "max_capacity": o.MaxCapacity, + "min_idle_instances": o.MinIdleInstances, + "node_type_id": o.NodeTypeId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditInstancePool_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "idle_instance_autotermination_minutes": types.Int64Type, + "instance_pool_id": types.StringType, + "instance_pool_name": types.StringType, + "max_capacity": types.Int64Type, + "min_idle_instances": types.Int64Type, + "node_type_id": types.StringType, + }, + } +} + +// GetCustomTags returns the value of the CustomTags field in EditInstancePool_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 *EditInstancePool_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in EditInstancePool_SdkV2. +func (o *EditInstancePool_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +type EditInstancePoolResponse_SdkV2 struct { +} + +func (newState *EditInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditInstancePoolResponse_SdkV2) { +} + +func (newState *EditInstancePoolResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditInstancePoolResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditInstancePoolResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditInstancePoolResponse_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, EditInstancePoolResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditInstancePoolResponse_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 EditInstancePoolResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EditPolicy_SdkV2 struct { + // Policy definition document expressed in [Databricks Cluster Policy + // Definition Language]. + // + // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + Definition types.String `tfsdk:"definition" tf:"optional"` + // Additional human-readable description of the cluster policy. + Description types.String `tfsdk:"description" tf:"optional"` + // A list of libraries to be installed on the next cluster restart that uses + // this policy. The maximum number of libraries is 500. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Max number of clusters per user that can be active using this policy. If + // not present, there is no max limit. + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + // Cluster Policy name requested by the user. This has to be unique. Length + // must be between 1 and 100 characters. + Name types.String `tfsdk:"name" tf:"optional"` + // Policy definition JSON document expressed in [Databricks Policy + // Definition Language]. The JSON document must be passed as a string and + // cannot be embedded in the requests. + // + // You can use this to customize the policy definition inherited from the + // policy family. Policy rules specified here are merged into the inherited + // policy definition. + // + // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + // ID of the policy family. The cluster policy's policy definition inherits + // the policy family's policy definition. + // + // Cannot be used with `definition`. Use + // `policy_family_definition_overrides` instead to customize the policy + // definition. + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + // The ID of the policy to update. + PolicyId types.String `tfsdk:"policy_id" tf:""` +} + +func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPolicy_SdkV2) { +} + +func (newState *EditPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPolicy_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditPolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "libraries": reflect.TypeOf(Library_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, EditPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "definition": o.Definition, + "description": o.Description, + "libraries": o.Libraries, + "max_clusters_per_user": o.MaxClustersPerUser, + "name": o.Name, + "policy_family_definition_overrides": o.PolicyFamilyDefinitionOverrides, + "policy_family_id": o.PolicyFamilyId, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "definition": types.StringType, + "description": types.StringType, + "libraries": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + "max_clusters_per_user": types.Int64Type, + "name": types.StringType, + "policy_family_definition_overrides": types.StringType, + "policy_family_id": types.StringType, + "policy_id": types.StringType, + }, + } +} + +// GetLibraries returns the value of the Libraries field in EditPolicy_SdkV2 as +// a slice of Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPolicy_SdkV2) GetLibraries(ctx context.Context) ([]Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in EditPolicy_SdkV2. +func (o *EditPolicy_SdkV2) SetLibraries(ctx context.Context, v []Library_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +type EditPolicyResponse_SdkV2 struct { +} + +func (newState *EditPolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPolicyResponse_SdkV2) { +} + +func (newState *EditPolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPolicyResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPolicyResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditPolicyResponse_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, EditPolicyResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditPolicyResponse_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 EditPolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EditResponse_SdkV2 struct { +} + +func (newState *EditResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditResponse_SdkV2) { +} + +func (newState *EditResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditResponse_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, EditResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditResponse_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 EditResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EnforceClusterComplianceRequest_SdkV2 struct { + // The ID of the cluster you want to enforce policy compliance on. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // If set, previews the changes that would be made to a cluster to enforce + // compliance but does not update the cluster. + ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` +} + +func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceRequest_SdkV2) { +} + +func (newState *EnforceClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnforceClusterComplianceRequest_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, EnforceClusterComplianceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnforceClusterComplianceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "validate_only": o.ValidateOnly, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnforceClusterComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "validate_only": types.BoolType, + }, + } +} + +type EnforceClusterComplianceResponse_SdkV2 struct { + // A list of changes that have been made to the cluster settings for the + // cluster to become compliant with its policy. + Changes types.List `tfsdk:"changes" tf:"optional"` + // Whether any changes have been made to the cluster settings for the + // cluster to become compliant with its policy. + HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` +} + +func (newState *EnforceClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforceClusterComplianceResponse_SdkV2) { +} + +func (newState *EnforceClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforceClusterComplianceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforceClusterComplianceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnforceClusterComplianceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "changes": reflect.TypeOf(ClusterSettingsChange_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, EnforceClusterComplianceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnforceClusterComplianceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "changes": o.Changes, + "has_changes": o.HasChanges, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnforceClusterComplianceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "changes": basetypes.ListType{ + ElemType: ClusterSettingsChange{}.Type(ctx), + }, + "has_changes": types.BoolType, + }, + } +} + +// GetChanges returns the value of the Changes field in EnforceClusterComplianceResponse_SdkV2 as +// a slice of ClusterSettingsChange_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EnforceClusterComplianceResponse_SdkV2) GetChanges(ctx context.Context) ([]ClusterSettingsChange_SdkV2, bool) { + if o.Changes.IsNull() || o.Changes.IsUnknown() { + return nil, false + } + var v []ClusterSettingsChange_SdkV2 + d := o.Changes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChanges sets the value of the Changes field in EnforceClusterComplianceResponse_SdkV2. +func (o *EnforceClusterComplianceResponse_SdkV2) SetChanges(ctx context.Context, v []ClusterSettingsChange_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["changes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Changes = types.ListValueMust(t, vs) +} + +// The environment entity used to preserve serverless environment side panel and +// jobs' environment for non-notebook task. In this minimal environment spec, +// only pip dependencies are supported. +type Environment_SdkV2 struct { + // Client version used by the environment The client is the user-facing + // environment of the runtime. Each client comes with a specific set of + // pre-installed libraries. The version is a string, consisting of the major + // client version. + Client types.String `tfsdk:"client" tf:""` + // List of pip dependencies, as supported by the version of pip in this + // environment. Each dependency is a pip requirement file line + // https://pip.pypa.io/en/stable/reference/requirements-file-format/ Allowed + // dependency could be , , (WSFS or Volumes in Databricks), E.g. + // dependencies: ["foo==0.0.1", "-r /Workspace/test/requirements.txt"] + Dependencies types.List `tfsdk:"dependencies" tf:"optional"` +} + +func (newState *Environment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Environment_SdkV2) { +} + +func (newState *Environment_SdkV2) SyncEffectiveFieldsDuringRead(existingState Environment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Environment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Environment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dependencies": 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, Environment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Environment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "client": o.Client, + "dependencies": o.Dependencies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Environment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "client": types.StringType, + "dependencies": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDependencies returns the value of the Dependencies field in Environment_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Environment_SdkV2) GetDependencies(ctx context.Context) ([]types.String, bool) { + if o.Dependencies.IsNull() || o.Dependencies.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Dependencies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDependencies sets the value of the Dependencies field in Environment_SdkV2. +func (o *Environment_SdkV2) SetDependencies(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["dependencies"] + t = t.(attr.TypeWithElementType).ElementType() + o.Dependencies = types.ListValueMust(t, vs) +} + +type EventDetails_SdkV2 struct { + // * For created clusters, the attributes of the cluster. * For edited + // clusters, the new attributes of the cluster. + Attributes types.List `tfsdk:"attributes" tf:"optional,object"` + // The cause of a change in target size. + Cause types.String `tfsdk:"cause" tf:"optional"` + // The actual cluster size that was set in the cluster creation or edit. + ClusterSize types.List `tfsdk:"cluster_size" tf:"optional,object"` + // The current number of vCPUs in the cluster. + CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:"optional"` + // The current number of nodes in the cluster. + CurrentNumWorkers types.Int64 `tfsdk:"current_num_workers" tf:"optional"` + // + DidNotExpandReason types.String `tfsdk:"did_not_expand_reason" tf:"optional"` + // Current disk size in bytes + DiskSize types.Int64 `tfsdk:"disk_size" tf:"optional"` + // More details about the change in driver's state + DriverStateMessage types.String `tfsdk:"driver_state_message" tf:"optional"` + // Whether or not a blocklisted node should be terminated. For + // ClusterEventType NODE_BLACKLISTED. + EnableTerminationForNodeBlocklisted types.Bool `tfsdk:"enable_termination_for_node_blocklisted" tf:"optional"` + // + FreeSpace types.Int64 `tfsdk:"free_space" tf:"optional"` + // List of global and cluster init scripts associated with this cluster + // event. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional,object"` + // Instance Id where the event originated from + InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + // Unique identifier of the specific job run associated with this cluster + // event * For clusters created for jobs, this will be the same as the + // cluster name + JobRunName types.String `tfsdk:"job_run_name" tf:"optional"` + // The cluster attributes before a cluster was edited. + PreviousAttributes types.List `tfsdk:"previous_attributes" tf:"optional,object"` + // The size of the cluster before an edit or resize. + PreviousClusterSize types.List `tfsdk:"previous_cluster_size" tf:"optional,object"` + // Previous disk size in bytes + PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:"optional"` + // A termination reason: * On a TERMINATED event, this is the reason of the + // termination. * On a RESIZE_COMPLETE event, this indicates the reason that + // we failed to acquire some nodes. + Reason types.List `tfsdk:"reason" tf:"optional,object"` + // The targeted number of vCPUs in the cluster. + TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:"optional"` + // The targeted number of nodes in the cluster. + TargetNumWorkers types.Int64 `tfsdk:"target_num_workers" tf:"optional"` + // The user that caused the event to occur. (Empty if it was done by the + // control plane.) + User types.String `tfsdk:"user" tf:"optional"` +} + +func (newState *EventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EventDetails_SdkV2) { +} + +func (newState *EventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState EventDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EventDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EventDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "attributes": reflect.TypeOf(ClusterAttributes_SdkV2{}), + "cluster_size": reflect.TypeOf(ClusterSize_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptEventDetails_SdkV2{}), + "previous_attributes": reflect.TypeOf(ClusterAttributes_SdkV2{}), + "previous_cluster_size": reflect.TypeOf(ClusterSize_SdkV2{}), + "reason": reflect.TypeOf(TerminationReason_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, EventDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EventDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "cause": o.Cause, + "cluster_size": o.ClusterSize, + "current_num_vcpus": o.CurrentNumVcpus, + "current_num_workers": o.CurrentNumWorkers, + "did_not_expand_reason": o.DidNotExpandReason, + "disk_size": o.DiskSize, + "driver_state_message": o.DriverStateMessage, + "enable_termination_for_node_blocklisted": o.EnableTerminationForNodeBlocklisted, + "free_space": o.FreeSpace, + "init_scripts": o.InitScripts, + "instance_id": o.InstanceId, + "job_run_name": o.JobRunName, + "previous_attributes": o.PreviousAttributes, + "previous_cluster_size": o.PreviousClusterSize, + "previous_disk_size": o.PreviousDiskSize, + "reason": o.Reason, + "target_num_vcpus": o.TargetNumVcpus, + "target_num_workers": o.TargetNumWorkers, + "user": o.User, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EventDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": basetypes.ListType{ + ElemType: ClusterAttributes{}.Type(ctx), + }, + "cause": types.StringType, + "cluster_size": basetypes.ListType{ + ElemType: ClusterSize{}.Type(ctx), + }, + "current_num_vcpus": types.Int64Type, + "current_num_workers": types.Int64Type, + "did_not_expand_reason": types.StringType, + "disk_size": types.Int64Type, + "driver_state_message": types.StringType, + "enable_termination_for_node_blocklisted": types.BoolType, + "free_space": types.Int64Type, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptEventDetails{}.Type(ctx), + }, + "instance_id": types.StringType, + "job_run_name": types.StringType, + "previous_attributes": basetypes.ListType{ + ElemType: ClusterAttributes{}.Type(ctx), + }, + "previous_cluster_size": basetypes.ListType{ + ElemType: ClusterSize{}.Type(ctx), + }, + "previous_disk_size": types.Int64Type, + "reason": basetypes.ListType{ + ElemType: TerminationReason{}.Type(ctx), + }, + "target_num_vcpus": types.Int64Type, + "target_num_workers": types.Int64Type, + "user": types.StringType, + }, + } +} + +// GetAttributes returns the value of the Attributes field in EventDetails_SdkV2 as +// a ClusterAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetAttributes(ctx context.Context) (ClusterAttributes_SdkV2, bool) { + var e ClusterAttributes_SdkV2 + if o.Attributes.IsNull() || o.Attributes.IsUnknown() { + return e, false + } + var v []ClusterAttributes_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 EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetAttributes(ctx context.Context, v ClusterAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["attributes"] + o.Attributes = types.ListValueMust(t, vs) +} + +// GetClusterSize returns the value of the ClusterSize field in EventDetails_SdkV2 as +// a ClusterSize_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetClusterSize(ctx context.Context) (ClusterSize_SdkV2, bool) { + var e ClusterSize_SdkV2 + if o.ClusterSize.IsNull() || o.ClusterSize.IsUnknown() { + return e, false + } + var v []ClusterSize_SdkV2 + d := o.ClusterSize.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterSize sets the value of the ClusterSize field in EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetClusterSize(ctx context.Context, v ClusterSize_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_size"] + o.ClusterSize = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in EventDetails_SdkV2 as +// a InitScriptEventDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetInitScripts(ctx context.Context) (InitScriptEventDetails_SdkV2, bool) { + var e InitScriptEventDetails_SdkV2 + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return e, false + } + var v []InitScriptEventDetails_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInitScripts sets the value of the InitScripts field in EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetInitScripts(ctx context.Context, v InitScriptEventDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["init_scripts"] + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetPreviousAttributes returns the value of the PreviousAttributes field in EventDetails_SdkV2 as +// a ClusterAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetPreviousAttributes(ctx context.Context) (ClusterAttributes_SdkV2, bool) { + var e ClusterAttributes_SdkV2 + if o.PreviousAttributes.IsNull() || o.PreviousAttributes.IsUnknown() { + return e, false + } + var v []ClusterAttributes_SdkV2 + d := o.PreviousAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPreviousAttributes sets the value of the PreviousAttributes field in EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetPreviousAttributes(ctx context.Context, v ClusterAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["previous_attributes"] + o.PreviousAttributes = types.ListValueMust(t, vs) +} + +// GetPreviousClusterSize returns the value of the PreviousClusterSize field in EventDetails_SdkV2 as +// a ClusterSize_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetPreviousClusterSize(ctx context.Context) (ClusterSize_SdkV2, bool) { + var e ClusterSize_SdkV2 + if o.PreviousClusterSize.IsNull() || o.PreviousClusterSize.IsUnknown() { + return e, false + } + var v []ClusterSize_SdkV2 + d := o.PreviousClusterSize.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPreviousClusterSize sets the value of the PreviousClusterSize field in EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetPreviousClusterSize(ctx context.Context, v ClusterSize_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["previous_cluster_size"] + o.PreviousClusterSize = types.ListValueMust(t, vs) +} + +// GetReason returns the value of the Reason field in EventDetails_SdkV2 as +// a TerminationReason_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EventDetails_SdkV2) GetReason(ctx context.Context) (TerminationReason_SdkV2, bool) { + var e TerminationReason_SdkV2 + if o.Reason.IsNull() || o.Reason.IsUnknown() { + return e, false + } + var v []TerminationReason_SdkV2 + d := o.Reason.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetReason sets the value of the Reason field in EventDetails_SdkV2. +func (o *EventDetails_SdkV2) SetReason(ctx context.Context, v TerminationReason_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["reason"] + o.Reason = types.ListValueMust(t, vs) +} + +type GcpAttributes_SdkV2 struct { + // This field determines whether the instance pool will contain preemptible + // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs + // if the former is unavailable. + Availability types.String `tfsdk:"availability" tf:"optional"` + // boot disk size in GB + BootDiskSize types.Int64 `tfsdk:"boot_disk_size" tf:"optional"` + // If provided, the cluster will impersonate the google service account when + // accessing gcloud services (like GCS). The google service account must + // have previously been added to the Databricks environment by an account + // administrator. + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + // If provided, each node (workers and driver) in the cluster will have this + // number of local SSDs attached. Each local SSD is 375GB in size. Refer to + // [GCP documentation] for the supported number of local SSDs for each + // instance type. + // + // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + // This field determines whether the spark executors will be scheduled to + // run on preemptible VMs (when set to true) versus standard compute engine + // VMs (when set to false; default). Note: Soon to be deprecated, use the + // availability field instead. + UsePreemptibleExecutors types.Bool `tfsdk:"use_preemptible_executors" tf:"optional"` + // Identifier for the availability zone in which the cluster resides. This + // can be one of the following: - "HA" => High availability, spread nodes + // across availability zones for a Databricks deployment region [default] - + // "AUTO" => Databricks picks an availability zone to schedule the cluster + // on. - A GCP availability zone => Pick One of the available zones for + // (machine type + region) from + // https://cloud.google.com/compute/docs/regions-zones. + ZoneId types.String `tfsdk:"zone_id" tf:"optional"` +} + +func (newState *GcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpAttributes_SdkV2) { +} + +func (newState *GcpAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpAttributes_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, GcpAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "availability": o.Availability, + "boot_disk_size": o.BootDiskSize, + "google_service_account": o.GoogleServiceAccount, + "local_ssd_count": o.LocalSsdCount, + "use_preemptible_executors": o.UsePreemptibleExecutors, + "zone_id": o.ZoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "availability": types.StringType, + "boot_disk_size": types.Int64Type, + "google_service_account": types.StringType, + "local_ssd_count": types.Int64Type, + "use_preemptible_executors": types.BoolType, + "zone_id": types.StringType, + }, + } +} + +type GcsStorageInfo_SdkV2 struct { + // GCS destination/URI, e.g. `gs://my-bucket/some-prefix` + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *GcsStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcsStorageInfo_SdkV2) { +} + +func (newState *GcsStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcsStorageInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcsStorageInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcsStorageInfo_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, GcsStorageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcsStorageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcsStorageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} + +// Get cluster policy compliance +type GetClusterComplianceRequest_SdkV2 struct { + // The ID of the cluster to get the compliance status + ClusterId types.String `tfsdk:"-"` +} + +func (newState *GetClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceRequest_SdkV2) { +} + +func (newState *GetClusterComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterComplianceRequest_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, GetClusterComplianceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterComplianceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type GetClusterComplianceResponse_SdkV2 struct { + // Whether the cluster is compliant with its policy or not. Clusters could + // be out of compliance if the policy was updated after the cluster was last + // edited. + IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + // An object containing key-value mappings representing the first 200 policy + // validation errors. The keys indicate the path where the policy validation + // error is occurring. The values indicate an error message describing the + // policy validation error. + Violations types.Map `tfsdk:"violations" tf:"optional"` +} + +func (newState *GetClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterComplianceResponse_SdkV2) { +} + +func (newState *GetClusterComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterComplianceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterComplianceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterComplianceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "violations": 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, GetClusterComplianceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterComplianceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterComplianceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_compliant": types.BoolType, + "violations": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetViolations returns the value of the Violations field in GetClusterComplianceResponse_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 *GetClusterComplianceResponse_SdkV2) GetViolations(ctx context.Context) (map[string]types.String, bool) { + if o.Violations.IsNull() || o.Violations.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Violations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetViolations sets the value of the Violations field in GetClusterComplianceResponse_SdkV2. +func (o *GetClusterComplianceResponse_SdkV2) SetViolations(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["violations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Violations = types.MapValueMust(t, vs) +} + +// Get cluster permission levels +type GetClusterPermissionLevelsRequest_SdkV2 struct { + // The cluster for which to get or manage permissions. + ClusterId types.String `tfsdk:"-"` +} + +func (newState *GetClusterPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetClusterPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPermissionLevelsRequest_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, GetClusterPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type GetClusterPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetClusterPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetClusterPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(ClusterPermissionsDescription_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, GetClusterPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: ClusterPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetClusterPermissionLevelsResponse_SdkV2 as +// a slice of ClusterPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetClusterPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]ClusterPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []ClusterPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetClusterPermissionLevelsResponse_SdkV2. +func (o *GetClusterPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []ClusterPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get cluster permissions +type GetClusterPermissionsRequest_SdkV2 struct { + // The cluster for which to get or manage permissions. + ClusterId types.String `tfsdk:"-"` +} + +func (newState *GetClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPermissionsRequest_SdkV2) { +} + +func (newState *GetClusterPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPermissionsRequest_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, GetClusterPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +// Get cluster policy permission levels +type GetClusterPolicyPermissionLevelsRequest_SdkV2 struct { + // The cluster policy for which to get or manage permissions. + ClusterPolicyId types.String `tfsdk:"-"` +} + +func (newState *GetClusterPolicyPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetClusterPolicyPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPolicyPermissionLevelsRequest_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, GetClusterPolicyPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_policy_id": o.ClusterPolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPolicyPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_policy_id": types.StringType, + }, + } +} + +type GetClusterPolicyPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetClusterPolicyPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetClusterPolicyPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPolicyPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(ClusterPolicyPermissionsDescription_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, GetClusterPolicyPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPolicyPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: ClusterPolicyPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetClusterPolicyPermissionLevelsResponse_SdkV2 as +// a slice of ClusterPolicyPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetClusterPolicyPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]ClusterPolicyPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []ClusterPolicyPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetClusterPolicyPermissionLevelsResponse_SdkV2. +func (o *GetClusterPolicyPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []ClusterPolicyPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get cluster policy permissions +type GetClusterPolicyPermissionsRequest_SdkV2 struct { + // The cluster policy for which to get or manage permissions. + ClusterPolicyId types.String `tfsdk:"-"` +} + +func (newState *GetClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyPermissionsRequest_SdkV2) { +} + +func (newState *GetClusterPolicyPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPolicyPermissionsRequest_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, GetClusterPolicyPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_policy_id": o.ClusterPolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPolicyPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_policy_id": types.StringType, + }, + } +} + +// Get a cluster policy +type GetClusterPolicyRequest_SdkV2 struct { + // Canonical unique identifier for the Cluster Policy. + PolicyId types.String `tfsdk:"-"` +} + +func (newState *GetClusterPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterPolicyRequest_SdkV2) { +} + +func (newState *GetClusterPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterPolicyRequest_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, GetClusterPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + }, + } +} + +// Get cluster info +type GetClusterRequest_SdkV2 struct { + // The cluster about which to retrieve information. + ClusterId types.String `tfsdk:"-"` +} + +func (newState *GetClusterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetClusterRequest_SdkV2) { +} + +func (newState *GetClusterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetClusterRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetClusterRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetClusterRequest_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, GetClusterRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetClusterRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetClusterRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type GetEvents_SdkV2 struct { + // The ID of the cluster to retrieve events about. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // The end time in epoch milliseconds. If empty, returns events up to the + // current time. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // An optional set of event types to filter on. If empty, all event types + // are returned. + EventTypes types.List `tfsdk:"event_types" tf:"optional"` + // The maximum number of events to include in a page of events. Defaults to + // 50, and maximum allowed value is 500. + Limit types.Int64 `tfsdk:"limit" tf:"optional"` + // The offset in the result set. Defaults to 0 (no offset). When an offset + // is specified and the results are requested in descending order, the + // end_time field is required. + Offset types.Int64 `tfsdk:"offset" tf:"optional"` + // The order to list events in; either "ASC" or "DESC". Defaults to "DESC". + Order types.String `tfsdk:"order" tf:"optional"` + // The start time in epoch milliseconds. If empty, returns events starting + // from the beginning of time. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` +} + +func (newState *GetEvents_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEvents_SdkV2) { +} + +func (newState *GetEvents_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEvents_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEvents. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEvents_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "event_types": 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, GetEvents_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEvents_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "end_time": o.EndTime, + "event_types": o.EventTypes, + "limit": o.Limit, + "offset": o.Offset, + "order": o.Order, + "start_time": o.StartTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEvents_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "end_time": types.Int64Type, + "event_types": basetypes.ListType{ + ElemType: types.StringType, + }, + "limit": types.Int64Type, + "offset": types.Int64Type, + "order": types.StringType, + "start_time": types.Int64Type, + }, + } +} + +// GetEventTypes returns the value of the EventTypes field in GetEvents_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetEvents_SdkV2) GetEventTypes(ctx context.Context) ([]types.String, bool) { + if o.EventTypes.IsNull() || o.EventTypes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.EventTypes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEventTypes sets the value of the EventTypes field in GetEvents_SdkV2. +func (o *GetEvents_SdkV2) SetEventTypes(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["event_types"] + t = t.(attr.TypeWithElementType).ElementType() + o.EventTypes = types.ListValueMust(t, vs) +} + +type GetEventsResponse_SdkV2 struct { + // + Events types.List `tfsdk:"events" tf:"optional"` + // The parameters required to retrieve the next page of events. Omitted if + // there are no more events to read. + NextPage types.List `tfsdk:"next_page" tf:"optional,object"` + // The total number of events filtered by the start_time, end_time, and + // event_types. + TotalCount types.Int64 `tfsdk:"total_count" tf:"optional"` +} + +func (newState *GetEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEventsResponse_SdkV2) { +} + +func (newState *GetEventsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEventsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEventsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEventsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": reflect.TypeOf(ClusterEvent_SdkV2{}), + "next_page": reflect.TypeOf(GetEvents_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, GetEventsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEventsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "events": o.Events, + "next_page": o.NextPage, + "total_count": o.TotalCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEventsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "events": basetypes.ListType{ + ElemType: ClusterEvent{}.Type(ctx), + }, + "next_page": basetypes.ListType{ + ElemType: GetEvents{}.Type(ctx), + }, + "total_count": types.Int64Type, + }, + } +} + +// GetEvents returns the value of the Events field in GetEventsResponse_SdkV2 as +// a slice of ClusterEvent_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetEventsResponse_SdkV2) GetEvents(ctx context.Context) ([]ClusterEvent_SdkV2, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []ClusterEvent_SdkV2 + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in GetEventsResponse_SdkV2. +func (o *GetEventsResponse_SdkV2) SetEvents(ctx context.Context, v []ClusterEvent_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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +// GetNextPage returns the value of the NextPage field in GetEventsResponse_SdkV2 as +// a GetEvents_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetEventsResponse_SdkV2) GetNextPage(ctx context.Context) (GetEvents_SdkV2, bool) { + var e GetEvents_SdkV2 + if o.NextPage.IsNull() || o.NextPage.IsUnknown() { + return e, false + } + var v []GetEvents_SdkV2 + d := o.NextPage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNextPage sets the value of the NextPage field in GetEventsResponse_SdkV2. +func (o *GetEventsResponse_SdkV2) SetNextPage(ctx context.Context, v GetEvents_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["next_page"] + o.NextPage = types.ListValueMust(t, vs) +} + +// Get an init script +type GetGlobalInitScriptRequest_SdkV2 struct { + // The ID of the global init script. + ScriptId types.String `tfsdk:"-"` +} + +func (newState *GetGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGlobalInitScriptRequest_SdkV2) { +} + +func (newState *GetGlobalInitScriptRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGlobalInitScriptRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGlobalInitScriptRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetGlobalInitScriptRequest_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, GetGlobalInitScriptRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetGlobalInitScriptRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "script_id": o.ScriptId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetGlobalInitScriptRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "script_id": types.StringType, + }, + } +} + +type GetInstancePool_SdkV2 struct { + // Attributes related to instance pools running on Amazon Web Services. If + // not specified at pool creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to instance pools running on Azure. If not specified + // at pool creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // Additional tags for pool resources. Databricks will tag all pool + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Tags that are added by Databricks regardless of any `custom_tags`, + // including: + // + // - Vendor: Databricks + // + // - InstancePoolCreator: + // + // - InstancePoolName: + // + // - InstancePoolId: + DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + // Defines the specification of the disks that will be attached to all spark + // containers. + DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + // Autoscaling Local Storage: when enabled, this instances in this pool will + // dynamically acquire additional disk space when its Spark workers are + // running low on disk space. In AWS, this feature requires specific AWS + // permissions to function correctly - refer to the User Guide for more + // details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Attributes related to instance pools running on Google Cloud Platform. If + // not specified at pool creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // Automatically terminates the extra instances in the pool cache after they + // are inactive for this time in minutes if min_idle_instances requirement + // is already met. If not set, the extra pool instances will be + // automatically terminated after a default timeout. If specified, the + // threshold must be between 0 and 10000 minutes. Users can also set this + // value to 0 to instantly remove idle instances from the cache if min cache + // size could still hold. + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + // Canonical unique identifier for the pool. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:""` + // Pool name requested by the user. Pool name must be unique. Length must be + // between 1 and 100 characters. + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + // Maximum number of outstanding instances to keep in the pool, including + // both instances used by clusters and idle instances. Clusters that require + // further instance provisioning will fail during upsize requests. + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + // Minimum number of idle instances to keep in the instance pool + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Custom Docker Image BYOC + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + // A list containing at most one preloaded Spark image version for the pool. + // Pool-backed clusters started with the preloaded Spark version will start + // faster. A list of available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + // Current state of the instance pool. + State types.String `tfsdk:"state" tf:"optional"` + // Usage statistics about the instance pool. + Stats types.List `tfsdk:"stats" tf:"optional,object"` + // Status of failed pending instances in the pool. + Status types.List `tfsdk:"status" tf:"optional,object"` +} + +func (newState *GetInstancePool_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePool_SdkV2) { +} + +func (newState *GetInstancePool_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePool_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePool. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetInstancePool_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_attributes": reflect.TypeOf(InstancePoolAwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(InstancePoolAzureAttributes_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "default_tags": reflect.TypeOf(types.String{}), + "disk_spec": reflect.TypeOf(DiskSpec_SdkV2{}), + "gcp_attributes": reflect.TypeOf(InstancePoolGcpAttributes_SdkV2{}), + "preloaded_docker_images": reflect.TypeOf(DockerImage_SdkV2{}), + "preloaded_spark_versions": reflect.TypeOf(types.String{}), + "stats": reflect.TypeOf(InstancePoolStats_SdkV2{}), + "status": reflect.TypeOf(InstancePoolStatus_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, GetInstancePool_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetInstancePool_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "custom_tags": o.CustomTags, + "default_tags": o.DefaultTags, + "disk_spec": o.DiskSpec, + "enable_elastic_disk": o.EnableElasticDisk, + "gcp_attributes": o.GcpAttributes, + "idle_instance_autotermination_minutes": o.IdleInstanceAutoterminationMinutes, + "instance_pool_id": o.InstancePoolId, + "instance_pool_name": o.InstancePoolName, + "max_capacity": o.MaxCapacity, + "min_idle_instances": o.MinIdleInstances, + "node_type_id": o.NodeTypeId, + "preloaded_docker_images": o.PreloadedDockerImages, + "preloaded_spark_versions": o.PreloadedSparkVersions, + "state": o.State, + "stats": o.Stats, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetInstancePool_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_attributes": basetypes.ListType{ + ElemType: InstancePoolAwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: InstancePoolAzureAttributes{}.Type(ctx), + }, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "default_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "disk_spec": basetypes.ListType{ + ElemType: DiskSpec{}.Type(ctx), + }, + "enable_elastic_disk": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: InstancePoolGcpAttributes{}.Type(ctx), + }, + "idle_instance_autotermination_minutes": types.Int64Type, + "instance_pool_id": types.StringType, + "instance_pool_name": types.StringType, + "max_capacity": types.Int64Type, + "min_idle_instances": types.Int64Type, + "node_type_id": types.StringType, + "preloaded_docker_images": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "preloaded_spark_versions": basetypes.ListType{ + ElemType: types.StringType, + }, + "state": types.StringType, + "stats": basetypes.ListType{ + ElemType: InstancePoolStats{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: InstancePoolStatus{}.Type(ctx), + }, + }, + } +} + +// GetAwsAttributes returns the value of the AwsAttributes field in GetInstancePool_SdkV2 as +// a InstancePoolAwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetAwsAttributes(ctx context.Context) (InstancePoolAwsAttributes_SdkV2, bool) { + var e InstancePoolAwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in GetInstancePool_SdkV2 as +// a InstancePoolAzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetAzureAttributes(ctx context.Context) (InstancePoolAzureAttributes_SdkV2, bool) { + var e InstancePoolAzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in GetInstancePool_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 *GetInstancePool_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDefaultTags returns the value of the DefaultTags field in GetInstancePool_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 *GetInstancePool_SdkV2) GetDefaultTags(ctx context.Context) (map[string]types.String, bool) { + if o.DefaultTags.IsNull() || o.DefaultTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.DefaultTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDefaultTags sets the value of the DefaultTags field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetDefaultTags(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["default_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.DefaultTags = types.MapValueMust(t, vs) +} + +// GetDiskSpec returns the value of the DiskSpec field in GetInstancePool_SdkV2 as +// a DiskSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetDiskSpec(ctx context.Context) (DiskSpec_SdkV2, bool) { + var e DiskSpec_SdkV2 + if o.DiskSpec.IsNull() || o.DiskSpec.IsUnknown() { + return e, false + } + var v []DiskSpec_SdkV2 + d := o.DiskSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDiskSpec sets the value of the DiskSpec field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetDiskSpec(ctx context.Context, v DiskSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] + o.DiskSpec = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in GetInstancePool_SdkV2 as +// a InstancePoolGcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetGcpAttributes(ctx context.Context) (InstancePoolGcpAttributes_SdkV2, bool) { + var e InstancePoolGcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolGcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in GetInstancePool_SdkV2 as +// a slice of DockerImage_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetPreloadedDockerImages(ctx context.Context) ([]DockerImage_SdkV2, bool) { + if o.PreloadedDockerImages.IsNull() || o.PreloadedDockerImages.IsUnknown() { + return nil, false + } + var v []DockerImage_SdkV2 + d := o.PreloadedDockerImages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedDockerImages sets the value of the PreloadedDockerImages field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetPreloadedDockerImages(ctx context.Context, v []DockerImage_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["preloaded_docker_images"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedDockerImages = types.ListValueMust(t, vs) +} + +// GetPreloadedSparkVersions returns the value of the PreloadedSparkVersions field in GetInstancePool_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetPreloadedSparkVersions(ctx context.Context) ([]types.String, bool) { + if o.PreloadedSparkVersions.IsNull() || o.PreloadedSparkVersions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PreloadedSparkVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedSparkVersions sets the value of the PreloadedSparkVersions field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetPreloadedSparkVersions(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["preloaded_spark_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedSparkVersions = types.ListValueMust(t, vs) +} + +// GetStats returns the value of the Stats field in GetInstancePool_SdkV2 as +// a InstancePoolStats_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetStats(ctx context.Context) (InstancePoolStats_SdkV2, bool) { + var e InstancePoolStats_SdkV2 + if o.Stats.IsNull() || o.Stats.IsUnknown() { + return e, false + } + var v []InstancePoolStats_SdkV2 + d := o.Stats.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStats sets the value of the Stats field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetStats(ctx context.Context, v InstancePoolStats_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] + o.Stats = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in GetInstancePool_SdkV2 as +// a InstancePoolStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePool_SdkV2) GetStatus(ctx context.Context) (InstancePoolStatus_SdkV2, bool) { + var e InstancePoolStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []InstancePoolStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in GetInstancePool_SdkV2. +func (o *GetInstancePool_SdkV2) SetStatus(ctx context.Context, v InstancePoolStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// Get instance pool permission levels +type GetInstancePoolPermissionLevelsRequest_SdkV2 struct { + // The instance pool for which to get or manage permissions. + InstancePoolId types.String `tfsdk:"-"` +} + +func (newState *GetInstancePoolPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetInstancePoolPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetInstancePoolPermissionLevelsRequest_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, GetInstancePoolPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetInstancePoolPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pool_id": types.StringType, + }, + } +} + +type GetInstancePoolPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetInstancePoolPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetInstancePoolPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetInstancePoolPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(InstancePoolPermissionsDescription_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, GetInstancePoolPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetInstancePoolPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: InstancePoolPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetInstancePoolPermissionLevelsResponse_SdkV2 as +// a slice of InstancePoolPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetInstancePoolPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]InstancePoolPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []InstancePoolPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetInstancePoolPermissionLevelsResponse_SdkV2. +func (o *GetInstancePoolPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []InstancePoolPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get instance pool permissions +type GetInstancePoolPermissionsRequest_SdkV2 struct { + // The instance pool for which to get or manage permissions. + InstancePoolId types.String `tfsdk:"-"` +} + +func (newState *GetInstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolPermissionsRequest_SdkV2) { +} + +func (newState *GetInstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetInstancePoolPermissionsRequest_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, GetInstancePoolPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetInstancePoolPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pool_id": types.StringType, + }, + } +} + +// Get instance pool information +type GetInstancePoolRequest_SdkV2 struct { + // The canonical unique identifier for the instance pool. + InstancePoolId types.String `tfsdk:"-"` +} + +func (newState *GetInstancePoolRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePoolRequest_SdkV2) { +} + +func (newState *GetInstancePoolRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetInstancePoolRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetInstancePoolRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetInstancePoolRequest_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, GetInstancePoolRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetInstancePoolRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pool_id": types.StringType, + }, + } +} + +// Get policy family information +type GetPolicyFamilyRequest_SdkV2 struct { + // The family ID about which to retrieve information. + PolicyFamilyId types.String `tfsdk:"-"` + // The version number for the family to fetch. Defaults to the latest + // version. + Version types.Int64 `tfsdk:"-"` +} + +func (newState *GetPolicyFamilyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyFamilyRequest_SdkV2) { +} + +func (newState *GetPolicyFamilyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyFamilyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyFamilyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPolicyFamilyRequest_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, GetPolicyFamilyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPolicyFamilyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_family_id": o.PolicyFamilyId, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPolicyFamilyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_family_id": types.StringType, + "version": types.Int64Type, + }, + } +} + +type GetSparkVersionsResponse_SdkV2 struct { + // All the available Spark versions. + Versions types.List `tfsdk:"versions" tf:"optional"` +} + +func (newState *GetSparkVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSparkVersionsResponse_SdkV2) { +} + +func (newState *GetSparkVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSparkVersionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSparkVersionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetSparkVersionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "versions": reflect.TypeOf(SparkVersion_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, GetSparkVersionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetSparkVersionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "versions": o.Versions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetSparkVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "versions": basetypes.ListType{ + ElemType: SparkVersion{}.Type(ctx), + }, + }, + } +} + +// GetVersions returns the value of the Versions field in GetSparkVersionsResponse_SdkV2 as +// a slice of SparkVersion_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetSparkVersionsResponse_SdkV2) GetVersions(ctx context.Context) ([]SparkVersion_SdkV2, bool) { + if o.Versions.IsNull() || o.Versions.IsUnknown() { + return nil, false + } + var v []SparkVersion_SdkV2 + d := o.Versions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetVersions sets the value of the Versions field in GetSparkVersionsResponse_SdkV2. +func (o *GetSparkVersionsResponse_SdkV2) SetVersions(ctx context.Context, v []SparkVersion_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["versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Versions = types.ListValueMust(t, vs) +} + +type GlobalInitScriptCreateRequest_SdkV2 struct { + // Specifies whether the script is enabled. The script runs only if enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the script + Name types.String `tfsdk:"name" tf:""` + // The position of a global init script, where 0 represents the first script + // to run, 1 is the second script to run, in ascending order. + // + // If you omit the numeric position for a new global init script, it + // defaults to last position. It will run after all current scripts. Setting + // any value greater than the position of the last script is equivalent to + // the last position. Example: Take three existing scripts with positions 0, + // 1, and 2. Any position of (3) or greater puts the script in the last + // position. If an explicit position value conflicts with an existing script + // value, your request succeeds, but the original script at that position + // and all later scripts have their positions incremented by 1. + Position types.Int64 `tfsdk:"position" tf:"optional"` + // The Base64-encoded content of the script. + Script types.String `tfsdk:"script" tf:""` +} + +func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptCreateRequest_SdkV2) { +} + +func (newState *GlobalInitScriptCreateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptCreateRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GlobalInitScriptCreateRequest_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, GlobalInitScriptCreateRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptCreateRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script": o.Script, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GlobalInitScriptCreateRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "name": types.StringType, + "position": types.Int64Type, + "script": types.StringType, + }, + } +} + +type GlobalInitScriptDetails_SdkV2 struct { + // Time when the script was created, represented as a Unix timestamp in + // milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The username of the user who created the script. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Specifies whether the script is enabled. The script runs only if enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the script + Name types.String `tfsdk:"name" tf:"optional"` + // The position of a script, where 0 represents the first script to run, 1 + // is the second script to run, in ascending order. + Position types.Int64 `tfsdk:"position" tf:"optional"` + // The global init script ID. + ScriptId types.String `tfsdk:"script_id" tf:"optional"` + // Time when the script was updated, represented as a Unix timestamp in + // milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // The username of the user who last updated the script + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *GlobalInitScriptDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetails_SdkV2) { +} + +func (newState *GlobalInitScriptDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GlobalInitScriptDetails_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, GlobalInitScriptDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script_id": o.ScriptId, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GlobalInitScriptDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "created_by": types.StringType, + "enabled": types.BoolType, + "name": types.StringType, + "position": types.Int64Type, + "script_id": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +type GlobalInitScriptDetailsWithContent_SdkV2 struct { + // Time when the script was created, represented as a Unix timestamp in + // milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The username of the user who created the script. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Specifies whether the script is enabled. The script runs only if enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the script + Name types.String `tfsdk:"name" tf:"optional"` + // The position of a script, where 0 represents the first script to run, 1 + // is the second script to run, in ascending order. + Position types.Int64 `tfsdk:"position" tf:"optional"` + // The Base64-encoded content of the script. + Script types.String `tfsdk:"script" tf:"optional"` + // The global init script ID. + ScriptId types.String `tfsdk:"script_id" tf:"optional"` + // Time when the script was updated, represented as a Unix timestamp in + // milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // The username of the user who last updated the script + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *GlobalInitScriptDetailsWithContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptDetailsWithContent_SdkV2) { +} + +func (newState *GlobalInitScriptDetailsWithContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptDetailsWithContent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GlobalInitScriptDetailsWithContent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GlobalInitScriptDetailsWithContent_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, GlobalInitScriptDetailsWithContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptDetailsWithContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script": o.Script, + "script_id": o.ScriptId, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GlobalInitScriptDetailsWithContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "created_by": types.StringType, + "enabled": types.BoolType, + "name": types.StringType, + "position": types.Int64Type, + "script": types.StringType, + "script_id": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +type GlobalInitScriptUpdateRequest_SdkV2 struct { + // Specifies whether the script is enabled. The script runs only if enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the script + Name types.String `tfsdk:"name" tf:""` + // The position of a script, where 0 represents the first script to run, 1 + // is the second script to run, in ascending order. To move the script to + // run first, set its position to 0. + // + // To move the script to the end, set its position to any value greater or + // equal to the position of the last script. Example, three existing scripts + // with positions 0, 1, and 2. Any position value of 2 or greater puts the + // script in the last position (2). + // + // If an explicit position value conflicts with an existing script, your + // request succeeds, but the original script at that position and all later + // scripts have their positions incremented by 1. + Position types.Int64 `tfsdk:"position" tf:"optional"` + // The Base64-encoded content of the script. + Script types.String `tfsdk:"script" tf:""` + // The ID of the global init script. + ScriptId types.String `tfsdk:"-"` +} + +func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GlobalInitScriptUpdateRequest_SdkV2) { +} + +func (newState *GlobalInitScriptUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GlobalInitScriptUpdateRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GlobalInitScriptUpdateRequest_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, GlobalInitScriptUpdateRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptUpdateRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script": o.Script, + "script_id": o.ScriptId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GlobalInitScriptUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "name": types.StringType, + "position": types.Int64Type, + "script": types.StringType, + "script_id": types.StringType, + }, + } +} + +type InitScriptEventDetails_SdkV2 struct { + // The cluster scoped init scripts associated with this cluster event + Cluster types.List `tfsdk:"cluster" tf:"optional"` + // The global init scripts associated with this cluster event + Global types.List `tfsdk:"global" tf:"optional"` + // The private ip address of the node where the init scripts were run. + ReportedForNode types.String `tfsdk:"reported_for_node" tf:"optional"` +} + +func (newState *InitScriptEventDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptEventDetails_SdkV2) { +} + +func (newState *InitScriptEventDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptEventDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptEventDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InitScriptEventDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster": reflect.TypeOf(InitScriptInfoAndExecutionDetails_SdkV2{}), + "global": reflect.TypeOf(InitScriptInfoAndExecutionDetails_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, InitScriptEventDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InitScriptEventDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster": o.Cluster, + "global": o.Global, + "reported_for_node": o.ReportedForNode, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InitScriptEventDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster": basetypes.ListType{ + ElemType: InitScriptInfoAndExecutionDetails{}.Type(ctx), + }, + "global": basetypes.ListType{ + ElemType: InitScriptInfoAndExecutionDetails{}.Type(ctx), + }, + "reported_for_node": types.StringType, + }, + } +} + +// GetCluster returns the value of the Cluster field in InitScriptEventDetails_SdkV2 as +// a slice of InitScriptInfoAndExecutionDetails_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptEventDetails_SdkV2) GetCluster(ctx context.Context) ([]InitScriptInfoAndExecutionDetails_SdkV2, bool) { + if o.Cluster.IsNull() || o.Cluster.IsUnknown() { + return nil, false + } + var v []InitScriptInfoAndExecutionDetails_SdkV2 + d := o.Cluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCluster sets the value of the Cluster field in InitScriptEventDetails_SdkV2. +func (o *InitScriptEventDetails_SdkV2) SetCluster(ctx context.Context, v []InitScriptInfoAndExecutionDetails_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["cluster"] + t = t.(attr.TypeWithElementType).ElementType() + o.Cluster = types.ListValueMust(t, vs) +} + +// GetGlobal returns the value of the Global field in InitScriptEventDetails_SdkV2 as +// a slice of InitScriptInfoAndExecutionDetails_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptEventDetails_SdkV2) GetGlobal(ctx context.Context) ([]InitScriptInfoAndExecutionDetails_SdkV2, bool) { + if o.Global.IsNull() || o.Global.IsUnknown() { + return nil, false + } + var v []InitScriptInfoAndExecutionDetails_SdkV2 + d := o.Global.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGlobal sets the value of the Global field in InitScriptEventDetails_SdkV2. +func (o *InitScriptEventDetails_SdkV2) SetGlobal(ctx context.Context, v []InitScriptInfoAndExecutionDetails_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["global"] + t = t.(attr.TypeWithElementType).ElementType() + o.Global = types.ListValueMust(t, vs) +} + +type InitScriptExecutionDetails_SdkV2 struct { + // Addition details regarding errors. + ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + // The duration of the script execution in seconds. + ExecutionDurationSeconds types.Int64 `tfsdk:"execution_duration_seconds" tf:"optional"` + // The current status of the script + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *InitScriptExecutionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptExecutionDetails_SdkV2) { +} + +func (newState *InitScriptExecutionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptExecutionDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptExecutionDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InitScriptExecutionDetails_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, InitScriptExecutionDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InitScriptExecutionDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error_message": o.ErrorMessage, + "execution_duration_seconds": o.ExecutionDurationSeconds, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InitScriptExecutionDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error_message": types.StringType, + "execution_duration_seconds": types.Int64Type, + "status": types.StringType, + }, + } +} + +type InitScriptInfo_SdkV2 struct { + // destination needs to be provided. e.g. `{ "abfss" : { "destination" : + // "abfss://@.dfs.core.windows.net/" + // } } + Abfss types.List `tfsdk:"abfss" tf:"optional,object"` + // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : + // "dbfs:/home/cluster_log" } }` + Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + // destination needs to be provided. e.g. `{ "file" : { "destination" : + // "file:/my/local/file.sh" } }` + File types.List `tfsdk:"file" tf:"optional,object"` + // destination needs to be provided. e.g. `{ "gcs": { "destination": + // "gs://my-bucket/file.sh" } }` + Gcs types.List `tfsdk:"gcs" tf:"optional,object"` + // destination and either the region or endpoint need to be provided. e.g. + // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : + // "us-west-2" } }` Cluster iam role is used to access s3, please make sure + // the cluster iam role in `instance_profile_arn` has permission to write + // data to the s3 destination. + S3 types.List `tfsdk:"s3" tf:"optional,object"` + // destination needs to be provided. e.g. `{ "volumes" : { "destination" : + // "/Volumes/my-init.sh" } }` + Volumes types.List `tfsdk:"volumes" tf:"optional,object"` + // destination needs to be provided. e.g. `{ "workspace" : { "destination" : + // "/Users/user1@databricks.com/my-init.sh" } }` + Workspace types.List `tfsdk:"workspace" tf:"optional,object"` +} + +func (newState *InitScriptInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfo_SdkV2) { +} + +func (newState *InitScriptInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InitScriptInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "abfss": reflect.TypeOf(Adlsgen2Info_SdkV2{}), + "dbfs": reflect.TypeOf(DbfsStorageInfo_SdkV2{}), + "file": reflect.TypeOf(LocalFileInfo_SdkV2{}), + "gcs": reflect.TypeOf(GcsStorageInfo_SdkV2{}), + "s3": reflect.TypeOf(S3StorageInfo_SdkV2{}), + "volumes": reflect.TypeOf(VolumesStorageInfo_SdkV2{}), + "workspace": reflect.TypeOf(WorkspaceStorageInfo_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, InitScriptInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InitScriptInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "abfss": o.Abfss, + "dbfs": o.Dbfs, + "file": o.File, + "gcs": o.Gcs, + "s3": o.S3, + "volumes": o.Volumes, + "workspace": o.Workspace, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InitScriptInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "abfss": basetypes.ListType{ + ElemType: Adlsgen2Info{}.Type(ctx), + }, + "dbfs": basetypes.ListType{ + ElemType: DbfsStorageInfo{}.Type(ctx), + }, + "file": basetypes.ListType{ + ElemType: LocalFileInfo{}.Type(ctx), + }, + "gcs": basetypes.ListType{ + ElemType: GcsStorageInfo{}.Type(ctx), + }, + "s3": basetypes.ListType{ + ElemType: S3StorageInfo{}.Type(ctx), + }, + "volumes": basetypes.ListType{ + ElemType: VolumesStorageInfo{}.Type(ctx), + }, + "workspace": basetypes.ListType{ + ElemType: WorkspaceStorageInfo{}.Type(ctx), + }, + }, + } +} + +// GetAbfss returns the value of the Abfss field in InitScriptInfo_SdkV2 as +// a Adlsgen2Info_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetAbfss(ctx context.Context) (Adlsgen2Info_SdkV2, bool) { + var e Adlsgen2Info_SdkV2 + if o.Abfss.IsNull() || o.Abfss.IsUnknown() { + return e, false + } + var v []Adlsgen2Info_SdkV2 + d := o.Abfss.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAbfss sets the value of the Abfss field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetAbfss(ctx context.Context, v Adlsgen2Info_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["abfss"] + o.Abfss = types.ListValueMust(t, vs) +} + +// GetDbfs returns the value of the Dbfs field in InitScriptInfo_SdkV2 as +// a DbfsStorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetDbfs(ctx context.Context) (DbfsStorageInfo_SdkV2, bool) { + var e DbfsStorageInfo_SdkV2 + if o.Dbfs.IsNull() || o.Dbfs.IsUnknown() { + return e, false + } + var v []DbfsStorageInfo_SdkV2 + d := o.Dbfs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbfs sets the value of the Dbfs field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetDbfs(ctx context.Context, v DbfsStorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbfs"] + o.Dbfs = types.ListValueMust(t, vs) +} + +// GetFile returns the value of the File field in InitScriptInfo_SdkV2 as +// a LocalFileInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetFile(ctx context.Context) (LocalFileInfo_SdkV2, bool) { + var e LocalFileInfo_SdkV2 + if o.File.IsNull() || o.File.IsUnknown() { + return e, false + } + var v []LocalFileInfo_SdkV2 + d := o.File.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFile sets the value of the File field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetFile(ctx context.Context, v LocalFileInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] + o.File = types.ListValueMust(t, vs) +} + +// GetGcs returns the value of the Gcs field in InitScriptInfo_SdkV2 as +// a GcsStorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetGcs(ctx context.Context) (GcsStorageInfo_SdkV2, bool) { + var e GcsStorageInfo_SdkV2 + if o.Gcs.IsNull() || o.Gcs.IsUnknown() { + return e, false + } + var v []GcsStorageInfo_SdkV2 + d := o.Gcs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcs sets the value of the Gcs field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetGcs(ctx context.Context, v GcsStorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcs"] + o.Gcs = types.ListValueMust(t, vs) +} + +// GetS3 returns the value of the S3 field in InitScriptInfo_SdkV2 as +// a S3StorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetS3(ctx context.Context) (S3StorageInfo_SdkV2, bool) { + var e S3StorageInfo_SdkV2 + if o.S3.IsNull() || o.S3.IsUnknown() { + return e, false + } + var v []S3StorageInfo_SdkV2 + d := o.S3.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetS3 sets the value of the S3 field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetS3(ctx context.Context, v S3StorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["s3"] + o.S3 = types.ListValueMust(t, vs) +} + +// GetVolumes returns the value of the Volumes field in InitScriptInfo_SdkV2 as +// a VolumesStorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetVolumes(ctx context.Context) (VolumesStorageInfo_SdkV2, bool) { + var e VolumesStorageInfo_SdkV2 + if o.Volumes.IsNull() || o.Volumes.IsUnknown() { + return e, false + } + var v []VolumesStorageInfo_SdkV2 + d := o.Volumes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVolumes sets the value of the Volumes field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetVolumes(ctx context.Context, v VolumesStorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["volumes"] + o.Volumes = types.ListValueMust(t, vs) +} + +// GetWorkspace returns the value of the Workspace field in InitScriptInfo_SdkV2 as +// a WorkspaceStorageInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfo_SdkV2) GetWorkspace(ctx context.Context) (WorkspaceStorageInfo_SdkV2, bool) { + var e WorkspaceStorageInfo_SdkV2 + if o.Workspace.IsNull() || o.Workspace.IsUnknown() { + return e, false + } + var v []WorkspaceStorageInfo_SdkV2 + d := o.Workspace.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkspace sets the value of the Workspace field in InitScriptInfo_SdkV2. +func (o *InitScriptInfo_SdkV2) SetWorkspace(ctx context.Context, v WorkspaceStorageInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace"] + o.Workspace = types.ListValueMust(t, vs) +} + +type InitScriptInfoAndExecutionDetails_SdkV2 struct { + // Details about the script + ExecutionDetails types.List `tfsdk:"execution_details" tf:"optional,object"` + // The script + Script types.List `tfsdk:"script" tf:"optional,object"` +} + +func (newState *InitScriptInfoAndExecutionDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfoAndExecutionDetails_SdkV2) { +} + +func (newState *InitScriptInfoAndExecutionDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState InitScriptInfoAndExecutionDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InitScriptInfoAndExecutionDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InitScriptInfoAndExecutionDetails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "execution_details": reflect.TypeOf(InitScriptExecutionDetails_SdkV2{}), + "script": reflect.TypeOf(InitScriptInfo_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, InitScriptInfoAndExecutionDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InitScriptInfoAndExecutionDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "execution_details": o.ExecutionDetails, + "script": o.Script, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InitScriptInfoAndExecutionDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "execution_details": basetypes.ListType{ + ElemType: InitScriptExecutionDetails{}.Type(ctx), + }, + "script": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + }, + } +} + +// GetExecutionDetails returns the value of the ExecutionDetails field in InitScriptInfoAndExecutionDetails_SdkV2 as +// a InitScriptExecutionDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfoAndExecutionDetails_SdkV2) GetExecutionDetails(ctx context.Context) (InitScriptExecutionDetails_SdkV2, bool) { + var e InitScriptExecutionDetails_SdkV2 + if o.ExecutionDetails.IsNull() || o.ExecutionDetails.IsUnknown() { + return e, false + } + var v []InitScriptExecutionDetails_SdkV2 + d := o.ExecutionDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExecutionDetails sets the value of the ExecutionDetails field in InitScriptInfoAndExecutionDetails_SdkV2. +func (o *InitScriptInfoAndExecutionDetails_SdkV2) SetExecutionDetails(ctx context.Context, v InitScriptExecutionDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["execution_details"] + o.ExecutionDetails = types.ListValueMust(t, vs) +} + +// GetScript returns the value of the Script field in InitScriptInfoAndExecutionDetails_SdkV2 as +// a InitScriptInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InitScriptInfoAndExecutionDetails_SdkV2) GetScript(ctx context.Context) (InitScriptInfo_SdkV2, bool) { + var e InitScriptInfo_SdkV2 + if o.Script.IsNull() || o.Script.IsUnknown() { + return e, false + } + var v []InitScriptInfo_SdkV2 + d := o.Script.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetScript sets the value of the Script field in InitScriptInfoAndExecutionDetails_SdkV2. +func (o *InitScriptInfoAndExecutionDetails_SdkV2) SetScript(ctx context.Context, v InitScriptInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["script"] + o.Script = types.ListValueMust(t, vs) +} + +type InstallLibraries_SdkV2 struct { + // Unique identifier for the cluster on which to install these libraries. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // The libraries to install. + Libraries types.List `tfsdk:"libraries" tf:""` +} + +func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallLibraries_SdkV2) { +} + +func (newState *InstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallLibraries_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstallLibraries_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "libraries": reflect.TypeOf(Library_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, InstallLibraries_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstallLibraries_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "libraries": o.Libraries, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstallLibraries_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "libraries": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + }, + } +} + +// GetLibraries returns the value of the Libraries field in InstallLibraries_SdkV2 as +// a slice of Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstallLibraries_SdkV2) GetLibraries(ctx context.Context) ([]Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in InstallLibraries_SdkV2. +func (o *InstallLibraries_SdkV2) SetLibraries(ctx context.Context, v []Library_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +type InstallLibrariesResponse_SdkV2 struct { +} + +func (newState *InstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallLibrariesResponse_SdkV2) { +} + +func (newState *InstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallLibrariesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallLibrariesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstallLibrariesResponse_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, InstallLibrariesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstallLibrariesResponse_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 InstallLibrariesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type InstancePoolAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *InstancePoolAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlRequest_SdkV2) { +} + +func (newState *InstancePoolAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolAccessControlRequest_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, InstancePoolAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type InstancePoolAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *InstancePoolAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAccessControlResponse_SdkV2) { +} + +func (newState *InstancePoolAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(InstancePoolPermission_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, InstancePoolAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: InstancePoolPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in InstancePoolAccessControlResponse_SdkV2 as +// a slice of InstancePoolPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]InstancePoolPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []InstancePoolPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in InstancePoolAccessControlResponse_SdkV2. +func (o *InstancePoolAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []InstancePoolPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type InstancePoolAndStats_SdkV2 struct { + // Attributes related to instance pools running on Amazon Web Services. If + // not specified at pool creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to instance pools running on Azure. If not specified + // at pool creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // Additional tags for pool resources. Databricks will tag all pool + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Tags that are added by Databricks regardless of any `custom_tags`, + // including: + // + // - Vendor: Databricks + // + // - InstancePoolCreator: + // + // - InstancePoolName: + // + // - InstancePoolId: + DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` + // Defines the specification of the disks that will be attached to all spark + // containers. + DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + // Autoscaling Local Storage: when enabled, this instances in this pool will + // dynamically acquire additional disk space when its Spark workers are + // running low on disk space. In AWS, this feature requires specific AWS + // permissions to function correctly - refer to the User Guide for more + // details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Attributes related to instance pools running on Google Cloud Platform. If + // not specified at pool creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // Automatically terminates the extra instances in the pool cache after they + // are inactive for this time in minutes if min_idle_instances requirement + // is already met. If not set, the extra pool instances will be + // automatically terminated after a default timeout. If specified, the + // threshold must be between 0 and 10000 minutes. Users can also set this + // value to 0 to instantly remove idle instances from the cache if min cache + // size could still hold. + IdleInstanceAutoterminationMinutes types.Int64 `tfsdk:"idle_instance_autotermination_minutes" tf:"optional"` + // Canonical unique identifier for the pool. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // Pool name requested by the user. Pool name must be unique. Length must be + // between 1 and 100 characters. + InstancePoolName types.String `tfsdk:"instance_pool_name" tf:"optional"` + // Maximum number of outstanding instances to keep in the pool, including + // both instances used by clusters and idle instances. Clusters that require + // further instance provisioning will fail during upsize requests. + MaxCapacity types.Int64 `tfsdk:"max_capacity" tf:"optional"` + // Minimum number of idle instances to keep in the instance pool + MinIdleInstances types.Int64 `tfsdk:"min_idle_instances" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Custom Docker Image BYOC + PreloadedDockerImages types.List `tfsdk:"preloaded_docker_images" tf:"optional"` + // A list containing at most one preloaded Spark image version for the pool. + // Pool-backed clusters started with the preloaded Spark version will start + // faster. A list of available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + PreloadedSparkVersions types.List `tfsdk:"preloaded_spark_versions" tf:"optional"` + // Current state of the instance pool. + State types.String `tfsdk:"state" tf:"optional"` + // Usage statistics about the instance pool. + Stats types.List `tfsdk:"stats" tf:"optional,object"` + // Status of failed pending instances in the pool. + Status types.List `tfsdk:"status" tf:"optional,object"` +} + +func (newState *InstancePoolAndStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAndStats_SdkV2) { +} + +func (newState *InstancePoolAndStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAndStats_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAndStats. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolAndStats_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_attributes": reflect.TypeOf(InstancePoolAwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(InstancePoolAzureAttributes_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "default_tags": reflect.TypeOf(types.String{}), + "disk_spec": reflect.TypeOf(DiskSpec_SdkV2{}), + "gcp_attributes": reflect.TypeOf(InstancePoolGcpAttributes_SdkV2{}), + "preloaded_docker_images": reflect.TypeOf(DockerImage_SdkV2{}), + "preloaded_spark_versions": reflect.TypeOf(types.String{}), + "stats": reflect.TypeOf(InstancePoolStats_SdkV2{}), + "status": reflect.TypeOf(InstancePoolStatus_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, InstancePoolAndStats_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAndStats_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "custom_tags": o.CustomTags, + "default_tags": o.DefaultTags, + "disk_spec": o.DiskSpec, + "enable_elastic_disk": o.EnableElasticDisk, + "gcp_attributes": o.GcpAttributes, + "idle_instance_autotermination_minutes": o.IdleInstanceAutoterminationMinutes, + "instance_pool_id": o.InstancePoolId, + "instance_pool_name": o.InstancePoolName, + "max_capacity": o.MaxCapacity, + "min_idle_instances": o.MinIdleInstances, + "node_type_id": o.NodeTypeId, + "preloaded_docker_images": o.PreloadedDockerImages, + "preloaded_spark_versions": o.PreloadedSparkVersions, + "state": o.State, + "stats": o.Stats, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolAndStats_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_attributes": basetypes.ListType{ + ElemType: InstancePoolAwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: InstancePoolAzureAttributes{}.Type(ctx), + }, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "default_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "disk_spec": basetypes.ListType{ + ElemType: DiskSpec{}.Type(ctx), + }, + "enable_elastic_disk": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: InstancePoolGcpAttributes{}.Type(ctx), + }, + "idle_instance_autotermination_minutes": types.Int64Type, + "instance_pool_id": types.StringType, + "instance_pool_name": types.StringType, + "max_capacity": types.Int64Type, + "min_idle_instances": types.Int64Type, + "node_type_id": types.StringType, + "preloaded_docker_images": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "preloaded_spark_versions": basetypes.ListType{ + ElemType: types.StringType, + }, + "state": types.StringType, + "stats": basetypes.ListType{ + ElemType: InstancePoolStats{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: InstancePoolStatus{}.Type(ctx), + }, + }, + } +} + +// GetAwsAttributes returns the value of the AwsAttributes field in InstancePoolAndStats_SdkV2 as +// a InstancePoolAwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetAwsAttributes(ctx context.Context) (InstancePoolAwsAttributes_SdkV2, bool) { + var e InstancePoolAwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in InstancePoolAndStats_SdkV2 as +// a InstancePoolAzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetAzureAttributes(ctx context.Context) (InstancePoolAzureAttributes_SdkV2, bool) { + var e InstancePoolAzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolAzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in InstancePoolAndStats_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 *InstancePoolAndStats_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDefaultTags returns the value of the DefaultTags field in InstancePoolAndStats_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 *InstancePoolAndStats_SdkV2) GetDefaultTags(ctx context.Context) (map[string]types.String, bool) { + if o.DefaultTags.IsNull() || o.DefaultTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.DefaultTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDefaultTags sets the value of the DefaultTags field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetDefaultTags(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["default_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.DefaultTags = types.MapValueMust(t, vs) +} + +// GetDiskSpec returns the value of the DiskSpec field in InstancePoolAndStats_SdkV2 as +// a DiskSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetDiskSpec(ctx context.Context) (DiskSpec_SdkV2, bool) { + var e DiskSpec_SdkV2 + if o.DiskSpec.IsNull() || o.DiskSpec.IsUnknown() { + return e, false + } + var v []DiskSpec_SdkV2 + d := o.DiskSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDiskSpec sets the value of the DiskSpec field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetDiskSpec(ctx context.Context, v DiskSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] + o.DiskSpec = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in InstancePoolAndStats_SdkV2 as +// a InstancePoolGcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetGcpAttributes(ctx context.Context) (InstancePoolGcpAttributes_SdkV2, bool) { + var e InstancePoolGcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []InstancePoolGcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in InstancePoolAndStats_SdkV2 as +// a slice of DockerImage_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetPreloadedDockerImages(ctx context.Context) ([]DockerImage_SdkV2, bool) { + if o.PreloadedDockerImages.IsNull() || o.PreloadedDockerImages.IsUnknown() { + return nil, false + } + var v []DockerImage_SdkV2 + d := o.PreloadedDockerImages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedDockerImages sets the value of the PreloadedDockerImages field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetPreloadedDockerImages(ctx context.Context, v []DockerImage_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["preloaded_docker_images"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedDockerImages = types.ListValueMust(t, vs) +} + +// GetPreloadedSparkVersions returns the value of the PreloadedSparkVersions field in InstancePoolAndStats_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetPreloadedSparkVersions(ctx context.Context) ([]types.String, bool) { + if o.PreloadedSparkVersions.IsNull() || o.PreloadedSparkVersions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PreloadedSparkVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPreloadedSparkVersions sets the value of the PreloadedSparkVersions field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetPreloadedSparkVersions(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["preloaded_spark_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.PreloadedSparkVersions = types.ListValueMust(t, vs) +} + +// GetStats returns the value of the Stats field in InstancePoolAndStats_SdkV2 as +// a InstancePoolStats_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetStats(ctx context.Context) (InstancePoolStats_SdkV2, bool) { + var e InstancePoolStats_SdkV2 + if o.Stats.IsNull() || o.Stats.IsUnknown() { + return e, false + } + var v []InstancePoolStats_SdkV2 + d := o.Stats.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStats sets the value of the Stats field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetStats(ctx context.Context, v InstancePoolStats_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] + o.Stats = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in InstancePoolAndStats_SdkV2 as +// a InstancePoolStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolAndStats_SdkV2) GetStatus(ctx context.Context) (InstancePoolStatus_SdkV2, bool) { + var e InstancePoolStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []InstancePoolStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in InstancePoolAndStats_SdkV2. +func (o *InstancePoolAndStats_SdkV2) SetStatus(ctx context.Context, v InstancePoolStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +type InstancePoolAwsAttributes_SdkV2 struct { + // Availability type used for the spot nodes. + // + // The default value is defined by + // InstancePoolConf.instancePoolDefaultAwsAvailability + Availability types.String `tfsdk:"availability" tf:"optional"` + // Calculates the bid price for AWS spot instances, as a percentage of the + // corresponding instance type's on-demand price. For example, if this field + // is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then + // the bid price is half of the price of on-demand `r3.xlarge` instances. + // Similarly, if this field is set to 200, the bid price is twice the price + // of on-demand `r3.xlarge` instances. If not specified, the default value + // is 100. When spot instances are requested for this cluster, only spot + // instances whose bid price percentage matches this field will be + // considered. Note that, for safety, we enforce this field to be no more + // than 10000. + // + // The default value and documentation here should be kept consistent with + // CommonConf.defaultSpotBidPricePercent and + // CommonConf.maxSpotBidPricePercent. + SpotBidPricePercent types.Int64 `tfsdk:"spot_bid_price_percent" tf:"optional"` + // Identifier for the availability zone/datacenter in which the cluster + // resides. This string will be of a form like "us-west-2a". The provided + // availability zone must be in the same region as the Databricks + // deployment. For example, "us-west-2a" is not a valid zone id if the + // Databricks deployment resides in the "us-east-1" region. This is an + // optional field at cluster creation, and if not specified, a default zone + // will be used. The list of available zones as well as the default value + // can be found by using the `List Zones` method. + ZoneId types.String `tfsdk:"zone_id" tf:"optional"` +} + +func (newState *InstancePoolAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAwsAttributes_SdkV2) { +} + +func (newState *InstancePoolAwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAwsAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAwsAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolAwsAttributes_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, InstancePoolAwsAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAwsAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "availability": o.Availability, + "spot_bid_price_percent": o.SpotBidPricePercent, + "zone_id": o.ZoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolAwsAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "availability": types.StringType, + "spot_bid_price_percent": types.Int64Type, + "zone_id": types.StringType, + }, + } +} + +type InstancePoolAzureAttributes_SdkV2 struct { + // Shows the Availability type used for the spot nodes. + // + // The default value is defined by + // InstancePoolConf.instancePoolDefaultAzureAvailability + Availability types.String `tfsdk:"availability" tf:"optional"` + // The default value and documentation here should be kept consistent with + // CommonConf.defaultSpotBidMaxPrice. + SpotBidMaxPrice types.Float64 `tfsdk:"spot_bid_max_price" tf:"optional"` +} + +func (newState *InstancePoolAzureAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAzureAttributes_SdkV2) { +} + +func (newState *InstancePoolAzureAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolAzureAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolAzureAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolAzureAttributes_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, InstancePoolAzureAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAzureAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "availability": o.Availability, + "spot_bid_max_price": o.SpotBidMaxPrice, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolAzureAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "availability": types.StringType, + "spot_bid_max_price": types.Float64Type, + }, + } +} + +type InstancePoolGcpAttributes_SdkV2 struct { + // This field determines whether the instance pool will contain preemptible + // VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs + // if the former is unavailable. + GcpAvailability types.String `tfsdk:"gcp_availability" tf:"optional"` + // If provided, each node in the instance pool will have this number of + // local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP + // documentation] for the supported number of local SSDs for each instance + // type. + // + // [GCP documentation]: https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + LocalSsdCount types.Int64 `tfsdk:"local_ssd_count" tf:"optional"` + // Identifier for the availability zone/datacenter in which the cluster + // resides. This string will be of a form like "us-west1-a". The provided + // availability zone must be in the same region as the Databricks workspace. + // For example, "us-west1-a" is not a valid zone id if the Databricks + // workspace resides in the "us-east1" region. This is an optional field at + // instance pool creation, and if not specified, a default zone will be + // used. + // + // This field can be one of the following: - "HA" => High availability, + // spread nodes across availability zones for a Databricks deployment region + // - A GCP availability zone => Pick One of the available zones for (machine + // type + region) from https://cloud.google.com/compute/docs/regions-zones + // (e.g. "us-west1-a"). + // + // If empty, Databricks picks an availability zone to schedule the cluster + // on. + ZoneId types.String `tfsdk:"zone_id" tf:"optional"` +} + +func (newState *InstancePoolGcpAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolGcpAttributes_SdkV2) { +} + +func (newState *InstancePoolGcpAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolGcpAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolGcpAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolGcpAttributes_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, InstancePoolGcpAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolGcpAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "gcp_availability": o.GcpAvailability, + "local_ssd_count": o.LocalSsdCount, + "zone_id": o.ZoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolGcpAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "gcp_availability": types.StringType, + "local_ssd_count": types.Int64Type, + "zone_id": types.StringType, + }, + } +} + +type InstancePoolPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *InstancePoolPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermission_SdkV2) { +} + +func (newState *InstancePoolPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, InstancePoolPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in InstancePoolPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in InstancePoolPermission_SdkV2. +func (o *InstancePoolPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type InstancePoolPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *InstancePoolPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissions_SdkV2) { +} + +func (newState *InstancePoolPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(InstancePoolAccessControlResponse_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, InstancePoolPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: InstancePoolAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in InstancePoolPermissions_SdkV2 as +// a slice of InstancePoolAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]InstancePoolAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []InstancePoolAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in InstancePoolPermissions_SdkV2. +func (o *InstancePoolPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []InstancePoolAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type InstancePoolPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *InstancePoolPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsDescription_SdkV2) { +} + +func (newState *InstancePoolPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolPermissionsDescription_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, InstancePoolPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type InstancePoolPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The instance pool for which to get or manage permissions. + InstancePoolId types.String `tfsdk:"-"` +} + +func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolPermissionsRequest_SdkV2) { +} + +func (newState *InstancePoolPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(InstancePoolAccessControlRequest_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, InstancePoolPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "instance_pool_id": o.InstancePoolId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: InstancePoolAccessControlRequest{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in InstancePoolPermissionsRequest_SdkV2 as +// a slice of InstancePoolAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]InstancePoolAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []InstancePoolAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in InstancePoolPermissionsRequest_SdkV2. +func (o *InstancePoolPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []InstancePoolAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type InstancePoolStats_SdkV2 struct { + // Number of active instances in the pool that are NOT part of a cluster. + IdleCount types.Int64 `tfsdk:"idle_count" tf:"optional"` + // Number of pending instances in the pool that are NOT part of a cluster. + PendingIdleCount types.Int64 `tfsdk:"pending_idle_count" tf:"optional"` + // Number of pending instances in the pool that are part of a cluster. + PendingUsedCount types.Int64 `tfsdk:"pending_used_count" tf:"optional"` + // Number of active instances in the pool that are part of a cluster. + UsedCount types.Int64 `tfsdk:"used_count" tf:"optional"` +} + +func (newState *InstancePoolStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStats_SdkV2) { +} + +func (newState *InstancePoolStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolStats_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStats. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolStats_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, InstancePoolStats_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolStats_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "idle_count": o.IdleCount, + "pending_idle_count": o.PendingIdleCount, + "pending_used_count": o.PendingUsedCount, + "used_count": o.UsedCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolStats_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "idle_count": types.Int64Type, + "pending_idle_count": types.Int64Type, + "pending_used_count": types.Int64Type, + "used_count": types.Int64Type, + }, + } +} + +type InstancePoolStatus_SdkV2 struct { + // List of error messages for the failed pending instances. The + // pending_instance_errors follows FIFO with maximum length of the min_idle + // of the pool. The pending_instance_errors is emptied once the number of + // exiting available instances reaches the min_idle of the pool. + PendingInstanceErrors types.List `tfsdk:"pending_instance_errors" tf:"optional"` +} + +func (newState *InstancePoolStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolStatus_SdkV2) { +} + +func (newState *InstancePoolStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstancePoolStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstancePoolStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstancePoolStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "pending_instance_errors": reflect.TypeOf(PendingInstanceError_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, InstancePoolStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstancePoolStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pending_instance_errors": o.PendingInstanceErrors, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstancePoolStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pending_instance_errors": basetypes.ListType{ + ElemType: PendingInstanceError{}.Type(ctx), + }, + }, + } +} + +// GetPendingInstanceErrors returns the value of the PendingInstanceErrors field in InstancePoolStatus_SdkV2 as +// a slice of PendingInstanceError_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstancePoolStatus_SdkV2) GetPendingInstanceErrors(ctx context.Context) ([]PendingInstanceError_SdkV2, bool) { + if o.PendingInstanceErrors.IsNull() || o.PendingInstanceErrors.IsUnknown() { + return nil, false + } + var v []PendingInstanceError_SdkV2 + d := o.PendingInstanceErrors.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPendingInstanceErrors sets the value of the PendingInstanceErrors field in InstancePoolStatus_SdkV2. +func (o *InstancePoolStatus_SdkV2) SetPendingInstanceErrors(ctx context.Context, v []PendingInstanceError_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["pending_instance_errors"] + t = t.(attr.TypeWithElementType).ElementType() + o.PendingInstanceErrors = types.ListValueMust(t, vs) +} + +type InstanceProfile_SdkV2 struct { + // The AWS IAM role ARN of the role associated with the instance profile. + // This field is required if your role name and instance profile name do not + // match and you want to use the instance profile with [Databricks SQL + // Serverless]. + // + // Otherwise, this field is optional. + // + // [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html + IamRoleArn types.String `tfsdk:"iam_role_arn" tf:"optional"` + // The AWS ARN of the instance profile to register with Databricks. This + // field is required. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` + // Boolean flag indicating whether the instance profile should only be used + // in credential passthrough scenarios. If true, it means the instance + // profile contains an meta IAM role which could assume a wide range of + // roles. Therefore it should always be used with authorization. This field + // is optional, the default value is `false`. + IsMetaInstanceProfile types.Bool `tfsdk:"is_meta_instance_profile" tf:"optional"` +} + +func (newState *InstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstanceProfile_SdkV2) { +} + +func (newState *InstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstanceProfile_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstanceProfile. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstanceProfile_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, InstanceProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstanceProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "iam_role_arn": o.IamRoleArn, + "instance_profile_arn": o.InstanceProfileArn, + "is_meta_instance_profile": o.IsMetaInstanceProfile, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "iam_role_arn": types.StringType, + "instance_profile_arn": types.StringType, + "is_meta_instance_profile": types.BoolType, + }, + } +} + +type Library_SdkV2 struct { + // Specification of a CRAN library to be installed as part of the library + Cran types.List `tfsdk:"cran" tf:"optional,object"` + // Deprecated. URI of the egg library to install. Installing Python egg + // files is deprecated and is not supported in Databricks Runtime 14.0 and + // above. + Egg types.String `tfsdk:"egg" tf:"optional"` + // URI of the JAR library to install. Supported URIs include Workspace + // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "jar": + // "/Workspace/path/to/library.jar" }`, `{ "jar" : + // "/Volumes/path/to/library.jar" }` or `{ "jar": + // "s3://my-bucket/library.jar" }`. If S3 is used, please make sure the + // cluster has read access on the library. You may need to launch the + // cluster with an IAM role to access the S3 URI. + Jar types.String `tfsdk:"jar" tf:"optional"` + // Specification of a maven library to be installed. For example: `{ + // "coordinates": "org.jsoup:jsoup:1.7.2" }` + Maven types.List `tfsdk:"maven" tf:"optional,object"` + // Specification of a PyPi library to be installed. For example: `{ + // "package": "simplejson" }` + Pypi types.List `tfsdk:"pypi" tf:"optional,object"` + // URI of the requirements.txt file to install. Only Workspace paths and + // Unity Catalog Volumes paths are supported. For example: `{ + // "requirements": "/Workspace/path/to/requirements.txt" }` or `{ + // "requirements" : "/Volumes/path/to/requirements.txt" }` + Requirements types.String `tfsdk:"requirements" tf:"optional"` + // URI of the wheel library to install. Supported URIs include Workspace + // paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "whl": + // "/Workspace/path/to/library.whl" }`, `{ "whl" : + // "/Volumes/path/to/library.whl" }` or `{ "whl": + // "s3://my-bucket/library.whl" }`. If S3 is used, please make sure the + // cluster has read access on the library. You may need to launch the + // cluster with an IAM role to access the S3 URI. + Whl types.String `tfsdk:"whl" tf:"optional"` +} + +func (newState *Library_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Library_SdkV2) { +} + +func (newState *Library_SdkV2) SyncEffectiveFieldsDuringRead(existingState Library_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Library. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Library_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cran": reflect.TypeOf(RCranLibrary_SdkV2{}), + "maven": reflect.TypeOf(MavenLibrary_SdkV2{}), + "pypi": reflect.TypeOf(PythonPyPiLibrary_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, Library_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Library_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cran": o.Cran, + "egg": o.Egg, + "jar": o.Jar, + "maven": o.Maven, + "pypi": o.Pypi, + "requirements": o.Requirements, + "whl": o.Whl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Library_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cran": basetypes.ListType{ + ElemType: RCranLibrary{}.Type(ctx), + }, + "egg": types.StringType, + "jar": types.StringType, + "maven": basetypes.ListType{ + ElemType: MavenLibrary{}.Type(ctx), + }, + "pypi": basetypes.ListType{ + ElemType: PythonPyPiLibrary{}.Type(ctx), + }, + "requirements": types.StringType, + "whl": types.StringType, + }, + } +} + +// GetCran returns the value of the Cran field in Library_SdkV2 as +// a RCranLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Library_SdkV2) GetCran(ctx context.Context) (RCranLibrary_SdkV2, bool) { + var e RCranLibrary_SdkV2 + if o.Cran.IsNull() || o.Cran.IsUnknown() { + return e, false + } + var v []RCranLibrary_SdkV2 + d := o.Cran.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCran sets the value of the Cran field in Library_SdkV2. +func (o *Library_SdkV2) SetCran(ctx context.Context, v RCranLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cran"] + o.Cran = types.ListValueMust(t, vs) +} + +// GetMaven returns the value of the Maven field in Library_SdkV2 as +// a MavenLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Library_SdkV2) GetMaven(ctx context.Context) (MavenLibrary_SdkV2, bool) { + var e MavenLibrary_SdkV2 + if o.Maven.IsNull() || o.Maven.IsUnknown() { + return e, false + } + var v []MavenLibrary_SdkV2 + d := o.Maven.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMaven sets the value of the Maven field in Library_SdkV2. +func (o *Library_SdkV2) SetMaven(ctx context.Context, v MavenLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maven"] + o.Maven = types.ListValueMust(t, vs) +} + +// GetPypi returns the value of the Pypi field in Library_SdkV2 as +// a PythonPyPiLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Library_SdkV2) GetPypi(ctx context.Context) (PythonPyPiLibrary_SdkV2, bool) { + var e PythonPyPiLibrary_SdkV2 + if o.Pypi.IsNull() || o.Pypi.IsUnknown() { + return e, false + } + var v []PythonPyPiLibrary_SdkV2 + d := o.Pypi.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPypi sets the value of the Pypi field in Library_SdkV2. +func (o *Library_SdkV2) SetPypi(ctx context.Context, v PythonPyPiLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pypi"] + o.Pypi = types.ListValueMust(t, vs) +} + +// The status of the library on a specific cluster. +type LibraryFullStatus_SdkV2 struct { + // Whether the library was set to be installed on all clusters via the + // libraries UI. + IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:"optional"` + // Unique identifier for the library. + Library types.List `tfsdk:"library" tf:"optional,object"` + // All the info and warning messages that have occurred so far for this + // library. + Messages types.List `tfsdk:"messages" tf:"optional"` + // Status of installing the library on the cluster. + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *LibraryFullStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LibraryFullStatus_SdkV2) { +} + +func (newState *LibraryFullStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LibraryFullStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LibraryFullStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LibraryFullStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "library": reflect.TypeOf(Library_SdkV2{}), + "messages": 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, LibraryFullStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LibraryFullStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_library_for_all_clusters": o.IsLibraryForAllClusters, + "library": o.Library, + "messages": o.Messages, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LibraryFullStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_library_for_all_clusters": types.BoolType, + "library": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + "messages": basetypes.ListType{ + ElemType: types.StringType, + }, + "status": types.StringType, + }, + } +} + +// GetLibrary returns the value of the Library field in LibraryFullStatus_SdkV2 as +// a Library_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LibraryFullStatus_SdkV2) GetLibrary(ctx context.Context) (Library_SdkV2, bool) { + var e Library_SdkV2 + if o.Library.IsNull() || o.Library.IsUnknown() { + return e, false + } + var v []Library_SdkV2 + d := o.Library.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLibrary sets the value of the Library field in LibraryFullStatus_SdkV2. +func (o *LibraryFullStatus_SdkV2) SetLibrary(ctx context.Context, v Library_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["library"] + o.Library = types.ListValueMust(t, vs) +} + +// GetMessages returns the value of the Messages field in LibraryFullStatus_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *LibraryFullStatus_SdkV2) GetMessages(ctx context.Context) ([]types.String, bool) { + if o.Messages.IsNull() || o.Messages.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Messages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMessages sets the value of the Messages field in LibraryFullStatus_SdkV2. +func (o *LibraryFullStatus_SdkV2) SetMessages(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["messages"] + t = t.(attr.TypeWithElementType).ElementType() + o.Messages = types.ListValueMust(t, vs) +} + +type ListAllClusterLibraryStatusesResponse_SdkV2 struct { + // A list of cluster statuses. + Statuses types.List `tfsdk:"statuses" tf:"optional"` +} + +func (newState *ListAllClusterLibraryStatusesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllClusterLibraryStatusesResponse_SdkV2) { +} + +func (newState *ListAllClusterLibraryStatusesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllClusterLibraryStatusesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllClusterLibraryStatusesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAllClusterLibraryStatusesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "statuses": reflect.TypeOf(ClusterLibraryStatuses_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, ListAllClusterLibraryStatusesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllClusterLibraryStatusesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "statuses": o.Statuses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAllClusterLibraryStatusesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "statuses": basetypes.ListType{ + ElemType: ClusterLibraryStatuses{}.Type(ctx), + }, + }, + } +} + +// GetStatuses returns the value of the Statuses field in ListAllClusterLibraryStatusesResponse_SdkV2 as +// a slice of ClusterLibraryStatuses_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAllClusterLibraryStatusesResponse_SdkV2) GetStatuses(ctx context.Context) ([]ClusterLibraryStatuses_SdkV2, bool) { + if o.Statuses.IsNull() || o.Statuses.IsUnknown() { + return nil, false + } + var v []ClusterLibraryStatuses_SdkV2 + d := o.Statuses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStatuses sets the value of the Statuses field in ListAllClusterLibraryStatusesResponse_SdkV2. +func (o *ListAllClusterLibraryStatusesResponse_SdkV2) SetStatuses(ctx context.Context, v []ClusterLibraryStatuses_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["statuses"] + t = t.(attr.TypeWithElementType).ElementType() + o.Statuses = types.ListValueMust(t, vs) +} + +type ListAvailableZonesResponse_SdkV2 struct { + // The availability zone if no `zone_id` is provided in the cluster creation + // request. + DefaultZone types.String `tfsdk:"default_zone" tf:"optional"` + // The list of available zones (e.g., ['us-west-2c', 'us-east-2']). + Zones types.List `tfsdk:"zones" tf:"optional"` +} + +func (newState *ListAvailableZonesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAvailableZonesResponse_SdkV2) { +} + +func (newState *ListAvailableZonesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAvailableZonesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAvailableZonesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAvailableZonesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "zones": 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, ListAvailableZonesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAvailableZonesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default_zone": o.DefaultZone, + "zones": o.Zones, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAvailableZonesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default_zone": types.StringType, + "zones": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetZones returns the value of the Zones field in ListAvailableZonesResponse_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAvailableZonesResponse_SdkV2) GetZones(ctx context.Context) ([]types.String, bool) { + if o.Zones.IsNull() || o.Zones.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Zones.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetZones sets the value of the Zones field in ListAvailableZonesResponse_SdkV2. +func (o *ListAvailableZonesResponse_SdkV2) SetZones(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["zones"] + t = t.(attr.TypeWithElementType).ElementType() + o.Zones = types.ListValueMust(t, vs) +} + +// List cluster policy compliance +type ListClusterCompliancesRequest_SdkV2 struct { + // Use this field to specify the maximum number of results to be returned by + // the server. The server may further constrain the maximum number of + // results returned in a single page. + PageSize types.Int64 `tfsdk:"-"` + // A page token that can be used to navigate to the next page or previous + // page as returned by `next_page_token` or `prev_page_token`. + PageToken types.String `tfsdk:"-"` + // Canonical unique identifier for the cluster policy. + PolicyId types.String `tfsdk:"-"` +} + +func (newState *ListClusterCompliancesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesRequest_SdkV2) { +} + +func (newState *ListClusterCompliancesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClusterCompliancesRequest_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, ListClusterCompliancesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClusterCompliancesRequest_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, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClusterCompliancesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "policy_id": types.StringType, + }, + } +} + +type ListClusterCompliancesResponse_SdkV2 struct { + // A list of clusters and their policy compliance statuses. + Clusters types.List `tfsdk:"clusters" tf:"optional"` + // This field represents the pagination token to retrieve the next page of + // results. If the value is "", it means no further results for the request. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // This field represents the pagination token to retrieve the previous page + // of results. If the value is "", it means no further results for the + // request. + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` +} + +func (newState *ListClusterCompliancesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterCompliancesResponse_SdkV2) { +} + +func (newState *ListClusterCompliancesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterCompliancesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterCompliancesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClusterCompliancesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clusters": reflect.TypeOf(ClusterCompliance_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, ListClusterCompliancesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClusterCompliancesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusters": o.Clusters, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClusterCompliancesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusters": basetypes.ListType{ + ElemType: ClusterCompliance{}.Type(ctx), + }, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + }, + } +} + +// GetClusters returns the value of the Clusters field in ListClusterCompliancesResponse_SdkV2 as +// a slice of ClusterCompliance_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClusterCompliancesResponse_SdkV2) GetClusters(ctx context.Context) ([]ClusterCompliance_SdkV2, bool) { + if o.Clusters.IsNull() || o.Clusters.IsUnknown() { + return nil, false + } + var v []ClusterCompliance_SdkV2 + d := o.Clusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusters sets the value of the Clusters field in ListClusterCompliancesResponse_SdkV2. +func (o *ListClusterCompliancesResponse_SdkV2) SetClusters(ctx context.Context, v []ClusterCompliance_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["clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Clusters = types.ListValueMust(t, vs) +} + +// List cluster policies +type ListClusterPoliciesRequest_SdkV2 struct { + // The cluster policy attribute to sort by. * `POLICY_CREATION_TIME` - Sort + // result list by policy creation time. * `POLICY_NAME` - Sort result list + // by policy name. + SortColumn types.String `tfsdk:"-"` + // The order in which the policies get listed. * `DESC` - Sort result list + // in descending order. * `ASC` - Sort result list in ascending order. + SortOrder types.String `tfsdk:"-"` +} + +func (newState *ListClusterPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClusterPoliciesRequest_SdkV2) { +} + +func (newState *ListClusterPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClusterPoliciesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClusterPoliciesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClusterPoliciesRequest_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, ListClusterPoliciesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClusterPoliciesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sort_column": o.SortColumn, + "sort_order": o.SortOrder, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClusterPoliciesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sort_column": types.StringType, + "sort_order": types.StringType, + }, + } +} + +type ListClustersFilterBy_SdkV2 struct { + // The source of cluster creation. + ClusterSources types.List `tfsdk:"cluster_sources" tf:"optional"` + // The current state of the clusters. + ClusterStates types.List `tfsdk:"cluster_states" tf:"optional"` + // Whether the clusters are pinned or not. + IsPinned types.Bool `tfsdk:"is_pinned" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` +} + +func (newState *ListClustersFilterBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersFilterBy_SdkV2) { +} + +func (newState *ListClustersFilterBy_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersFilterBy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersFilterBy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClustersFilterBy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster_sources": reflect.TypeOf(types.String{}), + "cluster_states": 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, ListClustersFilterBy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClustersFilterBy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_sources": o.ClusterSources, + "cluster_states": o.ClusterStates, + "is_pinned": o.IsPinned, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClustersFilterBy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_sources": basetypes.ListType{ + ElemType: types.StringType, + }, + "cluster_states": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_pinned": types.BoolType, + "policy_id": types.StringType, + }, + } +} + +// GetClusterSources returns the value of the ClusterSources field in ListClustersFilterBy_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClustersFilterBy_SdkV2) GetClusterSources(ctx context.Context) ([]types.String, bool) { + if o.ClusterSources.IsNull() || o.ClusterSources.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ClusterSources.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusterSources sets the value of the ClusterSources field in ListClustersFilterBy_SdkV2. +func (o *ListClustersFilterBy_SdkV2) SetClusterSources(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["cluster_sources"] + t = t.(attr.TypeWithElementType).ElementType() + o.ClusterSources = types.ListValueMust(t, vs) +} + +// GetClusterStates returns the value of the ClusterStates field in ListClustersFilterBy_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClustersFilterBy_SdkV2) GetClusterStates(ctx context.Context) ([]types.String, bool) { + if o.ClusterStates.IsNull() || o.ClusterStates.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ClusterStates.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusterStates sets the value of the ClusterStates field in ListClustersFilterBy_SdkV2. +func (o *ListClustersFilterBy_SdkV2) SetClusterStates(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["cluster_states"] + t = t.(attr.TypeWithElementType).ElementType() + o.ClusterStates = types.ListValueMust(t, vs) +} + +// List clusters +type ListClustersRequest_SdkV2 struct { + // Filters to apply to the list of clusters. + FilterBy types.List `tfsdk:"-"` + // Use this field to specify the maximum number of results to be returned by + // the server. The server may further constrain the maximum number of + // results returned in a single page. + PageSize types.Int64 `tfsdk:"-"` + // Use next_page_token or prev_page_token returned from the previous request + // to list the next or previous page of clusters respectively. + PageToken types.String `tfsdk:"-"` + // Sort the list of clusters by a specific criteria. + SortBy types.List `tfsdk:"-"` +} + +func (newState *ListClustersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersRequest_SdkV2) { +} + +func (newState *ListClustersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClustersRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filter_by": reflect.TypeOf(ListClustersFilterBy_SdkV2{}), + "sort_by": reflect.TypeOf(ListClustersSortBy_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, ListClustersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClustersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter_by": o.FilterBy, + "page_size": o.PageSize, + "page_token": o.PageToken, + "sort_by": o.SortBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClustersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter_by": basetypes.ListType{ + ElemType: ListClustersFilterBy{}.Type(ctx), + }, + "page_size": types.Int64Type, + "page_token": types.StringType, + "sort_by": basetypes.ListType{ + ElemType: ListClustersSortBy{}.Type(ctx), + }, + }, + } +} + +// GetFilterBy returns the value of the FilterBy field in ListClustersRequest_SdkV2 as +// a ListClustersFilterBy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClustersRequest_SdkV2) GetFilterBy(ctx context.Context) (ListClustersFilterBy_SdkV2, bool) { + var e ListClustersFilterBy_SdkV2 + if o.FilterBy.IsNull() || o.FilterBy.IsUnknown() { + return e, false + } + var v []ListClustersFilterBy_SdkV2 + d := o.FilterBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilterBy sets the value of the FilterBy field in ListClustersRequest_SdkV2. +func (o *ListClustersRequest_SdkV2) SetFilterBy(ctx context.Context, v ListClustersFilterBy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter_by"] + o.FilterBy = types.ListValueMust(t, vs) +} + +// GetSortBy returns the value of the SortBy field in ListClustersRequest_SdkV2 as +// a ListClustersSortBy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClustersRequest_SdkV2) GetSortBy(ctx context.Context) (ListClustersSortBy_SdkV2, bool) { + var e ListClustersSortBy_SdkV2 + if o.SortBy.IsNull() || o.SortBy.IsUnknown() { + return e, false + } + var v []ListClustersSortBy_SdkV2 + d := o.SortBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSortBy sets the value of the SortBy field in ListClustersRequest_SdkV2. +func (o *ListClustersRequest_SdkV2) SetSortBy(ctx context.Context, v ListClustersSortBy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sort_by"] + o.SortBy = types.ListValueMust(t, vs) +} + +type ListClustersResponse_SdkV2 struct { + // + Clusters types.List `tfsdk:"clusters" tf:"optional"` + // This field represents the pagination token to retrieve the next page of + // results. If the value is "", it means no further results for the request. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // This field represents the pagination token to retrieve the previous page + // of results. If the value is "", it means no further results for the + // request. + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` +} + +func (newState *ListClustersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersResponse_SdkV2) { +} + +func (newState *ListClustersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClustersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clusters": reflect.TypeOf(ClusterDetails_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, ListClustersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClustersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clusters": o.Clusters, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClustersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clusters": basetypes.ListType{ + ElemType: ClusterDetails{}.Type(ctx), + }, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + }, + } +} + +// GetClusters returns the value of the Clusters field in ListClustersResponse_SdkV2 as +// a slice of ClusterDetails_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListClustersResponse_SdkV2) GetClusters(ctx context.Context) ([]ClusterDetails_SdkV2, bool) { + if o.Clusters.IsNull() || o.Clusters.IsUnknown() { + return nil, false + } + var v []ClusterDetails_SdkV2 + d := o.Clusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusters sets the value of the Clusters field in ListClustersResponse_SdkV2. +func (o *ListClustersResponse_SdkV2) SetClusters(ctx context.Context, v []ClusterDetails_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["clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Clusters = types.ListValueMust(t, vs) +} + +type ListClustersSortBy_SdkV2 struct { + // The direction to sort by. + Direction types.String `tfsdk:"direction" tf:"optional"` + // The sorting criteria. By default, clusters are sorted by 3 columns from + // highest to lowest precedence: cluster state, pinned or unpinned, then + // cluster name. + Field types.String `tfsdk:"field" tf:"optional"` +} + +func (newState *ListClustersSortBy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersSortBy_SdkV2) { +} + +func (newState *ListClustersSortBy_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListClustersSortBy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListClustersSortBy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListClustersSortBy_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, ListClustersSortBy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListClustersSortBy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "direction": o.Direction, + "field": o.Field, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListClustersSortBy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "direction": types.StringType, + "field": types.StringType, + }, + } +} + +type ListGlobalInitScriptsResponse_SdkV2 struct { + Scripts types.List `tfsdk:"scripts" tf:"optional"` +} + +func (newState *ListGlobalInitScriptsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGlobalInitScriptsResponse_SdkV2) { +} + +func (newState *ListGlobalInitScriptsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGlobalInitScriptsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGlobalInitScriptsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListGlobalInitScriptsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "scripts": reflect.TypeOf(GlobalInitScriptDetails_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, ListGlobalInitScriptsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListGlobalInitScriptsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scripts": o.Scripts, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListGlobalInitScriptsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scripts": basetypes.ListType{ + ElemType: GlobalInitScriptDetails{}.Type(ctx), + }, + }, + } +} + +// GetScripts returns the value of the Scripts field in ListGlobalInitScriptsResponse_SdkV2 as +// a slice of GlobalInitScriptDetails_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListGlobalInitScriptsResponse_SdkV2) GetScripts(ctx context.Context) ([]GlobalInitScriptDetails_SdkV2, bool) { + if o.Scripts.IsNull() || o.Scripts.IsUnknown() { + return nil, false + } + var v []GlobalInitScriptDetails_SdkV2 + d := o.Scripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScripts sets the value of the Scripts field in ListGlobalInitScriptsResponse_SdkV2. +func (o *ListGlobalInitScriptsResponse_SdkV2) SetScripts(ctx context.Context, v []GlobalInitScriptDetails_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["scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scripts = types.ListValueMust(t, vs) +} + +type ListInstancePools_SdkV2 struct { + InstancePools types.List `tfsdk:"instance_pools" tf:"optional"` +} + +func (newState *ListInstancePools_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstancePools_SdkV2) { +} + +func (newState *ListInstancePools_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstancePools_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstancePools. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListInstancePools_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "instance_pools": reflect.TypeOf(InstancePoolAndStats_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, ListInstancePools_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstancePools_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_pools": o.InstancePools, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstancePools_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_pools": basetypes.ListType{ + ElemType: InstancePoolAndStats{}.Type(ctx), + }, + }, + } +} + +// GetInstancePools returns the value of the InstancePools field in ListInstancePools_SdkV2 as +// a slice of InstancePoolAndStats_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListInstancePools_SdkV2) GetInstancePools(ctx context.Context) ([]InstancePoolAndStats_SdkV2, bool) { + if o.InstancePools.IsNull() || o.InstancePools.IsUnknown() { + return nil, false + } + var v []InstancePoolAndStats_SdkV2 + d := o.InstancePools.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInstancePools sets the value of the InstancePools field in ListInstancePools_SdkV2. +func (o *ListInstancePools_SdkV2) SetInstancePools(ctx context.Context, v []InstancePoolAndStats_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["instance_pools"] + t = t.(attr.TypeWithElementType).ElementType() + o.InstancePools = types.ListValueMust(t, vs) +} + +type ListInstanceProfilesResponse_SdkV2 struct { + // A list of instance profiles that the user can access. + InstanceProfiles types.List `tfsdk:"instance_profiles" tf:"optional"` +} + +func (newState *ListInstanceProfilesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstanceProfilesResponse_SdkV2) { +} + +func (newState *ListInstanceProfilesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstanceProfilesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstanceProfilesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListInstanceProfilesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "instance_profiles": reflect.TypeOf(InstanceProfile_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, ListInstanceProfilesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstanceProfilesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_profiles": o.InstanceProfiles, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstanceProfilesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_profiles": basetypes.ListType{ + ElemType: InstanceProfile{}.Type(ctx), + }, + }, + } +} + +// GetInstanceProfiles returns the value of the InstanceProfiles field in ListInstanceProfilesResponse_SdkV2 as +// a slice of InstanceProfile_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListInstanceProfilesResponse_SdkV2) GetInstanceProfiles(ctx context.Context) ([]InstanceProfile_SdkV2, bool) { + if o.InstanceProfiles.IsNull() || o.InstanceProfiles.IsUnknown() { + return nil, false + } + var v []InstanceProfile_SdkV2 + d := o.InstanceProfiles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInstanceProfiles sets the value of the InstanceProfiles field in ListInstanceProfilesResponse_SdkV2. +func (o *ListInstanceProfilesResponse_SdkV2) SetInstanceProfiles(ctx context.Context, v []InstanceProfile_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["instance_profiles"] + t = t.(attr.TypeWithElementType).ElementType() + o.InstanceProfiles = types.ListValueMust(t, vs) +} + +type ListNodeTypesResponse_SdkV2 struct { + // The list of available Spark node types. + NodeTypes types.List `tfsdk:"node_types" tf:"optional"` +} + +func (newState *ListNodeTypesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNodeTypesResponse_SdkV2) { +} + +func (newState *ListNodeTypesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNodeTypesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNodeTypesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNodeTypesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "node_types": reflect.TypeOf(NodeType_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, ListNodeTypesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNodeTypesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "node_types": o.NodeTypes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNodeTypesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "node_types": basetypes.ListType{ + ElemType: NodeType{}.Type(ctx), + }, + }, + } +} + +// GetNodeTypes returns the value of the NodeTypes field in ListNodeTypesResponse_SdkV2 as +// a slice of NodeType_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListNodeTypesResponse_SdkV2) GetNodeTypes(ctx context.Context) ([]NodeType_SdkV2, bool) { + if o.NodeTypes.IsNull() || o.NodeTypes.IsUnknown() { + return nil, false + } + var v []NodeType_SdkV2 + d := o.NodeTypes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNodeTypes sets the value of the NodeTypes field in ListNodeTypesResponse_SdkV2. +func (o *ListNodeTypesResponse_SdkV2) SetNodeTypes(ctx context.Context, v []NodeType_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["node_types"] + t = t.(attr.TypeWithElementType).ElementType() + o.NodeTypes = types.ListValueMust(t, vs) +} + +type ListPoliciesResponse_SdkV2 struct { + // List of policies. + Policies types.List `tfsdk:"policies" tf:"optional"` +} + +func (newState *ListPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPoliciesResponse_SdkV2) { +} + +func (newState *ListPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPoliciesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPoliciesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPoliciesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policies": reflect.TypeOf(Policy_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, ListPoliciesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPoliciesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policies": o.Policies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPoliciesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policies": basetypes.ListType{ + ElemType: Policy{}.Type(ctx), + }, + }, + } +} + +// GetPolicies returns the value of the Policies field in ListPoliciesResponse_SdkV2 as +// a slice of Policy_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPoliciesResponse_SdkV2) GetPolicies(ctx context.Context) ([]Policy_SdkV2, bool) { + if o.Policies.IsNull() || o.Policies.IsUnknown() { + return nil, false + } + var v []Policy_SdkV2 + d := o.Policies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPolicies sets the value of the Policies field in ListPoliciesResponse_SdkV2. +func (o *ListPoliciesResponse_SdkV2) SetPolicies(ctx context.Context, v []Policy_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["policies"] + t = t.(attr.TypeWithElementType).ElementType() + o.Policies = types.ListValueMust(t, vs) +} + +// List policy families +type ListPolicyFamiliesRequest_SdkV2 struct { + // Maximum number of policy families to return. + MaxResults types.Int64 `tfsdk:"-"` + // A token that can be used to get the next page of results. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListPolicyFamiliesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesRequest_SdkV2) { +} + +func (newState *ListPolicyFamiliesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPolicyFamiliesRequest_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, ListPolicyFamiliesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPolicyFamiliesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPolicyFamiliesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListPolicyFamiliesResponse_SdkV2 struct { + // A token that can be used to get the next page of results. If not present, + // there are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // List of policy families. + PolicyFamilies types.List `tfsdk:"policy_families" tf:"optional"` +} + +func (newState *ListPolicyFamiliesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPolicyFamiliesResponse_SdkV2) { +} + +func (newState *ListPolicyFamiliesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPolicyFamiliesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPolicyFamiliesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPolicyFamiliesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policy_families": reflect.TypeOf(PolicyFamily_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, ListPolicyFamiliesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPolicyFamiliesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "policy_families": o.PolicyFamilies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPolicyFamiliesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "policy_families": basetypes.ListType{ + ElemType: PolicyFamily{}.Type(ctx), + }, + }, + } +} + +// GetPolicyFamilies returns the value of the PolicyFamilies field in ListPolicyFamiliesResponse_SdkV2 as +// a slice of PolicyFamily_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPolicyFamiliesResponse_SdkV2) GetPolicyFamilies(ctx context.Context) ([]PolicyFamily_SdkV2, bool) { + if o.PolicyFamilies.IsNull() || o.PolicyFamilies.IsUnknown() { + return nil, false + } + var v []PolicyFamily_SdkV2 + d := o.PolicyFamilies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPolicyFamilies sets the value of the PolicyFamilies field in ListPolicyFamiliesResponse_SdkV2. +func (o *ListPolicyFamiliesResponse_SdkV2) SetPolicyFamilies(ctx context.Context, v []PolicyFamily_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["policy_families"] + t = t.(attr.TypeWithElementType).ElementType() + o.PolicyFamilies = types.ListValueMust(t, vs) +} + +type LocalFileInfo_SdkV2 struct { + // local file destination, e.g. `file:/my/local/file.sh` + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *LocalFileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LocalFileInfo_SdkV2) { +} + +func (newState *LocalFileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState LocalFileInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LocalFileInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LocalFileInfo_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, LocalFileInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LocalFileInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LocalFileInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} + +type LogAnalyticsInfo_SdkV2 struct { + // + LogAnalyticsPrimaryKey types.String `tfsdk:"log_analytics_primary_key" tf:"optional"` + // + LogAnalyticsWorkspaceId types.String `tfsdk:"log_analytics_workspace_id" tf:"optional"` +} + +func (newState *LogAnalyticsInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogAnalyticsInfo_SdkV2) { +} + +func (newState *LogAnalyticsInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogAnalyticsInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogAnalyticsInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogAnalyticsInfo_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, LogAnalyticsInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogAnalyticsInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_analytics_primary_key": o.LogAnalyticsPrimaryKey, + "log_analytics_workspace_id": o.LogAnalyticsWorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogAnalyticsInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_analytics_primary_key": types.StringType, + "log_analytics_workspace_id": types.StringType, + }, + } +} + +type LogSyncStatus_SdkV2 struct { + // The timestamp of last attempt. If the last attempt fails, + // `last_exception` will contain the exception in the last attempt. + LastAttempted types.Int64 `tfsdk:"last_attempted" tf:"optional"` + // The exception thrown in the last attempt, it would be null (omitted in + // the response) if there is no exception in last attempted. + LastException types.String `tfsdk:"last_exception" tf:"optional"` +} + +func (newState *LogSyncStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogSyncStatus_SdkV2) { +} + +func (newState *LogSyncStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogSyncStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogSyncStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogSyncStatus_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, LogSyncStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogSyncStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "last_attempted": o.LastAttempted, + "last_exception": o.LastException, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogSyncStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "last_attempted": types.Int64Type, + "last_exception": types.StringType, + }, + } +} + +type MavenLibrary_SdkV2 struct { + // Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2". + Coordinates types.String `tfsdk:"coordinates" tf:""` + // List of dependences to exclude. For example: `["slf4j:slf4j", + // "*:hadoop-client"]`. + // + // Maven dependency exclusions: + // https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html. + Exclusions types.List `tfsdk:"exclusions" tf:"optional"` + // Maven repo to install the Maven package from. If omitted, both Maven + // Central Repository and Spark Packages are searched. + Repo types.String `tfsdk:"repo" tf:"optional"` +} + +func (newState *MavenLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MavenLibrary_SdkV2) { +} + +func (newState *MavenLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState MavenLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MavenLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MavenLibrary_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exclusions": 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, MavenLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MavenLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "coordinates": o.Coordinates, + "exclusions": o.Exclusions, + "repo": o.Repo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MavenLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "coordinates": types.StringType, + "exclusions": basetypes.ListType{ + ElemType: types.StringType, + }, + "repo": types.StringType, + }, + } +} + +// GetExclusions returns the value of the Exclusions field in MavenLibrary_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *MavenLibrary_SdkV2) GetExclusions(ctx context.Context) ([]types.String, bool) { + if o.Exclusions.IsNull() || o.Exclusions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Exclusions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExclusions sets the value of the Exclusions field in MavenLibrary_SdkV2. +func (o *MavenLibrary_SdkV2) SetExclusions(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["exclusions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Exclusions = types.ListValueMust(t, vs) +} + +type NodeInstanceType_SdkV2 struct { + InstanceTypeId types.String `tfsdk:"instance_type_id" tf:"optional"` + + LocalDiskSizeGb types.Int64 `tfsdk:"local_disk_size_gb" tf:"optional"` + + LocalDisks types.Int64 `tfsdk:"local_disks" tf:"optional"` + + LocalNvmeDiskSizeGb types.Int64 `tfsdk:"local_nvme_disk_size_gb" tf:"optional"` + + LocalNvmeDisks types.Int64 `tfsdk:"local_nvme_disks" tf:"optional"` +} + +func (newState *NodeInstanceType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeInstanceType_SdkV2) { +} + +func (newState *NodeInstanceType_SdkV2) SyncEffectiveFieldsDuringRead(existingState NodeInstanceType_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeInstanceType. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NodeInstanceType_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, NodeInstanceType_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NodeInstanceType_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_type_id": o.InstanceTypeId, + "local_disk_size_gb": o.LocalDiskSizeGb, + "local_disks": o.LocalDisks, + "local_nvme_disk_size_gb": o.LocalNvmeDiskSizeGb, + "local_nvme_disks": o.LocalNvmeDisks, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NodeInstanceType_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_type_id": types.StringType, + "local_disk_size_gb": types.Int64Type, + "local_disks": types.Int64Type, + "local_nvme_disk_size_gb": types.Int64Type, + "local_nvme_disks": types.Int64Type, + }, + } +} + +type NodeType_SdkV2 struct { + Category types.String `tfsdk:"category" tf:"optional"` + // A string description associated with this node type, e.g., "r3.xlarge". + Description types.String `tfsdk:"description" tf:""` + + DisplayOrder types.Int64 `tfsdk:"display_order" tf:"optional"` + // An identifier for the type of hardware that this node runs on, e.g., + // "r3.2xlarge" in AWS. + InstanceTypeId types.String `tfsdk:"instance_type_id" tf:""` + // Whether the node type is deprecated. Non-deprecated node types offer + // greater performance. + IsDeprecated types.Bool `tfsdk:"is_deprecated" tf:"optional"` + // AWS specific, whether this instance supports encryption in transit, used + // for hipaa and pci workloads. + IsEncryptedInTransit types.Bool `tfsdk:"is_encrypted_in_transit" tf:"optional"` + + IsGraviton types.Bool `tfsdk:"is_graviton" tf:"optional"` + + IsHidden types.Bool `tfsdk:"is_hidden" tf:"optional"` + + IsIoCacheEnabled types.Bool `tfsdk:"is_io_cache_enabled" tf:"optional"` + // Memory (in MB) available for this node type. + MemoryMb types.Int64 `tfsdk:"memory_mb" tf:""` + + NodeInfo types.List `tfsdk:"node_info" tf:"optional,object"` + + NodeInstanceType types.List `tfsdk:"node_instance_type" tf:"optional,object"` + // Unique identifier for this node type. + NodeTypeId types.String `tfsdk:"node_type_id" tf:""` + // Number of CPU cores available for this node type. Note that this can be + // fractional, e.g., 2.5 cores, if the the number of cores on a machine + // instance is not divisible by the number of Spark nodes on that machine. + NumCores types.Float64 `tfsdk:"num_cores" tf:""` + + NumGpus types.Int64 `tfsdk:"num_gpus" tf:"optional"` + + PhotonDriverCapable types.Bool `tfsdk:"photon_driver_capable" tf:"optional"` + + PhotonWorkerCapable types.Bool `tfsdk:"photon_worker_capable" tf:"optional"` + + SupportClusterTags types.Bool `tfsdk:"support_cluster_tags" tf:"optional"` + + SupportEbsVolumes types.Bool `tfsdk:"support_ebs_volumes" tf:"optional"` + + SupportPortForwarding types.Bool `tfsdk:"support_port_forwarding" tf:"optional"` + // Indicates if this node type can be used for an instance pool or cluster + // with elastic disk enabled. This is true for most node types. + SupportsElasticDisk types.Bool `tfsdk:"supports_elastic_disk" tf:"optional"` +} + +func (newState *NodeType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NodeType_SdkV2) { +} + +func (newState *NodeType_SdkV2) SyncEffectiveFieldsDuringRead(existingState NodeType_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NodeType. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NodeType_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "node_info": reflect.TypeOf(CloudProviderNodeInfo_SdkV2{}), + "node_instance_type": reflect.TypeOf(NodeInstanceType_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, NodeType_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NodeType_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "category": o.Category, + "description": o.Description, + "display_order": o.DisplayOrder, + "instance_type_id": o.InstanceTypeId, + "is_deprecated": o.IsDeprecated, + "is_encrypted_in_transit": o.IsEncryptedInTransit, + "is_graviton": o.IsGraviton, + "is_hidden": o.IsHidden, + "is_io_cache_enabled": o.IsIoCacheEnabled, + "memory_mb": o.MemoryMb, + "node_info": o.NodeInfo, + "node_instance_type": o.NodeInstanceType, + "node_type_id": o.NodeTypeId, + "num_cores": o.NumCores, + "num_gpus": o.NumGpus, + "photon_driver_capable": o.PhotonDriverCapable, + "photon_worker_capable": o.PhotonWorkerCapable, + "support_cluster_tags": o.SupportClusterTags, + "support_ebs_volumes": o.SupportEbsVolumes, + "support_port_forwarding": o.SupportPortForwarding, + "supports_elastic_disk": o.SupportsElasticDisk, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NodeType_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "category": types.StringType, + "description": types.StringType, + "display_order": types.Int64Type, + "instance_type_id": types.StringType, + "is_deprecated": types.BoolType, + "is_encrypted_in_transit": types.BoolType, + "is_graviton": types.BoolType, + "is_hidden": types.BoolType, + "is_io_cache_enabled": types.BoolType, + "memory_mb": types.Int64Type, + "node_info": basetypes.ListType{ + ElemType: CloudProviderNodeInfo{}.Type(ctx), + }, + "node_instance_type": basetypes.ListType{ + ElemType: NodeInstanceType{}.Type(ctx), + }, + "node_type_id": types.StringType, + "num_cores": types.Float64Type, + "num_gpus": types.Int64Type, + "photon_driver_capable": types.BoolType, + "photon_worker_capable": types.BoolType, + "support_cluster_tags": types.BoolType, + "support_ebs_volumes": types.BoolType, + "support_port_forwarding": types.BoolType, + "supports_elastic_disk": types.BoolType, + }, + } +} + +// GetNodeInfo returns the value of the NodeInfo field in NodeType_SdkV2 as +// a CloudProviderNodeInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NodeType_SdkV2) GetNodeInfo(ctx context.Context) (CloudProviderNodeInfo_SdkV2, bool) { + var e CloudProviderNodeInfo_SdkV2 + if o.NodeInfo.IsNull() || o.NodeInfo.IsUnknown() { + return e, false + } + var v []CloudProviderNodeInfo_SdkV2 + d := o.NodeInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNodeInfo sets the value of the NodeInfo field in NodeType_SdkV2. +func (o *NodeType_SdkV2) SetNodeInfo(ctx context.Context, v CloudProviderNodeInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_info"] + o.NodeInfo = types.ListValueMust(t, vs) +} + +// GetNodeInstanceType returns the value of the NodeInstanceType field in NodeType_SdkV2 as +// a NodeInstanceType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NodeType_SdkV2) GetNodeInstanceType(ctx context.Context) (NodeInstanceType_SdkV2, bool) { + var e NodeInstanceType_SdkV2 + if o.NodeInstanceType.IsNull() || o.NodeInstanceType.IsUnknown() { + return e, false + } + var v []NodeInstanceType_SdkV2 + d := o.NodeInstanceType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNodeInstanceType sets the value of the NodeInstanceType field in NodeType_SdkV2. +func (o *NodeType_SdkV2) SetNodeInstanceType(ctx context.Context, v NodeInstanceType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_instance_type"] + o.NodeInstanceType = types.ListValueMust(t, vs) +} + +type PendingInstanceError_SdkV2 struct { + InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + + Message types.String `tfsdk:"message" tf:"optional"` +} + +func (newState *PendingInstanceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PendingInstanceError_SdkV2) { +} + +func (newState *PendingInstanceError_SdkV2) SyncEffectiveFieldsDuringRead(existingState PendingInstanceError_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PendingInstanceError. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PendingInstanceError_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, PendingInstanceError_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PendingInstanceError_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_id": o.InstanceId, + "message": o.Message, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PendingInstanceError_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_id": types.StringType, + "message": types.StringType, + }, + } +} + +type PermanentDeleteCluster_SdkV2 struct { + // The cluster to be deleted. + ClusterId types.String `tfsdk:"cluster_id" tf:""` +} + +func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermanentDeleteCluster_SdkV2) { +} + +func (newState *PermanentDeleteCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermanentDeleteCluster_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, PermanentDeleteCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermanentDeleteCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermanentDeleteCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type PermanentDeleteClusterResponse_SdkV2 struct { +} + +func (newState *PermanentDeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermanentDeleteClusterResponse_SdkV2) { +} + +func (newState *PermanentDeleteClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermanentDeleteClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermanentDeleteClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermanentDeleteClusterResponse_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, PermanentDeleteClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermanentDeleteClusterResponse_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 PermanentDeleteClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type PinCluster_SdkV2 struct { + // + ClusterId types.String `tfsdk:"cluster_id" tf:""` +} + +func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PinCluster_SdkV2) { +} + +func (newState *PinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PinCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PinCluster_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, PinCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PinCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PinCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type PinClusterResponse_SdkV2 struct { +} + +func (newState *PinClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PinClusterResponse_SdkV2) { +} + +func (newState *PinClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PinClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PinClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PinClusterResponse_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, PinClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PinClusterResponse_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 PinClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Describes a Cluster Policy entity. +type Policy_SdkV2 struct { + // Creation time. The timestamp (in millisecond) when this Cluster Policy + // was created. + CreatedAtTimestamp types.Int64 `tfsdk:"created_at_timestamp" tf:"optional"` + // Creator user name. The field won't be included in the response if the + // user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // Policy definition document expressed in [Databricks Cluster Policy + // Definition Language]. + // + // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + Definition types.String `tfsdk:"definition" tf:"optional"` + // Additional human-readable description of the cluster policy. + Description types.String `tfsdk:"description" tf:"optional"` + // If true, policy is a default policy created and managed by Databricks. + // Default policies cannot be deleted, and their policy families cannot be + // changed. + IsDefault types.Bool `tfsdk:"is_default" tf:"optional"` + // A list of libraries to be installed on the next cluster restart that uses + // this policy. The maximum number of libraries is 500. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Max number of clusters per user that can be active using this policy. If + // not present, there is no max limit. + MaxClustersPerUser types.Int64 `tfsdk:"max_clusters_per_user" tf:"optional"` + // Cluster Policy name requested by the user. This has to be unique. Length + // must be between 1 and 100 characters. + Name types.String `tfsdk:"name" tf:"optional"` + // Policy definition JSON document expressed in [Databricks Policy + // Definition Language]. The JSON document must be passed as a string and + // cannot be embedded in the requests. + // + // You can use this to customize the policy definition inherited from the + // policy family. Policy rules specified here are merged into the inherited + // policy definition. + // + // [Databricks Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + PolicyFamilyDefinitionOverrides types.String `tfsdk:"policy_family_definition_overrides" tf:"optional"` + // ID of the policy family. The cluster policy's policy definition inherits + // the policy family's policy definition. + // + // Cannot be used with `definition`. Use + // `policy_family_definition_overrides` instead to customize the policy + // definition. + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` + // Canonical unique identifier for the Cluster Policy. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` +} + +func (newState *Policy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Policy_SdkV2) { +} + +func (newState *Policy_SdkV2) SyncEffectiveFieldsDuringRead(existingState Policy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Policy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Policy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "libraries": reflect.TypeOf(Library_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, Policy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Policy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at_timestamp": o.CreatedAtTimestamp, + "creator_user_name": o.CreatorUserName, + "definition": o.Definition, + "description": o.Description, + "is_default": o.IsDefault, + "libraries": o.Libraries, + "max_clusters_per_user": o.MaxClustersPerUser, + "name": o.Name, + "policy_family_definition_overrides": o.PolicyFamilyDefinitionOverrides, + "policy_family_id": o.PolicyFamilyId, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Policy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at_timestamp": types.Int64Type, + "creator_user_name": types.StringType, + "definition": types.StringType, + "description": types.StringType, + "is_default": types.BoolType, + "libraries": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + "max_clusters_per_user": types.Int64Type, + "name": types.StringType, + "policy_family_definition_overrides": types.StringType, + "policy_family_id": types.StringType, + "policy_id": types.StringType, + }, + } +} + +// GetLibraries returns the value of the Libraries field in Policy_SdkV2 as +// a slice of Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Policy_SdkV2) GetLibraries(ctx context.Context) ([]Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in Policy_SdkV2. +func (o *Policy_SdkV2) SetLibraries(ctx context.Context, v []Library_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +type PolicyFamily_SdkV2 struct { + // Policy definition document expressed in [Databricks Cluster Policy + // Definition Language]. + // + // [Databricks Cluster Policy Definition Language]: https://docs.databricks.com/administration-guide/clusters/policy-definition.html + Definition types.String `tfsdk:"definition" tf:"optional"` + // Human-readable description of the purpose of the policy family. + Description types.String `tfsdk:"description" tf:"optional"` + // Name of the policy family. + Name types.String `tfsdk:"name" tf:"optional"` + // Unique identifier for the policy family. + PolicyFamilyId types.String `tfsdk:"policy_family_id" tf:"optional"` +} + +func (newState *PolicyFamily_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PolicyFamily_SdkV2) { +} + +func (newState *PolicyFamily_SdkV2) SyncEffectiveFieldsDuringRead(existingState PolicyFamily_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PolicyFamily. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PolicyFamily_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, PolicyFamily_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PolicyFamily_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "definition": o.Definition, + "description": o.Description, + "name": o.Name, + "policy_family_id": o.PolicyFamilyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PolicyFamily_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "definition": types.StringType, + "description": types.StringType, + "name": types.StringType, + "policy_family_id": types.StringType, + }, + } +} + +type PythonPyPiLibrary_SdkV2 struct { + // The name of the pypi package to install. An optional exact version + // specification is also supported. Examples: "simplejson" and + // "simplejson==3.8.0". + Package types.String `tfsdk:"package" tf:""` + // The repository where the package can be found. If not specified, the + // default pip index is used. + Repo types.String `tfsdk:"repo" tf:"optional"` +} + +func (newState *PythonPyPiLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonPyPiLibrary_SdkV2) { +} + +func (newState *PythonPyPiLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState PythonPyPiLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonPyPiLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PythonPyPiLibrary_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, PythonPyPiLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PythonPyPiLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "package": o.Package, + "repo": o.Repo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PythonPyPiLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "package": types.StringType, + "repo": types.StringType, + }, + } +} + +type RCranLibrary_SdkV2 struct { + // The name of the CRAN package to install. + Package types.String `tfsdk:"package" tf:""` + // The repository where the package can be found. If not specified, the + // default CRAN repo is used. + Repo types.String `tfsdk:"repo" tf:"optional"` +} + +func (newState *RCranLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RCranLibrary_SdkV2) { +} + +func (newState *RCranLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState RCranLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RCranLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RCranLibrary_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, RCranLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RCranLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "package": o.Package, + "repo": o.Repo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RCranLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "package": types.StringType, + "repo": types.StringType, + }, + } +} + +type RemoveInstanceProfile_SdkV2 struct { + // The ARN of the instance profile to remove. This field is required. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:""` +} + +func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveInstanceProfile_SdkV2) { +} + +func (newState *RemoveInstanceProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveInstanceProfile_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RemoveInstanceProfile_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, RemoveInstanceProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RemoveInstanceProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance_profile_arn": o.InstanceProfileArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RemoveInstanceProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance_profile_arn": types.StringType, + }, + } +} + +type RemoveResponse_SdkV2 struct { +} + +func (newState *RemoveResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveResponse_SdkV2) { +} + +func (newState *RemoveResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RemoveResponse_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, RemoveResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RemoveResponse_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 RemoveResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ResizeCluster_SdkV2 struct { + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // The cluster to be resized. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` +} + +func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeCluster_SdkV2) { +} + +func (newState *ResizeCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResizeCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResizeCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_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, ResizeCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResizeCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autoscale": o.Autoscale, + "cluster_id": o.ClusterId, + "num_workers": o.NumWorkers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResizeCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "cluster_id": types.StringType, + "num_workers": types.Int64Type, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in ResizeCluster_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResizeCluster_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in ResizeCluster_SdkV2. +func (o *ResizeCluster_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +type ResizeClusterResponse_SdkV2 struct { +} + +func (newState *ResizeClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResizeClusterResponse_SdkV2) { +} + +func (newState *ResizeClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResizeClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResizeClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResizeClusterResponse_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, ResizeClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResizeClusterResponse_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 ResizeClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RestartCluster_SdkV2 struct { + // The cluster to be started. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // + RestartUser types.String `tfsdk:"restart_user" tf:"optional"` +} + +func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartCluster_SdkV2) { +} + +func (newState *RestartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestartCluster_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, RestartCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestartCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "restart_user": o.RestartUser, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestartCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "restart_user": types.StringType, + }, + } +} + +type RestartClusterResponse_SdkV2 struct { +} + +func (newState *RestartClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartClusterResponse_SdkV2) { +} + +func (newState *RestartClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestartClusterResponse_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, RestartClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestartClusterResponse_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 RestartClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Results_SdkV2 struct { + // The cause of the error + Cause types.String `tfsdk:"cause" tf:"optional"` + + Data types.Object `tfsdk:"data" tf:"optional"` + // The image filename + FileName types.String `tfsdk:"fileName" tf:"optional"` + + FileNames types.List `tfsdk:"fileNames" tf:"optional"` + // true if a JSON schema is returned instead of a string representation of + // the Hive type. + IsJsonSchema types.Bool `tfsdk:"isJsonSchema" tf:"optional"` + // internal field used by SDK + Pos types.Int64 `tfsdk:"pos" tf:"optional"` + + ResultType types.String `tfsdk:"resultType" tf:"optional"` + // The table schema + Schema types.List `tfsdk:"schema" tf:"optional"` + // The summary of the error + Summary types.String `tfsdk:"summary" tf:"optional"` + // true if partial results are returned. + Truncated types.Bool `tfsdk:"truncated" tf:"optional"` +} + +func (newState *Results_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Results_SdkV2) { +} + +func (newState *Results_SdkV2) SyncEffectiveFieldsDuringRead(existingState Results_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Results. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Results_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "fileNames": reflect.TypeOf(types.String{}), + "schema": reflect.TypeOf(types.Object{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, Results_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Results_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cause": o.Cause, + "data": o.Data, + "fileName": o.FileName, + "fileNames": o.FileNames, + "isJsonSchema": o.IsJsonSchema, + "pos": o.Pos, + "resultType": o.ResultType, + "schema": o.Schema, + "summary": o.Summary, + "truncated": o.Truncated, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Results_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cause": types.StringType, + "data": types.ObjectType{}, + "fileName": types.StringType, + "fileNames": basetypes.ListType{ + ElemType: types.StringType, + }, + "isJsonSchema": types.BoolType, + "pos": types.Int64Type, + "resultType": types.StringType, + "schema": basetypes.ListType{ + ElemType: basetypes.MapType{ + ElemType: types.ObjectType{}, + }, + }, + "summary": types.StringType, + "truncated": types.BoolType, + }, + } +} + +// GetFileNames returns the value of the FileNames field in Results_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Results_SdkV2) GetFileNames(ctx context.Context) ([]types.String, bool) { + if o.FileNames.IsNull() || o.FileNames.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FileNames.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFileNames sets the value of the FileNames field in Results_SdkV2. +func (o *Results_SdkV2) SetFileNames(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["fileNames"] + t = t.(attr.TypeWithElementType).ElementType() + o.FileNames = types.ListValueMust(t, vs) +} + +// GetSchema returns the value of the Schema field in Results_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *Results_SdkV2) GetSchema(ctx context.Context) ([]types.Object, bool) { + if o.Schema.IsNull() || o.Schema.IsUnknown() { + return nil, false + } + var v []types.Object + d := o.Schema.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchema sets the value of the Schema field in Results_SdkV2. +func (o *Results_SdkV2) SetSchema(ctx context.Context, v []types.Object) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schema"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schema = types.ListValueMust(t, vs) +} + +type S3StorageInfo_SdkV2 struct { + // (Optional) Set canned access control list for the logs, e.g. + // `bucket-owner-full-control`. If `canned_cal` is set, please make sure the + // cluster iam role has `s3:PutObjectAcl` permission on the destination + // bucket and prefix. The full list of possible canned acl can be found at + // http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. + // Please also note that by default only the object owner gets full + // controls. If you are using cross account role for writing data, you may + // want to set `bucket-owner-full-control` to make bucket owner able to read + // the logs. + CannedAcl types.String `tfsdk:"canned_acl" tf:"optional"` + // S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be + // delivered using cluster iam role, please make sure you set cluster iam + // role and the role has write access to the destination. Please also note + // that you cannot use AWS keys to deliver logs. + Destination types.String `tfsdk:"destination" tf:""` + // (Optional) Flag to enable server side encryption, `false` by default. + EnableEncryption types.Bool `tfsdk:"enable_encryption" tf:"optional"` + // (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It + // will be used only when encryption is enabled and the default type is + // `sse-s3`. + EncryptionType types.String `tfsdk:"encryption_type" tf:"optional"` + // S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or + // endpoint needs to be set. If both are set, endpoint will be used. + Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + // (Optional) Kms key which will be used if encryption is enabled and + // encryption type is set to `sse-kms`. + KmsKey types.String `tfsdk:"kms_key" tf:"optional"` + // S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. + // If both are set, endpoint will be used. + Region types.String `tfsdk:"region" tf:"optional"` +} + +func (newState *S3StorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan S3StorageInfo_SdkV2) { +} + +func (newState *S3StorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState S3StorageInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in S3StorageInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a S3StorageInfo_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, S3StorageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o S3StorageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "canned_acl": o.CannedAcl, + "destination": o.Destination, + "enable_encryption": o.EnableEncryption, + "encryption_type": o.EncryptionType, + "endpoint": o.Endpoint, + "kms_key": o.KmsKey, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o S3StorageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "canned_acl": types.StringType, + "destination": types.StringType, + "enable_encryption": types.BoolType, + "encryption_type": types.StringType, + "endpoint": types.StringType, + "kms_key": types.StringType, + "region": types.StringType, + }, + } +} + +type SparkNode_SdkV2 struct { + // The private IP address of the host instance. + HostPrivateIp types.String `tfsdk:"host_private_ip" tf:"optional"` + // Globally unique identifier for the host instance from the cloud provider. + InstanceId types.String `tfsdk:"instance_id" tf:"optional"` + // Attributes specific to AWS for a Spark node. + NodeAwsAttributes types.List `tfsdk:"node_aws_attributes" tf:"optional,object"` + // Globally unique identifier for this node. + NodeId types.String `tfsdk:"node_id" tf:"optional"` + // Private IP address (typically a 10.x.x.x address) of the Spark node. Note + // that this is different from the private IP address of the host instance. + PrivateIp types.String `tfsdk:"private_ip" tf:"optional"` + // Public DNS address of this node. This address can be used to access the + // Spark JDBC server on the driver node. To communicate with the JDBC + // server, traffic must be manually authorized by adding security group + // rules to the "worker-unmanaged" security group via the AWS console. + // + // Actually it's the public DNS address of the host instance. + PublicDns types.String `tfsdk:"public_dns" tf:"optional"` + // The timestamp (in millisecond) when the Spark node is launched. + // + // The start_timestamp is set right before the container is being launched. + // The timestamp when the container is placed on the ResourceManager, before + // its launch and setup by the NodeDaemon. This timestamp is the same as the + // creation timestamp in the database. + StartTimestamp types.Int64 `tfsdk:"start_timestamp" tf:"optional"` +} + +func (newState *SparkNode_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNode_SdkV2) { +} + +func (newState *SparkNode_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkNode_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNode. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkNode_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "node_aws_attributes": reflect.TypeOf(SparkNodeAwsAttributes_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, SparkNode_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkNode_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "host_private_ip": o.HostPrivateIp, + "instance_id": o.InstanceId, + "node_aws_attributes": o.NodeAwsAttributes, + "node_id": o.NodeId, + "private_ip": o.PrivateIp, + "public_dns": o.PublicDns, + "start_timestamp": o.StartTimestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkNode_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "host_private_ip": types.StringType, + "instance_id": types.StringType, + "node_aws_attributes": basetypes.ListType{ + ElemType: SparkNodeAwsAttributes{}.Type(ctx), + }, + "node_id": types.StringType, + "private_ip": types.StringType, + "public_dns": types.StringType, + "start_timestamp": types.Int64Type, + }, + } +} + +// GetNodeAwsAttributes returns the value of the NodeAwsAttributes field in SparkNode_SdkV2 as +// a SparkNodeAwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SparkNode_SdkV2) GetNodeAwsAttributes(ctx context.Context) (SparkNodeAwsAttributes_SdkV2, bool) { + var e SparkNodeAwsAttributes_SdkV2 + if o.NodeAwsAttributes.IsNull() || o.NodeAwsAttributes.IsUnknown() { + return e, false + } + var v []SparkNodeAwsAttributes_SdkV2 + d := o.NodeAwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNodeAwsAttributes sets the value of the NodeAwsAttributes field in SparkNode_SdkV2. +func (o *SparkNode_SdkV2) SetNodeAwsAttributes(ctx context.Context, v SparkNodeAwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_aws_attributes"] + o.NodeAwsAttributes = types.ListValueMust(t, vs) +} + +type SparkNodeAwsAttributes_SdkV2 struct { + // Whether this node is on an Amazon spot instance. + IsSpot types.Bool `tfsdk:"is_spot" tf:"optional"` +} + +func (newState *SparkNodeAwsAttributes_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkNodeAwsAttributes_SdkV2) { +} + +func (newState *SparkNodeAwsAttributes_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkNodeAwsAttributes_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkNodeAwsAttributes. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkNodeAwsAttributes_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, SparkNodeAwsAttributes_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkNodeAwsAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_spot": o.IsSpot, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkNodeAwsAttributes_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_spot": types.BoolType, + }, + } +} + +type SparkVersion_SdkV2 struct { + // Spark version key, for example "2.1.x-scala2.11". This is the value which + // should be provided as the "spark_version" when creating a new cluster. + // Note that the exact Spark version may change over time for a "wildcard" + // version (i.e., "2.1.x-scala2.11" is a "wildcard" version) with minor bug + // fixes. + Key types.String `tfsdk:"key" tf:"optional"` + // A descriptive name for this Spark version, for example "Spark 2.1". + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *SparkVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkVersion_SdkV2) { +} + +func (newState *SparkVersion_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkVersion_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkVersion. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkVersion_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, SparkVersion_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkVersion_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkVersion_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "name": types.StringType, + }, + } +} + +type StartCluster_SdkV2 struct { + // The cluster to be started. + ClusterId types.String `tfsdk:"cluster_id" tf:""` +} + +func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartCluster_SdkV2) { +} + +func (newState *StartCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StartCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartCluster_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, StartCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StartCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type StartClusterResponse_SdkV2 struct { +} + +func (newState *StartClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartClusterResponse_SdkV2) { +} + +func (newState *StartClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StartClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartClusterResponse_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, StartClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartClusterResponse_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 StartClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type TerminationReason_SdkV2 struct { + // status code indicating why the cluster was terminated + Code types.String `tfsdk:"code" tf:"optional"` + // list of parameters that provide additional information about why the + // cluster was terminated + Parameters types.Map `tfsdk:"parameters" tf:"optional"` + // type of the termination + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason_SdkV2) { +} + +func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationReason_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TerminationReason_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, TerminationReason_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TerminationReason_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "code": o.Code, + "parameters": o.Parameters, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TerminationReason_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "code": types.StringType, + "parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "type": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in TerminationReason_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 *TerminationReason_SdkV2) GetParameters(ctx context.Context) (map[string]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in TerminationReason_SdkV2. +func (o *TerminationReason_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.MapValueMust(t, vs) +} + +type UninstallLibraries_SdkV2 struct { + // Unique identifier for the cluster on which to uninstall these libraries. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // The libraries to uninstall. + Libraries types.List `tfsdk:"libraries" tf:""` +} + +func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UninstallLibraries_SdkV2) { +} + +func (newState *UninstallLibraries_SdkV2) SyncEffectiveFieldsDuringRead(existingState UninstallLibraries_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UninstallLibraries_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "libraries": reflect.TypeOf(Library_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, UninstallLibraries_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UninstallLibraries_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "libraries": o.Libraries, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UninstallLibraries_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "libraries": basetypes.ListType{ + ElemType: Library{}.Type(ctx), + }, + }, + } +} + +// GetLibraries returns the value of the Libraries field in UninstallLibraries_SdkV2 as +// a slice of Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UninstallLibraries_SdkV2) GetLibraries(ctx context.Context) ([]Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in UninstallLibraries_SdkV2. +func (o *UninstallLibraries_SdkV2) SetLibraries(ctx context.Context, v []Library_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +type UninstallLibrariesResponse_SdkV2 struct { +} + +func (newState *UninstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UninstallLibrariesResponse_SdkV2) { +} + +func (newState *UninstallLibrariesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UninstallLibrariesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UninstallLibrariesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UninstallLibrariesResponse_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, UninstallLibrariesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UninstallLibrariesResponse_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 UninstallLibrariesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UnpinCluster_SdkV2 struct { + // + ClusterId types.String `tfsdk:"cluster_id" tf:""` +} + +func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpinCluster_SdkV2) { +} + +func (newState *UnpinCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpinCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnpinCluster_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, UnpinCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnpinCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UnpinCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + }, + } +} + +type UnpinClusterResponse_SdkV2 struct { +} + +func (newState *UnpinClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpinClusterResponse_SdkV2) { +} + +func (newState *UnpinClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpinClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpinClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnpinClusterResponse_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, UnpinClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnpinClusterResponse_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 UnpinClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateCluster_SdkV2 struct { + // The cluster to be updated. + Cluster types.List `tfsdk:"cluster" tf:"optional,object"` + // ID of the cluster. + ClusterId types.String `tfsdk:"cluster_id" tf:""` + // Specifies which fields of the cluster will be updated. This is required + // in the POST request. The update mask should be supplied as a single + // string. To specify multiple fields, separate them with commas (no + // spaces). To delete a field from a cluster configuration, add it to the + // `update_mask` string but omit it from the `cluster` object. + UpdateMask types.String `tfsdk:"update_mask" tf:""` +} + +func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCluster_SdkV2) { +} + +func (newState *UpdateCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCluster_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster": reflect.TypeOf(UpdateClusterResource_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, UpdateCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster": o.Cluster, + "cluster_id": o.ClusterId, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster": basetypes.ListType{ + ElemType: UpdateClusterResource{}.Type(ctx), + }, + "cluster_id": types.StringType, + "update_mask": types.StringType, + }, + } +} + +// GetCluster returns the value of the Cluster field in UpdateCluster_SdkV2 as +// a UpdateClusterResource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCluster_SdkV2) GetCluster(ctx context.Context) (UpdateClusterResource_SdkV2, bool) { + var e UpdateClusterResource_SdkV2 + if o.Cluster.IsNull() || o.Cluster.IsUnknown() { + return e, false + } + var v []UpdateClusterResource_SdkV2 + d := o.Cluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCluster sets the value of the Cluster field in UpdateCluster_SdkV2. +func (o *UpdateCluster_SdkV2) SetCluster(ctx context.Context, v UpdateClusterResource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster"] + o.Cluster = types.ListValueMust(t, vs) +} + +type UpdateClusterResource_SdkV2 struct { + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Automatically terminates the cluster after it is inactive for this time + // in minutes. If not set, this cluster will not be automatically + // terminated. If specified, the threshold must be between 10 and 10000 + // minutes. Users can also set this value to 0 to explicitly disable + // automatic termination. + AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // The configuration for delivering spark logs to a long-term storage + // destination. Two kinds of destinations (dbfs and s3) are supported. Only + // one destination can be specified for one cluster. If the conf is given, + // the logs will be delivered to the destination every `5 mins`. The + // destination of driver logs is `$destination/$clusterId/driver`, while the + // destination of executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Cluster name requested by the user. This doesn't have to be unique. If + // not specified at creation, the cluster name will be an empty string. + ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // Data security mode decides what data governance model to use when + // accessing data from a cluster. + // + // * `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" tf:"optional"` + + DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Autoscaling Local Storage: when enabled, this cluster will dynamically + // acquire additional disk space when its Spark workers are running low on + // disk space. This feature requires specific AWS permissions to function + // correctly - refer to the User Guide for more details. + EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` + // Whether to enable LUKS on cluster VMs' local disks + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // Determines the cluster's runtime engine, either standard or Photon. + // + // This field is not compatible with legacy `spark_version` values that + // contain `-photon-`. Remove `-photon-` from the `spark_version` and set + // `runtime_engine` to `PHOTON`. + // + // If left unspecified, the runtime engine defaults to standard unless the + // spark_version contains -photon-, in which case Photon will be used. + RuntimeEngine types.String `tfsdk:"runtime_engine" tf:"optional"` + // Single user name if data_security_mode is `SINGLE_USER` + SingleUserName types.String `tfsdk:"single_user_name" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. Users can also pass in a string of extra + // JVM options to the driver and the executors via + // `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` + // respectively. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of + // available Spark versions can be retrieved by using the + // :method:clusters/sparkVersions API call. + SparkVersion types.String `tfsdk:"spark_version" tf:"optional"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + + WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` +} + +func (newState *UpdateClusterResource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateClusterResource_SdkV2) { +} + +func (newState *UpdateClusterResource_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResource_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResource. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateClusterResource_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(AutoScale_SdkV2{}), + "aws_attributes": reflect.TypeOf(AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "docker_image": reflect.TypeOf(DockerImage_SdkV2{}), + "gcp_attributes": reflect.TypeOf(GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": reflect.TypeOf(types.String{}), + "workload_type": reflect.TypeOf(WorkloadType_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, UpdateClusterResource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateClusterResource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autoscale": o.Autoscale, + "autotermination_minutes": o.AutoterminationMinutes, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_log_conf": o.ClusterLogConf, + "cluster_name": o.ClusterName, + "custom_tags": o.CustomTags, + "data_security_mode": o.DataSecurityMode, + "docker_image": o.DockerImage, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_elastic_disk": o.EnableElasticDisk, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "runtime_engine": o.RuntimeEngine, + "single_user_name": o.SingleUserName, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "spark_version": o.SparkVersion, + "ssh_public_keys": o.SshPublicKeys, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autoscale": basetypes.ListType{ + ElemType: AutoScale{}.Type(ctx), + }, + "autotermination_minutes": types.Int64Type, + "aws_attributes": basetypes.ListType{ + ElemType: AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: AzureAttributes{}.Type(ctx), + }, + "cluster_log_conf": basetypes.ListType{ + ElemType: ClusterLogConf{}.Type(ctx), + }, + "cluster_name": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "data_security_mode": types.StringType, + "docker_image": basetypes.ListType{ + ElemType: DockerImage{}.Type(ctx), + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_elastic_disk": types.BoolType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "runtime_engine": types.StringType, + "single_user_name": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_version": types.StringType, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "workload_type": basetypes.ListType{ + ElemType: WorkloadType{}.Type(ctx), + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in UpdateClusterResource_SdkV2 as +// a AutoScale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetAutoscale(ctx context.Context) (AutoScale_SdkV2, bool) { + var e AutoScale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []AutoScale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetAutoscale(ctx context.Context, v AutoScale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in UpdateClusterResource_SdkV2 as +// a AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetAwsAttributes(ctx context.Context) (AwsAttributes_SdkV2, bool) { + var e AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetAwsAttributes(ctx context.Context, v AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in UpdateClusterResource_SdkV2 as +// a AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetAzureAttributes(ctx context.Context) (AzureAttributes_SdkV2, bool) { + var e AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetAzureAttributes(ctx context.Context, v AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in UpdateClusterResource_SdkV2 as +// a ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetClusterLogConf(ctx context.Context) (ClusterLogConf_SdkV2, bool) { + var e ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetClusterLogConf(ctx context.Context, v ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in UpdateClusterResource_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 *UpdateClusterResource_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetDockerImage returns the value of the DockerImage field in UpdateClusterResource_SdkV2 as +// a DockerImage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetDockerImage(ctx context.Context) (DockerImage_SdkV2, bool) { + var e DockerImage_SdkV2 + if o.DockerImage.IsNull() || o.DockerImage.IsUnknown() { + return e, false + } + var v []DockerImage_SdkV2 + d := o.DockerImage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDockerImage sets the value of the DockerImage field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetDockerImage(ctx context.Context, v DockerImage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] + o.DockerImage = types.ListValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in UpdateClusterResource_SdkV2 as +// a GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetGcpAttributes(ctx context.Context) (GcpAttributes_SdkV2, bool) { + var e GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetGcpAttributes(ctx context.Context, v GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in UpdateClusterResource_SdkV2 as +// a slice of InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetInitScripts(ctx context.Context) ([]InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetInitScripts(ctx context.Context, v []InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in UpdateClusterResource_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 *UpdateClusterResource_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in UpdateClusterResource_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 *UpdateClusterResource_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in UpdateClusterResource_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +// GetWorkloadType returns the value of the WorkloadType field in UpdateClusterResource_SdkV2 as +// a WorkloadType_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateClusterResource_SdkV2) GetWorkloadType(ctx context.Context) (WorkloadType_SdkV2, bool) { + var e WorkloadType_SdkV2 + if o.WorkloadType.IsNull() || o.WorkloadType.IsUnknown() { + return e, false + } + var v []WorkloadType_SdkV2 + d := o.WorkloadType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWorkloadType sets the value of the WorkloadType field in UpdateClusterResource_SdkV2. +func (o *UpdateClusterResource_SdkV2) SetWorkloadType(ctx context.Context, v WorkloadType_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] + o.WorkloadType = types.ListValueMust(t, vs) +} + +type UpdateClusterResponse_SdkV2 struct { +} + +func (newState *UpdateClusterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateClusterResponse_SdkV2) { +} + +func (newState *UpdateClusterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateClusterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateClusterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateClusterResponse_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, UpdateClusterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateClusterResponse_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 UpdateClusterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type VolumesStorageInfo_SdkV2 struct { + // Unity Catalog Volumes file destination, e.g. `/Volumes/my-init.sh` + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *VolumesStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VolumesStorageInfo_SdkV2) { +} + +func (newState *VolumesStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState VolumesStorageInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in VolumesStorageInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a VolumesStorageInfo_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, VolumesStorageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o VolumesStorageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o VolumesStorageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} + +type WorkloadType_SdkV2 struct { + // defined what type of clients can use the cluster. E.g. Notebooks, Jobs + Clients types.List `tfsdk:"clients" tf:"object"` +} + +func (newState *WorkloadType_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkloadType_SdkV2) { +} + +func (newState *WorkloadType_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkloadType_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkloadType. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkloadType_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clients": reflect.TypeOf(ClientsTypes_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, WorkloadType_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkloadType_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clients": o.Clients, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkloadType_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clients": basetypes.ListType{ + ElemType: ClientsTypes{}.Type(ctx), + }, + }, + } +} + +// GetClients returns the value of the Clients field in WorkloadType_SdkV2 as +// a ClientsTypes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkloadType_SdkV2) GetClients(ctx context.Context) (ClientsTypes_SdkV2, bool) { + var e ClientsTypes_SdkV2 + if o.Clients.IsNull() || o.Clients.IsUnknown() { + return e, false + } + var v []ClientsTypes_SdkV2 + d := o.Clients.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClients sets the value of the Clients field in WorkloadType_SdkV2. +func (o *WorkloadType_SdkV2) SetClients(ctx context.Context, v ClientsTypes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clients"] + o.Clients = types.ListValueMust(t, vs) +} + +type WorkspaceStorageInfo_SdkV2 struct { + // workspace files destination, e.g. + // `/Users/user1@databricks.com/my-init.sh` + Destination types.String `tfsdk:"destination" tf:""` +} + +func (newState *WorkspaceStorageInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceStorageInfo_SdkV2) { +} + +func (newState *WorkspaceStorageInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceStorageInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceStorageInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceStorageInfo_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, WorkspaceStorageInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceStorageInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceStorageInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + }, + } +} diff --git a/internal/service/compute_tf/model.go b/internal/service/compute_tf/model.go index ad9792e56..8d35dc5f6 100755 --- a/internal/service/compute_tf/model.go +++ b/internal/service/compute_tf/model.go @@ -380,7 +380,7 @@ type AzureAttributes struct { // mutated over the lifetime of a cluster. FirstOnDemand types.Int64 `tfsdk:"first_on_demand" tf:"optional"` // Defines values necessary to configure and run Azure Log Analytics agent - LogAnalyticsInfo types.List `tfsdk:"log_analytics_info" tf:"optional,object"` + LogAnalyticsInfo types.Object `tfsdk:"log_analytics_info" tf:"optional,object"` // The max bid price to be used for Azure spot instances. The Max price for // the bid cannot be higher than the on-demand price of the instance. If not // specified, the default value is -1, which specifies that the instance @@ -426,11 +426,9 @@ func (o AzureAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o AzureAttributes) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "availability": types.StringType, - "first_on_demand": types.Int64Type, - "log_analytics_info": basetypes.ListType{ - ElemType: LogAnalyticsInfo{}.Type(ctx), - }, + "availability": types.StringType, + "first_on_demand": types.Int64Type, + "log_analytics_info": LogAnalyticsInfo{}.Type(ctx), "spot_bid_max_price": types.Float64Type, }, } @@ -445,7 +443,10 @@ func (o *AzureAttributes) GetLogAnalyticsInfo(ctx context.Context) (LogAnalytics return e, false } var v []LogAnalyticsInfo - d := o.LogAnalyticsInfo.ElementsAs(ctx, &v, true) + d := o.LogAnalyticsInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -457,9 +458,8 @@ func (o *AzureAttributes) GetLogAnalyticsInfo(ctx context.Context) (LogAnalytics // SetLogAnalyticsInfo sets the value of the LogAnalyticsInfo field in AzureAttributes. func (o *AzureAttributes) SetLogAnalyticsInfo(ctx context.Context, v LogAnalyticsInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_analytics_info"] - o.LogAnalyticsInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LogAnalyticsInfo = vs } type CancelCommand struct { @@ -939,17 +939,17 @@ type ClusterAttributes struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` @@ -986,7 +986,7 @@ type ClusterAttributes struct { // mode provides a way that doesn’t have UC nor passthrough enabled. DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -1004,7 +1004,7 @@ type ClusterAttributes struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -1060,7 +1060,7 @@ type ClusterAttributes struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *ClusterAttributes) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAttributes) { @@ -1131,30 +1131,20 @@ func (o ClusterAttributes) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_name": types.StringType, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "data_security_mode": types.StringType, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, + "data_security_mode": types.StringType, + "docker_image": DockerImage{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -1173,9 +1163,7 @@ func (o ClusterAttributes) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -1189,7 +1177,10 @@ func (o *ClusterAttributes) GetAwsAttributes(ctx context.Context) (AwsAttributes return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1201,9 +1192,8 @@ func (o *ClusterAttributes) GetAwsAttributes(ctx context.Context) (AwsAttributes // SetAwsAttributes sets the value of the AwsAttributes field in ClusterAttributes. func (o *ClusterAttributes) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in ClusterAttributes as @@ -1215,7 +1205,10 @@ func (o *ClusterAttributes) GetAzureAttributes(ctx context.Context) (AzureAttrib return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1227,9 +1220,8 @@ func (o *ClusterAttributes) GetAzureAttributes(ctx context.Context) (AzureAttrib // SetAzureAttributes sets the value of the AzureAttributes field in ClusterAttributes. func (o *ClusterAttributes) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in ClusterAttributes as @@ -1241,7 +1233,10 @@ func (o *ClusterAttributes) GetClusterLogConf(ctx context.Context) (ClusterLogCo return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1253,9 +1248,8 @@ func (o *ClusterAttributes) GetClusterLogConf(ctx context.Context) (ClusterLogCo // SetClusterLogConf sets the value of the ClusterLogConf field in ClusterAttributes. func (o *ClusterAttributes) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in ClusterAttributes as @@ -1293,7 +1287,10 @@ func (o *ClusterAttributes) GetDockerImage(ctx context.Context) (DockerImage, bo return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1305,9 +1302,8 @@ func (o *ClusterAttributes) GetDockerImage(ctx context.Context) (DockerImage, bo // SetDockerImage sets the value of the DockerImage field in ClusterAttributes. func (o *ClusterAttributes) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetGcpAttributes returns the value of the GcpAttributes field in ClusterAttributes as @@ -1319,7 +1315,10 @@ func (o *ClusterAttributes) GetGcpAttributes(ctx context.Context) (GcpAttributes return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1331,9 +1330,8 @@ func (o *ClusterAttributes) GetGcpAttributes(ctx context.Context) (GcpAttributes // SetGcpAttributes sets the value of the GcpAttributes field in ClusterAttributes. func (o *ClusterAttributes) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in ClusterAttributes as @@ -1449,7 +1447,10 @@ func (o *ClusterAttributes) GetWorkloadType(ctx context.Context) (WorkloadType, return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1461,9 +1462,8 @@ func (o *ClusterAttributes) GetWorkloadType(ctx context.Context) (WorkloadType, // SetWorkloadType sets the value of the WorkloadType field in ClusterAttributes. func (o *ClusterAttributes) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } type ClusterCompliance struct { @@ -1554,7 +1554,7 @@ type ClusterDetails struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 @@ -1563,10 +1563,10 @@ type ClusterDetails struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // Number of CPU cores available for this cluster. Note that this can be // fractional, e.g. 7.5 cores, since certain node types are configured to // share cores between Spark nodes on the same instance. @@ -1580,9 +1580,9 @@ type ClusterDetails struct { // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster log delivery status. - ClusterLogStatus types.List `tfsdk:"cluster_log_status" tf:"optional,object"` + ClusterLogStatus types.Object `tfsdk:"cluster_log_status" tf:"optional,object"` // Total amount of cluster memory, in megabytes ClusterMemoryMb types.Int64 `tfsdk:"cluster_memory_mb" tf:"optional"` // Cluster name requested by the user. This doesn't have to be unique. If @@ -1641,11 +1641,11 @@ type ClusterDetails struct { // - Name: DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // Node on which the Spark driver resides. The driver node contains the // Spark master and the Databricks application that manages the per-notebook // Spark REPLs. - Driver types.List `tfsdk:"driver" tf:"optional,object"` + Driver types.Object `tfsdk:"driver" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -1665,7 +1665,7 @@ type ClusterDetails struct { Executors types.List `tfsdk:"executors" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -1743,7 +1743,7 @@ type ClusterDetails struct { // or edit this cluster. The contents of `spec` can be used in the body of a // create cluster request. This field might not be populated for older // clusters. Note: not included in the response of the ListClusters API. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"optional,object"` // SSH public key contents that will be added to each Spark node in this // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. @@ -1761,9 +1761,9 @@ type ClusterDetails struct { TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:"optional"` // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. - TerminationReason types.List `tfsdk:"termination_reason" tf:"optional,object"` + TerminationReason types.Object `tfsdk:"termination_reason" tf:"optional,object"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *ClusterDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterDetails) { @@ -1861,28 +1861,18 @@ func (o ClusterDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o ClusterDetails) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, + "autoscale": AutoScale{}.Type(ctx), "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "cluster_cores": types.Float64Type, - "cluster_id": types.StringType, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_log_status": basetypes.ListType{ - ElemType: LogSyncStatus{}.Type(ctx), - }, - "cluster_memory_mb": types.Int64Type, - "cluster_name": types.StringType, - "cluster_source": types.StringType, - "creator_user_name": types.StringType, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "cluster_cores": types.Float64Type, + "cluster_id": types.StringType, + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_log_status": LogSyncStatus{}.Type(ctx), + "cluster_memory_mb": types.Int64Type, + "cluster_name": types.StringType, + "cluster_source": types.StringType, + "creator_user_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, @@ -1890,12 +1880,8 @@ func (o ClusterDetails) Type(ctx context.Context) attr.Type { "default_tags": basetypes.MapType{ ElemType: types.StringType, }, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, - "driver": basetypes.ListType{ - ElemType: SparkNode{}.Type(ctx), - }, + "docker_image": DockerImage{}.Type(ctx), + "driver": SparkNode{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, @@ -1903,9 +1889,7 @@ func (o ClusterDetails) Type(ctx context.Context) attr.Type { "executors": basetypes.ListType{ ElemType: SparkNode{}.Type(ctx), }, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -1926,22 +1910,16 @@ func (o ClusterDetails) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "spark_version": types.StringType, - "spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), - }, + "spec": ClusterSpec{}.Type(ctx), "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "start_time": types.Int64Type, - "state": types.StringType, - "state_message": types.StringType, - "terminated_time": types.Int64Type, - "termination_reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), - }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "start_time": types.Int64Type, + "state": types.StringType, + "state_message": types.StringType, + "terminated_time": types.Int64Type, + "termination_reason": TerminationReason{}.Type(ctx), + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -1955,7 +1933,10 @@ func (o *ClusterDetails) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1967,9 +1948,8 @@ func (o *ClusterDetails) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in ClusterDetails. func (o *ClusterDetails) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in ClusterDetails as @@ -1981,7 +1961,10 @@ func (o *ClusterDetails) GetAwsAttributes(ctx context.Context) (AwsAttributes, b return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1993,9 +1976,8 @@ func (o *ClusterDetails) GetAwsAttributes(ctx context.Context) (AwsAttributes, b // SetAwsAttributes sets the value of the AwsAttributes field in ClusterDetails. func (o *ClusterDetails) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in ClusterDetails as @@ -2007,7 +1989,10 @@ func (o *ClusterDetails) GetAzureAttributes(ctx context.Context) (AzureAttribute return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2019,9 +2004,8 @@ func (o *ClusterDetails) GetAzureAttributes(ctx context.Context) (AzureAttribute // SetAzureAttributes sets the value of the AzureAttributes field in ClusterDetails. func (o *ClusterDetails) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in ClusterDetails as @@ -2033,7 +2017,10 @@ func (o *ClusterDetails) GetClusterLogConf(ctx context.Context) (ClusterLogConf, return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2045,9 +2032,8 @@ func (o *ClusterDetails) GetClusterLogConf(ctx context.Context) (ClusterLogConf, // SetClusterLogConf sets the value of the ClusterLogConf field in ClusterDetails. func (o *ClusterDetails) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetClusterLogStatus returns the value of the ClusterLogStatus field in ClusterDetails as @@ -2059,7 +2045,10 @@ func (o *ClusterDetails) GetClusterLogStatus(ctx context.Context) (LogSyncStatus return e, false } var v []LogSyncStatus - d := o.ClusterLogStatus.ElementsAs(ctx, &v, true) + d := o.ClusterLogStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2071,9 +2060,8 @@ func (o *ClusterDetails) GetClusterLogStatus(ctx context.Context) (LogSyncStatus // SetClusterLogStatus sets the value of the ClusterLogStatus field in ClusterDetails. func (o *ClusterDetails) SetClusterLogStatus(ctx context.Context, v LogSyncStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_status"] - o.ClusterLogStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogStatus = vs } // GetCustomTags returns the value of the CustomTags field in ClusterDetails as @@ -2137,7 +2125,10 @@ func (o *ClusterDetails) GetDockerImage(ctx context.Context) (DockerImage, bool) return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2149,9 +2140,8 @@ func (o *ClusterDetails) GetDockerImage(ctx context.Context) (DockerImage, bool) // SetDockerImage sets the value of the DockerImage field in ClusterDetails. func (o *ClusterDetails) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetDriver returns the value of the Driver field in ClusterDetails as @@ -2163,7 +2153,10 @@ func (o *ClusterDetails) GetDriver(ctx context.Context) (SparkNode, bool) { return e, false } var v []SparkNode - d := o.Driver.ElementsAs(ctx, &v, true) + d := o.Driver.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2175,9 +2168,8 @@ func (o *ClusterDetails) GetDriver(ctx context.Context) (SparkNode, bool) { // SetDriver sets the value of the Driver field in ClusterDetails. func (o *ClusterDetails) SetDriver(ctx context.Context, v SparkNode) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["driver"] - o.Driver = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Driver = vs } // GetExecutors returns the value of the Executors field in ClusterDetails as @@ -2215,7 +2207,10 @@ func (o *ClusterDetails) GetGcpAttributes(ctx context.Context) (GcpAttributes, b return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2227,9 +2222,8 @@ func (o *ClusterDetails) GetGcpAttributes(ctx context.Context) (GcpAttributes, b // SetGcpAttributes sets the value of the GcpAttributes field in ClusterDetails. func (o *ClusterDetails) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in ClusterDetails as @@ -2319,7 +2313,10 @@ func (o *ClusterDetails) GetSpec(ctx context.Context) (ClusterSpec, bool) { return e, false } var v []ClusterSpec - d := o.Spec.ElementsAs(ctx, &v, true) + d := o.Spec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2331,9 +2328,8 @@ func (o *ClusterDetails) GetSpec(ctx context.Context) (ClusterSpec, bool) { // SetSpec sets the value of the Spec field in ClusterDetails. func (o *ClusterDetails) SetSpec(ctx context.Context, v ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] - o.Spec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Spec = vs } // GetSshPublicKeys returns the value of the SshPublicKeys field in ClusterDetails as @@ -2371,7 +2367,10 @@ func (o *ClusterDetails) GetTerminationReason(ctx context.Context) (TerminationR return e, false } var v []TerminationReason - d := o.TerminationReason.ElementsAs(ctx, &v, true) + d := o.TerminationReason.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2383,9 +2382,8 @@ func (o *ClusterDetails) GetTerminationReason(ctx context.Context) (TerminationR // SetTerminationReason sets the value of the TerminationReason field in ClusterDetails. func (o *ClusterDetails) SetTerminationReason(ctx context.Context, v TerminationReason) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["termination_reason"] - o.TerminationReason = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TerminationReason = vs } // GetWorkloadType returns the value of the WorkloadType field in ClusterDetails as @@ -2397,7 +2395,10 @@ func (o *ClusterDetails) GetWorkloadType(ctx context.Context) (WorkloadType, boo return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2409,18 +2410,17 @@ func (o *ClusterDetails) GetWorkloadType(ctx context.Context) (WorkloadType, boo // SetWorkloadType sets the value of the WorkloadType field in ClusterDetails. func (o *ClusterDetails) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } type ClusterEvent struct { // ClusterId types.String `tfsdk:"cluster_id" tf:""` // - DataPlaneEventDetails types.List `tfsdk:"data_plane_event_details" tf:"optional,object"` + DataPlaneEventDetails types.Object `tfsdk:"data_plane_event_details" tf:"optional,object"` // - Details types.List `tfsdk:"details" tf:"optional,object"` + Details types.Object `tfsdk:"details" tf:"optional,object"` // The timestamp when the event occurred, stored as the number of // milliseconds since the Unix epoch. If not provided, this will be assigned // by the Timeline service. @@ -2468,15 +2468,11 @@ func (o ClusterEvent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o ClusterEvent) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cluster_id": types.StringType, - "data_plane_event_details": basetypes.ListType{ - ElemType: DataPlaneEventDetails{}.Type(ctx), - }, - "details": basetypes.ListType{ - ElemType: EventDetails{}.Type(ctx), - }, - "timestamp": types.Int64Type, - "type": types.StringType, + "cluster_id": types.StringType, + "data_plane_event_details": DataPlaneEventDetails{}.Type(ctx), + "details": EventDetails{}.Type(ctx), + "timestamp": types.Int64Type, + "type": types.StringType, }, } } @@ -2490,7 +2486,10 @@ func (o *ClusterEvent) GetDataPlaneEventDetails(ctx context.Context) (DataPlaneE return e, false } var v []DataPlaneEventDetails - d := o.DataPlaneEventDetails.ElementsAs(ctx, &v, true) + d := o.DataPlaneEventDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2502,9 +2501,8 @@ func (o *ClusterEvent) GetDataPlaneEventDetails(ctx context.Context) (DataPlaneE // SetDataPlaneEventDetails sets the value of the DataPlaneEventDetails field in ClusterEvent. func (o *ClusterEvent) SetDataPlaneEventDetails(ctx context.Context, v DataPlaneEventDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_event_details"] - o.DataPlaneEventDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataPlaneEventDetails = vs } // GetDetails returns the value of the Details field in ClusterEvent as @@ -2516,7 +2514,10 @@ func (o *ClusterEvent) GetDetails(ctx context.Context) (EventDetails, bool) { return e, false } var v []EventDetails - d := o.Details.ElementsAs(ctx, &v, true) + d := o.Details.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2528,9 +2529,8 @@ func (o *ClusterEvent) GetDetails(ctx context.Context) (EventDetails, bool) { // SetDetails sets the value of the Details field in ClusterEvent. func (o *ClusterEvent) SetDetails(ctx context.Context, v EventDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["details"] - o.Details = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Details = vs } type ClusterLibraryStatuses struct { @@ -2612,13 +2612,13 @@ func (o *ClusterLibraryStatuses) SetLibraryStatuses(ctx context.Context, v []Lib type ClusterLogConf struct { // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.Object `tfsdk:"dbfs" tf:"optional,object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.List `tfsdk:"s3" tf:"optional,object"` + S3 types.Object `tfsdk:"s3" tf:"optional,object"` } func (newState *ClusterLogConf) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterLogConf) { @@ -2657,12 +2657,8 @@ func (o ClusterLogConf) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o ClusterLogConf) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "dbfs": basetypes.ListType{ - ElemType: DbfsStorageInfo{}.Type(ctx), - }, - "s3": basetypes.ListType{ - ElemType: S3StorageInfo{}.Type(ctx), - }, + "dbfs": DbfsStorageInfo{}.Type(ctx), + "s3": S3StorageInfo{}.Type(ctx), }, } } @@ -2676,7 +2672,10 @@ func (o *ClusterLogConf) GetDbfs(ctx context.Context) (DbfsStorageInfo, bool) { return e, false } var v []DbfsStorageInfo - d := o.Dbfs.ElementsAs(ctx, &v, true) + d := o.Dbfs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2688,9 +2687,8 @@ func (o *ClusterLogConf) GetDbfs(ctx context.Context) (DbfsStorageInfo, bool) { // SetDbfs sets the value of the Dbfs field in ClusterLogConf. func (o *ClusterLogConf) SetDbfs(ctx context.Context, v DbfsStorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbfs"] - o.Dbfs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dbfs = vs } // GetS3 returns the value of the S3 field in ClusterLogConf as @@ -2702,7 +2700,10 @@ func (o *ClusterLogConf) GetS3(ctx context.Context) (S3StorageInfo, bool) { return e, false } var v []S3StorageInfo - d := o.S3.ElementsAs(ctx, &v, true) + d := o.S3.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2714,9 +2715,8 @@ func (o *ClusterLogConf) GetS3(ctx context.Context) (S3StorageInfo, bool) { // SetS3 sets the value of the S3 field in ClusterLogConf. func (o *ClusterLogConf) SetS3(ctx context.Context, v S3StorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["s3"] - o.S3 = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.S3 = vs } type ClusterPermission struct { @@ -3479,7 +3479,7 @@ type ClusterSize struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Number of worker nodes that this cluster should have. A cluster has one // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 // Spark nodes. @@ -3528,9 +3528,7 @@ func (o ClusterSize) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o ClusterSize) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, + "autoscale": AutoScale{}.Type(ctx), "num_workers": types.Int64Type, }, } @@ -3545,7 +3543,10 @@ func (o *ClusterSize) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3557,9 +3558,8 @@ func (o *ClusterSize) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in ClusterSize. func (o *ClusterSize) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } type ClusterSpec struct { @@ -3570,7 +3570,7 @@ type ClusterSpec struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 @@ -3579,17 +3579,17 @@ type ClusterSpec struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` @@ -3626,7 +3626,7 @@ type ClusterSpec struct { // mode provides a way that doesn’t have UC nor passthrough enabled. DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -3644,7 +3644,7 @@ type ClusterSpec struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -3711,7 +3711,7 @@ type ClusterSpec struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec) { @@ -3786,34 +3786,22 @@ func (o ClusterSpec) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, - "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_name": types.StringType, + "autoscale": AutoScale{}.Type(ctx), + "autotermination_minutes": types.Int64Type, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "data_security_mode": types.StringType, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, + "data_security_mode": types.StringType, + "docker_image": DockerImage{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -3833,9 +3821,7 @@ func (o ClusterSpec) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -3849,7 +3835,10 @@ func (o *ClusterSpec) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3861,9 +3850,8 @@ func (o *ClusterSpec) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in ClusterSpec. func (o *ClusterSpec) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in ClusterSpec as @@ -3875,7 +3863,10 @@ func (o *ClusterSpec) GetAwsAttributes(ctx context.Context) (AwsAttributes, bool return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3887,9 +3878,8 @@ func (o *ClusterSpec) GetAwsAttributes(ctx context.Context) (AwsAttributes, bool // SetAwsAttributes sets the value of the AwsAttributes field in ClusterSpec. func (o *ClusterSpec) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in ClusterSpec as @@ -3901,7 +3891,10 @@ func (o *ClusterSpec) GetAzureAttributes(ctx context.Context) (AzureAttributes, return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3913,9 +3906,8 @@ func (o *ClusterSpec) GetAzureAttributes(ctx context.Context) (AzureAttributes, // SetAzureAttributes sets the value of the AzureAttributes field in ClusterSpec. func (o *ClusterSpec) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in ClusterSpec as @@ -3927,7 +3919,10 @@ func (o *ClusterSpec) GetClusterLogConf(ctx context.Context) (ClusterLogConf, bo return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3939,9 +3934,8 @@ func (o *ClusterSpec) GetClusterLogConf(ctx context.Context) (ClusterLogConf, bo // SetClusterLogConf sets the value of the ClusterLogConf field in ClusterSpec. func (o *ClusterSpec) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in ClusterSpec as @@ -3979,7 +3973,10 @@ func (o *ClusterSpec) GetDockerImage(ctx context.Context) (DockerImage, bool) { return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3991,9 +3988,8 @@ func (o *ClusterSpec) GetDockerImage(ctx context.Context) (DockerImage, bool) { // SetDockerImage sets the value of the DockerImage field in ClusterSpec. func (o *ClusterSpec) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetGcpAttributes returns the value of the GcpAttributes field in ClusterSpec as @@ -4005,7 +4001,10 @@ func (o *ClusterSpec) GetGcpAttributes(ctx context.Context) (GcpAttributes, bool return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4017,9 +4016,8 @@ func (o *ClusterSpec) GetGcpAttributes(ctx context.Context) (GcpAttributes, bool // SetGcpAttributes sets the value of the GcpAttributes field in ClusterSpec. func (o *ClusterSpec) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in ClusterSpec as @@ -4135,7 +4133,10 @@ func (o *ClusterSpec) GetWorkloadType(ctx context.Context) (WorkloadType, bool) return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4147,9 +4148,8 @@ func (o *ClusterSpec) GetWorkloadType(ctx context.Context) (WorkloadType, bool) // SetWorkloadType sets the value of the WorkloadType field in ClusterSpec. func (o *ClusterSpec) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } // Get status @@ -4302,7 +4302,7 @@ func (o CommandStatusRequest) Type(ctx context.Context) attr.Type { type CommandStatusResponse struct { Id types.String `tfsdk:"id" tf:"optional"` - Results types.List `tfsdk:"results" tf:"optional,object"` + Results types.Object `tfsdk:"results" tf:"optional,object"` Status types.String `tfsdk:"status" tf:"optional"` } @@ -4343,11 +4343,9 @@ func (o CommandStatusResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o CommandStatusResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "results": basetypes.ListType{ - ElemType: Results{}.Type(ctx), - }, - "status": types.StringType, + "id": types.StringType, + "results": Results{}.Type(ctx), + "status": types.StringType, }, } } @@ -4361,7 +4359,10 @@ func (o *CommandStatusResponse) GetResults(ctx context.Context) (Results, bool) return e, false } var v []Results - d := o.Results.ElementsAs(ctx, &v, true) + d := o.Results.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4373,9 +4374,8 @@ func (o *CommandStatusResponse) GetResults(ctx context.Context) (Results, bool) // SetResults sets the value of the Results field in CommandStatusResponse. func (o *CommandStatusResponse) SetResults(ctx context.Context, v Results) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["results"] - o.Results = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Results = vs } // Get status @@ -4477,7 +4477,7 @@ type CreateCluster struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 @@ -4486,20 +4486,20 @@ type CreateCluster struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // When specified, this clones libraries from a source cluster during the // creation of a new cluster. - CloneFrom types.List `tfsdk:"clone_from" tf:"optional,object"` + CloneFrom types.Object `tfsdk:"clone_from" tf:"optional,object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` @@ -4536,7 +4536,7 @@ type CreateCluster struct { // mode provides a way that doesn’t have UC nor passthrough enabled. DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -4554,7 +4554,7 @@ type CreateCluster struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -4621,7 +4621,7 @@ type CreateCluster struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *CreateCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCluster) { @@ -4698,37 +4698,23 @@ func (o CreateCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, - "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "clone_from": basetypes.ListType{ - ElemType: CloneCluster{}.Type(ctx), - }, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_name": types.StringType, + "autoscale": AutoScale{}.Type(ctx), + "autotermination_minutes": types.Int64Type, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "clone_from": CloneCluster{}.Type(ctx), + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "data_security_mode": types.StringType, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, + "data_security_mode": types.StringType, + "docker_image": DockerImage{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -4748,9 +4734,7 @@ func (o CreateCluster) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -4764,7 +4748,10 @@ func (o *CreateCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4776,9 +4763,8 @@ func (o *CreateCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in CreateCluster. func (o *CreateCluster) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in CreateCluster as @@ -4790,7 +4776,10 @@ func (o *CreateCluster) GetAwsAttributes(ctx context.Context) (AwsAttributes, bo return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4802,9 +4791,8 @@ func (o *CreateCluster) GetAwsAttributes(ctx context.Context) (AwsAttributes, bo // SetAwsAttributes sets the value of the AwsAttributes field in CreateCluster. func (o *CreateCluster) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in CreateCluster as @@ -4816,7 +4804,10 @@ func (o *CreateCluster) GetAzureAttributes(ctx context.Context) (AzureAttributes return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4828,9 +4819,8 @@ func (o *CreateCluster) GetAzureAttributes(ctx context.Context) (AzureAttributes // SetAzureAttributes sets the value of the AzureAttributes field in CreateCluster. func (o *CreateCluster) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetCloneFrom returns the value of the CloneFrom field in CreateCluster as @@ -4842,7 +4832,10 @@ func (o *CreateCluster) GetCloneFrom(ctx context.Context) (CloneCluster, bool) { return e, false } var v []CloneCluster - d := o.CloneFrom.ElementsAs(ctx, &v, true) + d := o.CloneFrom.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4854,9 +4847,8 @@ func (o *CreateCluster) GetCloneFrom(ctx context.Context) (CloneCluster, bool) { // SetCloneFrom sets the value of the CloneFrom field in CreateCluster. func (o *CreateCluster) SetCloneFrom(ctx context.Context, v CloneCluster) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clone_from"] - o.CloneFrom = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloneFrom = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in CreateCluster as @@ -4868,7 +4860,10 @@ func (o *CreateCluster) GetClusterLogConf(ctx context.Context) (ClusterLogConf, return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4880,9 +4875,8 @@ func (o *CreateCluster) GetClusterLogConf(ctx context.Context) (ClusterLogConf, // SetClusterLogConf sets the value of the ClusterLogConf field in CreateCluster. func (o *CreateCluster) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in CreateCluster as @@ -4920,7 +4914,10 @@ func (o *CreateCluster) GetDockerImage(ctx context.Context) (DockerImage, bool) return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4932,9 +4929,8 @@ func (o *CreateCluster) GetDockerImage(ctx context.Context) (DockerImage, bool) // SetDockerImage sets the value of the DockerImage field in CreateCluster. func (o *CreateCluster) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetGcpAttributes returns the value of the GcpAttributes field in CreateCluster as @@ -4946,7 +4942,10 @@ func (o *CreateCluster) GetGcpAttributes(ctx context.Context) (GcpAttributes, bo return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4958,9 +4957,8 @@ func (o *CreateCluster) GetGcpAttributes(ctx context.Context) (GcpAttributes, bo // SetGcpAttributes sets the value of the GcpAttributes field in CreateCluster. func (o *CreateCluster) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in CreateCluster as @@ -5076,7 +5074,10 @@ func (o *CreateCluster) GetWorkloadType(ctx context.Context) (WorkloadType, bool return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5088,9 +5089,8 @@ func (o *CreateCluster) GetWorkloadType(ctx context.Context) (WorkloadType, bool // SetWorkloadType sets the value of the WorkloadType field in CreateCluster. func (o *CreateCluster) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } type CreateClusterResponse struct { @@ -5183,10 +5183,10 @@ func (o CreateContext) Type(ctx context.Context) attr.Type { type CreateInstancePool struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -5195,7 +5195,7 @@ type CreateInstancePool struct { CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS @@ -5204,7 +5204,7 @@ type CreateInstancePool struct { EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -5289,22 +5289,14 @@ func (o CreateInstancePool) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CreateInstancePool) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), - }, + "aws_attributes": InstancePoolAwsAttributes{}.Type(ctx), + "azure_attributes": InstancePoolAzureAttributes{}.Type(ctx), "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), - }, - "enable_elastic_disk": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), - }, + "disk_spec": DiskSpec{}.Type(ctx), + "enable_elastic_disk": types.BoolType, + "gcp_attributes": InstancePoolGcpAttributes{}.Type(ctx), "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_name": types.StringType, "max_capacity": types.Int64Type, @@ -5329,7 +5321,10 @@ func (o *CreateInstancePool) GetAwsAttributes(ctx context.Context) (InstancePool return e, false } var v []InstancePoolAwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5341,9 +5336,8 @@ func (o *CreateInstancePool) GetAwsAttributes(ctx context.Context) (InstancePool // SetAwsAttributes sets the value of the AwsAttributes field in CreateInstancePool. func (o *CreateInstancePool) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in CreateInstancePool as @@ -5355,7 +5349,10 @@ func (o *CreateInstancePool) GetAzureAttributes(ctx context.Context) (InstancePo return e, false } var v []InstancePoolAzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5367,9 +5364,8 @@ func (o *CreateInstancePool) GetAzureAttributes(ctx context.Context) (InstancePo // SetAzureAttributes sets the value of the AzureAttributes field in CreateInstancePool. func (o *CreateInstancePool) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetCustomTags returns the value of the CustomTags field in CreateInstancePool as @@ -5407,7 +5403,10 @@ func (o *CreateInstancePool) GetDiskSpec(ctx context.Context) (DiskSpec, bool) { return e, false } var v []DiskSpec - d := o.DiskSpec.ElementsAs(ctx, &v, true) + d := o.DiskSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5419,9 +5418,8 @@ func (o *CreateInstancePool) GetDiskSpec(ctx context.Context) (DiskSpec, bool) { // SetDiskSpec sets the value of the DiskSpec field in CreateInstancePool. func (o *CreateInstancePool) SetDiskSpec(ctx context.Context, v DiskSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] - o.DiskSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DiskSpec = vs } // GetGcpAttributes returns the value of the GcpAttributes field in CreateInstancePool as @@ -5433,7 +5431,10 @@ func (o *CreateInstancePool) GetGcpAttributes(ctx context.Context) (InstancePool return e, false } var v []InstancePoolGcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5445,9 +5446,8 @@ func (o *CreateInstancePool) GetGcpAttributes(ctx context.Context) (InstancePool // SetGcpAttributes sets the value of the GcpAttributes field in CreateInstancePool. func (o *CreateInstancePool) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in CreateInstancePool as @@ -6306,7 +6306,7 @@ type DiskSpec struct { DiskThroughput types.Int64 `tfsdk:"disk_throughput" tf:"optional"` // The type of disks that will be launched with this cluster. - DiskType types.List `tfsdk:"disk_type" tf:"optional,object"` + DiskType types.Object `tfsdk:"disk_type" tf:"optional,object"` } func (newState *DiskSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan DiskSpec) { @@ -6351,9 +6351,7 @@ func (o DiskSpec) Type(ctx context.Context) attr.Type { "disk_iops": types.Int64Type, "disk_size": types.Int64Type, "disk_throughput": types.Int64Type, - "disk_type": basetypes.ListType{ - ElemType: DiskType{}.Type(ctx), - }, + "disk_type": DiskType{}.Type(ctx), }, } } @@ -6367,7 +6365,10 @@ func (o *DiskSpec) GetDiskType(ctx context.Context) (DiskType, bool) { return e, false } var v []DiskType - d := o.DiskType.ElementsAs(ctx, &v, true) + d := o.DiskType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6379,9 +6380,8 @@ func (o *DiskSpec) GetDiskType(ctx context.Context) (DiskType, bool) { // SetDiskType sets the value of the DiskType field in DiskSpec. func (o *DiskSpec) SetDiskType(ctx context.Context, v DiskType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_type"] - o.DiskType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DiskType = vs } type DiskType struct { @@ -6476,7 +6476,7 @@ func (o DockerBasicAuth) Type(ctx context.Context) attr.Type { } type DockerImage struct { - BasicAuth types.List `tfsdk:"basic_auth" tf:"optional,object"` + BasicAuth types.Object `tfsdk:"basic_auth" tf:"optional,object"` // URL of the docker image. Url types.String `tfsdk:"url" tf:"optional"` } @@ -6516,10 +6516,8 @@ func (o DockerImage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o DockerImage) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "basic_auth": basetypes.ListType{ - ElemType: DockerBasicAuth{}.Type(ctx), - }, - "url": types.StringType, + "basic_auth": DockerBasicAuth{}.Type(ctx), + "url": types.StringType, }, } } @@ -6533,7 +6531,10 @@ func (o *DockerImage) GetBasicAuth(ctx context.Context) (DockerBasicAuth, bool) return e, false } var v []DockerBasicAuth - d := o.BasicAuth.ElementsAs(ctx, &v, true) + d := o.BasicAuth.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6545,9 +6546,8 @@ func (o *DockerImage) GetBasicAuth(ctx context.Context) (DockerBasicAuth, bool) // SetBasicAuth sets the value of the BasicAuth field in DockerImage. func (o *DockerImage) SetBasicAuth(ctx context.Context, v DockerBasicAuth) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["basic_auth"] - o.BasicAuth = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.BasicAuth = vs } type EditCluster struct { @@ -6558,7 +6558,7 @@ type EditCluster struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 @@ -6567,10 +6567,10 @@ type EditCluster struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // ID of the cluster ClusterId types.String `tfsdk:"cluster_id" tf:""` // The configuration for delivering spark logs to a long-term storage @@ -6579,7 +6579,7 @@ type EditCluster struct { // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` @@ -6616,7 +6616,7 @@ type EditCluster struct { // mode provides a way that doesn’t have UC nor passthrough enabled. DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -6634,7 +6634,7 @@ type EditCluster struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -6701,7 +6701,7 @@ type EditCluster struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *EditCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditCluster) { @@ -6777,35 +6777,23 @@ func (o EditCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, - "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "cluster_id": types.StringType, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_name": types.StringType, + "autoscale": AutoScale{}.Type(ctx), + "autotermination_minutes": types.Int64Type, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "cluster_id": types.StringType, + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "data_security_mode": types.StringType, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, + "data_security_mode": types.StringType, + "docker_image": DockerImage{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -6825,9 +6813,7 @@ func (o EditCluster) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -6841,7 +6827,10 @@ func (o *EditCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6853,9 +6842,8 @@ func (o *EditCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in EditCluster. func (o *EditCluster) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in EditCluster as @@ -6867,7 +6855,10 @@ func (o *EditCluster) GetAwsAttributes(ctx context.Context) (AwsAttributes, bool return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6879,9 +6870,8 @@ func (o *EditCluster) GetAwsAttributes(ctx context.Context) (AwsAttributes, bool // SetAwsAttributes sets the value of the AwsAttributes field in EditCluster. func (o *EditCluster) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in EditCluster as @@ -6893,7 +6883,10 @@ func (o *EditCluster) GetAzureAttributes(ctx context.Context) (AzureAttributes, return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6905,9 +6898,8 @@ func (o *EditCluster) GetAzureAttributes(ctx context.Context) (AzureAttributes, // SetAzureAttributes sets the value of the AzureAttributes field in EditCluster. func (o *EditCluster) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in EditCluster as @@ -6919,7 +6911,10 @@ func (o *EditCluster) GetClusterLogConf(ctx context.Context) (ClusterLogConf, bo return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6931,9 +6926,8 @@ func (o *EditCluster) GetClusterLogConf(ctx context.Context) (ClusterLogConf, bo // SetClusterLogConf sets the value of the ClusterLogConf field in EditCluster. func (o *EditCluster) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in EditCluster as @@ -6971,7 +6965,10 @@ func (o *EditCluster) GetDockerImage(ctx context.Context) (DockerImage, bool) { return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6983,9 +6980,8 @@ func (o *EditCluster) GetDockerImage(ctx context.Context) (DockerImage, bool) { // SetDockerImage sets the value of the DockerImage field in EditCluster. func (o *EditCluster) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetGcpAttributes returns the value of the GcpAttributes field in EditCluster as @@ -6997,7 +6993,10 @@ func (o *EditCluster) GetGcpAttributes(ctx context.Context) (GcpAttributes, bool return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7009,9 +7008,8 @@ func (o *EditCluster) GetGcpAttributes(ctx context.Context) (GcpAttributes, bool // SetGcpAttributes sets the value of the GcpAttributes field in EditCluster. func (o *EditCluster) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in EditCluster as @@ -7127,7 +7125,10 @@ func (o *EditCluster) GetWorkloadType(ctx context.Context) (WorkloadType, bool) return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7139,9 +7140,8 @@ func (o *EditCluster) GetWorkloadType(ctx context.Context) (WorkloadType, bool) // SetWorkloadType sets the value of the WorkloadType field in EditCluster. func (o *EditCluster) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } type EditClusterResponse struct { @@ -7735,11 +7735,11 @@ func (o *Environment) SetDependencies(ctx context.Context, v []types.String) { type EventDetails struct { // * For created clusters, the attributes of the cluster. * For edited // clusters, the new attributes of the cluster. - Attributes types.List `tfsdk:"attributes" tf:"optional,object"` + Attributes types.Object `tfsdk:"attributes" tf:"optional,object"` // The cause of a change in target size. Cause types.String `tfsdk:"cause" tf:"optional"` // The actual cluster size that was set in the cluster creation or edit. - ClusterSize types.List `tfsdk:"cluster_size" tf:"optional,object"` + ClusterSize types.Object `tfsdk:"cluster_size" tf:"optional,object"` // The current number of vCPUs in the cluster. CurrentNumVcpus types.Int64 `tfsdk:"current_num_vcpus" tf:"optional"` // The current number of nodes in the cluster. @@ -7757,7 +7757,7 @@ type EventDetails struct { FreeSpace types.Int64 `tfsdk:"free_space" tf:"optional"` // List of global and cluster init scripts associated with this cluster // event. - InitScripts types.List `tfsdk:"init_scripts" tf:"optional,object"` + InitScripts types.Object `tfsdk:"init_scripts" tf:"optional,object"` // Instance Id where the event originated from InstanceId types.String `tfsdk:"instance_id" tf:"optional"` // Unique identifier of the specific job run associated with this cluster @@ -7765,15 +7765,15 @@ type EventDetails struct { // cluster name JobRunName types.String `tfsdk:"job_run_name" tf:"optional"` // The cluster attributes before a cluster was edited. - PreviousAttributes types.List `tfsdk:"previous_attributes" tf:"optional,object"` + PreviousAttributes types.Object `tfsdk:"previous_attributes" tf:"optional,object"` // The size of the cluster before an edit or resize. - PreviousClusterSize types.List `tfsdk:"previous_cluster_size" tf:"optional,object"` + PreviousClusterSize types.Object `tfsdk:"previous_cluster_size" tf:"optional,object"` // Previous disk size in bytes PreviousDiskSize types.Int64 `tfsdk:"previous_disk_size" tf:"optional"` // A termination reason: * On a TERMINATED event, this is the reason of the // termination. * On a RESIZE_COMPLETE event, this indicates the reason that // we failed to acquire some nodes. - Reason types.List `tfsdk:"reason" tf:"optional,object"` + Reason types.Object `tfsdk:"reason" tf:"optional,object"` // The targeted number of vCPUs in the cluster. TargetNumVcpus types.Int64 `tfsdk:"target_num_vcpus" tf:"optional"` // The targeted number of nodes in the cluster. @@ -7841,38 +7841,26 @@ func (o EventDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o EventDetails) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attributes": basetypes.ListType{ - ElemType: ClusterAttributes{}.Type(ctx), - }, - "cause": types.StringType, - "cluster_size": basetypes.ListType{ - ElemType: ClusterSize{}.Type(ctx), - }, - "current_num_vcpus": types.Int64Type, - "current_num_workers": types.Int64Type, - "did_not_expand_reason": types.StringType, - "disk_size": types.Int64Type, - "driver_state_message": types.StringType, + "attributes": ClusterAttributes{}.Type(ctx), + "cause": types.StringType, + "cluster_size": ClusterSize{}.Type(ctx), + "current_num_vcpus": types.Int64Type, + "current_num_workers": types.Int64Type, + "did_not_expand_reason": types.StringType, + "disk_size": types.Int64Type, + "driver_state_message": types.StringType, "enable_termination_for_node_blocklisted": types.BoolType, - "free_space": types.Int64Type, - "init_scripts": basetypes.ListType{ - ElemType: InitScriptEventDetails{}.Type(ctx), - }, - "instance_id": types.StringType, - "job_run_name": types.StringType, - "previous_attributes": basetypes.ListType{ - ElemType: ClusterAttributes{}.Type(ctx), - }, - "previous_cluster_size": basetypes.ListType{ - ElemType: ClusterSize{}.Type(ctx), - }, - "previous_disk_size": types.Int64Type, - "reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), - }, - "target_num_vcpus": types.Int64Type, - "target_num_workers": types.Int64Type, - "user": types.StringType, + "free_space": types.Int64Type, + "init_scripts": InitScriptEventDetails{}.Type(ctx), + "instance_id": types.StringType, + "job_run_name": types.StringType, + "previous_attributes": ClusterAttributes{}.Type(ctx), + "previous_cluster_size": ClusterSize{}.Type(ctx), + "previous_disk_size": types.Int64Type, + "reason": TerminationReason{}.Type(ctx), + "target_num_vcpus": types.Int64Type, + "target_num_workers": types.Int64Type, + "user": types.StringType, }, } } @@ -7886,7 +7874,10 @@ func (o *EventDetails) GetAttributes(ctx context.Context) (ClusterAttributes, bo return e, false } var v []ClusterAttributes - d := o.Attributes.ElementsAs(ctx, &v, true) + d := o.Attributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7898,9 +7889,8 @@ func (o *EventDetails) GetAttributes(ctx context.Context) (ClusterAttributes, bo // SetAttributes sets the value of the Attributes field in EventDetails. func (o *EventDetails) SetAttributes(ctx context.Context, v ClusterAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["attributes"] - o.Attributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Attributes = vs } // GetClusterSize returns the value of the ClusterSize field in EventDetails as @@ -7912,7 +7902,10 @@ func (o *EventDetails) GetClusterSize(ctx context.Context) (ClusterSize, bool) { return e, false } var v []ClusterSize - d := o.ClusterSize.ElementsAs(ctx, &v, true) + d := o.ClusterSize.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7924,9 +7917,8 @@ func (o *EventDetails) GetClusterSize(ctx context.Context) (ClusterSize, bool) { // SetClusterSize sets the value of the ClusterSize field in EventDetails. func (o *EventDetails) SetClusterSize(ctx context.Context, v ClusterSize) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_size"] - o.ClusterSize = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterSize = vs } // GetInitScripts returns the value of the InitScripts field in EventDetails as @@ -7938,7 +7930,10 @@ func (o *EventDetails) GetInitScripts(ctx context.Context) (InitScriptEventDetai return e, false } var v []InitScriptEventDetails - d := o.InitScripts.ElementsAs(ctx, &v, true) + d := o.InitScripts.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7950,9 +7945,8 @@ func (o *EventDetails) GetInitScripts(ctx context.Context) (InitScriptEventDetai // SetInitScripts sets the value of the InitScripts field in EventDetails. func (o *EventDetails) SetInitScripts(ctx context.Context, v InitScriptEventDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["init_scripts"] - o.InitScripts = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InitScripts = vs } // GetPreviousAttributes returns the value of the PreviousAttributes field in EventDetails as @@ -7964,7 +7958,10 @@ func (o *EventDetails) GetPreviousAttributes(ctx context.Context) (ClusterAttrib return e, false } var v []ClusterAttributes - d := o.PreviousAttributes.ElementsAs(ctx, &v, true) + d := o.PreviousAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7976,9 +7973,8 @@ func (o *EventDetails) GetPreviousAttributes(ctx context.Context) (ClusterAttrib // SetPreviousAttributes sets the value of the PreviousAttributes field in EventDetails. func (o *EventDetails) SetPreviousAttributes(ctx context.Context, v ClusterAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["previous_attributes"] - o.PreviousAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PreviousAttributes = vs } // GetPreviousClusterSize returns the value of the PreviousClusterSize field in EventDetails as @@ -7990,7 +7986,10 @@ func (o *EventDetails) GetPreviousClusterSize(ctx context.Context) (ClusterSize, return e, false } var v []ClusterSize - d := o.PreviousClusterSize.ElementsAs(ctx, &v, true) + d := o.PreviousClusterSize.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8002,9 +8001,8 @@ func (o *EventDetails) GetPreviousClusterSize(ctx context.Context) (ClusterSize, // SetPreviousClusterSize sets the value of the PreviousClusterSize field in EventDetails. func (o *EventDetails) SetPreviousClusterSize(ctx context.Context, v ClusterSize) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["previous_cluster_size"] - o.PreviousClusterSize = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PreviousClusterSize = vs } // GetReason returns the value of the Reason field in EventDetails as @@ -8016,7 +8014,10 @@ func (o *EventDetails) GetReason(ctx context.Context) (TerminationReason, bool) return e, false } var v []TerminationReason - d := o.Reason.ElementsAs(ctx, &v, true) + d := o.Reason.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8028,9 +8029,8 @@ func (o *EventDetails) GetReason(ctx context.Context) (TerminationReason, bool) // SetReason sets the value of the Reason field in EventDetails. func (o *EventDetails) SetReason(ctx context.Context, v TerminationReason) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["reason"] - o.Reason = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Reason = vs } type GcpAttributes struct { @@ -8789,7 +8789,7 @@ type GetEventsResponse struct { Events types.List `tfsdk:"events" tf:"optional"` // The parameters required to retrieve the next page of events. Omitted if // there are no more events to read. - NextPage types.List `tfsdk:"next_page" tf:"optional,object"` + NextPage types.Object `tfsdk:"next_page" tf:"optional,object"` // The total number of events filtered by the start_time, end_time, and // event_types. TotalCount types.Int64 `tfsdk:"total_count" tf:"optional"` @@ -8835,9 +8835,7 @@ func (o GetEventsResponse) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: ClusterEvent{}.Type(ctx), }, - "next_page": basetypes.ListType{ - ElemType: GetEvents{}.Type(ctx), - }, + "next_page": GetEvents{}.Type(ctx), "total_count": types.Int64Type, }, } @@ -8878,7 +8876,10 @@ func (o *GetEventsResponse) GetNextPage(ctx context.Context) (GetEvents, bool) { return e, false } var v []GetEvents - d := o.NextPage.ElementsAs(ctx, &v, true) + d := o.NextPage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8890,9 +8891,8 @@ func (o *GetEventsResponse) GetNextPage(ctx context.Context) (GetEvents, bool) { // SetNextPage sets the value of the NextPage field in GetEventsResponse. func (o *GetEventsResponse) SetNextPage(ctx context.Context, v GetEvents) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["next_page"] - o.NextPage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NextPage = vs } // Get an init script @@ -8941,10 +8941,10 @@ func (o GetGlobalInitScriptRequest) Type(ctx context.Context) attr.Type { type GetInstancePool struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -8964,7 +8964,7 @@ type GetInstancePool struct { DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS @@ -8973,7 +8973,7 @@ type GetInstancePool struct { EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -9009,9 +9009,9 @@ type GetInstancePool struct { // Current state of the instance pool. State types.String `tfsdk:"state" tf:"optional"` // Usage statistics about the instance pool. - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"optional,object"` // Status of failed pending instances in the pool. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` } func (newState *GetInstancePool) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetInstancePool) { @@ -9074,25 +9074,17 @@ func (o GetInstancePool) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o GetInstancePool) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), - }, + "aws_attributes": InstancePoolAwsAttributes{}.Type(ctx), + "azure_attributes": InstancePoolAzureAttributes{}.Type(ctx), "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, "default_tags": basetypes.MapType{ ElemType: types.StringType, }, - "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), - }, - "enable_elastic_disk": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), - }, + "disk_spec": DiskSpec{}.Type(ctx), + "enable_elastic_disk": types.BoolType, + "gcp_attributes": InstancePoolGcpAttributes{}.Type(ctx), "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_id": types.StringType, "instance_pool_name": types.StringType, @@ -9105,13 +9097,9 @@ func (o GetInstancePool) Type(ctx context.Context) attr.Type { "preloaded_spark_versions": basetypes.ListType{ ElemType: types.StringType, }, - "state": types.StringType, - "stats": basetypes.ListType{ - ElemType: InstancePoolStats{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: InstancePoolStatus{}.Type(ctx), - }, + "state": types.StringType, + "stats": InstancePoolStats{}.Type(ctx), + "status": InstancePoolStatus{}.Type(ctx), }, } } @@ -9125,7 +9113,10 @@ func (o *GetInstancePool) GetAwsAttributes(ctx context.Context) (InstancePoolAws return e, false } var v []InstancePoolAwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9137,9 +9128,8 @@ func (o *GetInstancePool) GetAwsAttributes(ctx context.Context) (InstancePoolAws // SetAwsAttributes sets the value of the AwsAttributes field in GetInstancePool. func (o *GetInstancePool) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in GetInstancePool as @@ -9151,7 +9141,10 @@ func (o *GetInstancePool) GetAzureAttributes(ctx context.Context) (InstancePoolA return e, false } var v []InstancePoolAzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9163,9 +9156,8 @@ func (o *GetInstancePool) GetAzureAttributes(ctx context.Context) (InstancePoolA // SetAzureAttributes sets the value of the AzureAttributes field in GetInstancePool. func (o *GetInstancePool) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetCustomTags returns the value of the CustomTags field in GetInstancePool as @@ -9229,7 +9221,10 @@ func (o *GetInstancePool) GetDiskSpec(ctx context.Context) (DiskSpec, bool) { return e, false } var v []DiskSpec - d := o.DiskSpec.ElementsAs(ctx, &v, true) + d := o.DiskSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9241,9 +9236,8 @@ func (o *GetInstancePool) GetDiskSpec(ctx context.Context) (DiskSpec, bool) { // SetDiskSpec sets the value of the DiskSpec field in GetInstancePool. func (o *GetInstancePool) SetDiskSpec(ctx context.Context, v DiskSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] - o.DiskSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DiskSpec = vs } // GetGcpAttributes returns the value of the GcpAttributes field in GetInstancePool as @@ -9255,7 +9249,10 @@ func (o *GetInstancePool) GetGcpAttributes(ctx context.Context) (InstancePoolGcp return e, false } var v []InstancePoolGcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9267,9 +9264,8 @@ func (o *GetInstancePool) GetGcpAttributes(ctx context.Context) (InstancePoolGcp // SetGcpAttributes sets the value of the GcpAttributes field in GetInstancePool. func (o *GetInstancePool) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in GetInstancePool as @@ -9333,7 +9329,10 @@ func (o *GetInstancePool) GetStats(ctx context.Context) (InstancePoolStats, bool return e, false } var v []InstancePoolStats - d := o.Stats.ElementsAs(ctx, &v, true) + d := o.Stats.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9345,9 +9344,8 @@ func (o *GetInstancePool) GetStats(ctx context.Context) (InstancePoolStats, bool // SetStats sets the value of the Stats field in GetInstancePool. func (o *GetInstancePool) SetStats(ctx context.Context, v InstancePoolStats) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] - o.Stats = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Stats = vs } // GetStatus returns the value of the Status field in GetInstancePool as @@ -9359,7 +9357,10 @@ func (o *GetInstancePool) GetStatus(ctx context.Context) (InstancePoolStatus, bo return e, false } var v []InstancePoolStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9371,9 +9372,8 @@ func (o *GetInstancePool) GetStatus(ctx context.Context) (InstancePoolStatus, bo // SetStatus sets the value of the Status field in GetInstancePool. func (o *GetInstancePool) SetStatus(ctx context.Context, v InstancePoolStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // Get instance pool permission levels @@ -10143,28 +10143,28 @@ type InitScriptInfo struct { // destination needs to be provided. e.g. `{ "abfss" : { "destination" : // "abfss://@.dfs.core.windows.net/" // } } - Abfss types.List `tfsdk:"abfss" tf:"optional,object"` + Abfss types.Object `tfsdk:"abfss" tf:"optional,object"` // destination needs to be provided. e.g. `{ "dbfs" : { "destination" : // "dbfs:/home/cluster_log" } }` - Dbfs types.List `tfsdk:"dbfs" tf:"optional,object"` + Dbfs types.Object `tfsdk:"dbfs" tf:"optional,object"` // destination needs to be provided. e.g. `{ "file" : { "destination" : // "file:/my/local/file.sh" } }` - File types.List `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"optional,object"` // destination needs to be provided. e.g. `{ "gcs": { "destination": // "gs://my-bucket/file.sh" } }` - Gcs types.List `tfsdk:"gcs" tf:"optional,object"` + Gcs types.Object `tfsdk:"gcs" tf:"optional,object"` // destination and either the region or endpoint need to be provided. e.g. // `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : // "us-west-2" } }` Cluster iam role is used to access s3, please make sure // the cluster iam role in `instance_profile_arn` has permission to write // data to the s3 destination. - S3 types.List `tfsdk:"s3" tf:"optional,object"` + S3 types.Object `tfsdk:"s3" tf:"optional,object"` // destination needs to be provided. e.g. `{ "volumes" : { "destination" : // "/Volumes/my-init.sh" } }` - Volumes types.List `tfsdk:"volumes" tf:"optional,object"` + Volumes types.Object `tfsdk:"volumes" tf:"optional,object"` // destination needs to be provided. e.g. `{ "workspace" : { "destination" : // "/Users/user1@databricks.com/my-init.sh" } }` - Workspace types.List `tfsdk:"workspace" tf:"optional,object"` + Workspace types.Object `tfsdk:"workspace" tf:"optional,object"` } func (newState *InitScriptInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfo) { @@ -10213,27 +10213,13 @@ func (o InitScriptInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o InitScriptInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "abfss": basetypes.ListType{ - ElemType: Adlsgen2Info{}.Type(ctx), - }, - "dbfs": basetypes.ListType{ - ElemType: DbfsStorageInfo{}.Type(ctx), - }, - "file": basetypes.ListType{ - ElemType: LocalFileInfo{}.Type(ctx), - }, - "gcs": basetypes.ListType{ - ElemType: GcsStorageInfo{}.Type(ctx), - }, - "s3": basetypes.ListType{ - ElemType: S3StorageInfo{}.Type(ctx), - }, - "volumes": basetypes.ListType{ - ElemType: VolumesStorageInfo{}.Type(ctx), - }, - "workspace": basetypes.ListType{ - ElemType: WorkspaceStorageInfo{}.Type(ctx), - }, + "abfss": Adlsgen2Info{}.Type(ctx), + "dbfs": DbfsStorageInfo{}.Type(ctx), + "file": LocalFileInfo{}.Type(ctx), + "gcs": GcsStorageInfo{}.Type(ctx), + "s3": S3StorageInfo{}.Type(ctx), + "volumes": VolumesStorageInfo{}.Type(ctx), + "workspace": WorkspaceStorageInfo{}.Type(ctx), }, } } @@ -10247,7 +10233,10 @@ func (o *InitScriptInfo) GetAbfss(ctx context.Context) (Adlsgen2Info, bool) { return e, false } var v []Adlsgen2Info - d := o.Abfss.ElementsAs(ctx, &v, true) + d := o.Abfss.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10259,9 +10248,8 @@ func (o *InitScriptInfo) GetAbfss(ctx context.Context) (Adlsgen2Info, bool) { // SetAbfss sets the value of the Abfss field in InitScriptInfo. func (o *InitScriptInfo) SetAbfss(ctx context.Context, v Adlsgen2Info) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["abfss"] - o.Abfss = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Abfss = vs } // GetDbfs returns the value of the Dbfs field in InitScriptInfo as @@ -10273,7 +10261,10 @@ func (o *InitScriptInfo) GetDbfs(ctx context.Context) (DbfsStorageInfo, bool) { return e, false } var v []DbfsStorageInfo - d := o.Dbfs.ElementsAs(ctx, &v, true) + d := o.Dbfs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10285,9 +10276,8 @@ func (o *InitScriptInfo) GetDbfs(ctx context.Context) (DbfsStorageInfo, bool) { // SetDbfs sets the value of the Dbfs field in InitScriptInfo. func (o *InitScriptInfo) SetDbfs(ctx context.Context, v DbfsStorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbfs"] - o.Dbfs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dbfs = vs } // GetFile returns the value of the File field in InitScriptInfo as @@ -10299,7 +10289,10 @@ func (o *InitScriptInfo) GetFile(ctx context.Context) (LocalFileInfo, bool) { return e, false } var v []LocalFileInfo - d := o.File.ElementsAs(ctx, &v, true) + d := o.File.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10311,9 +10304,8 @@ func (o *InitScriptInfo) GetFile(ctx context.Context) (LocalFileInfo, bool) { // SetFile sets the value of the File field in InitScriptInfo. func (o *InitScriptInfo) SetFile(ctx context.Context, v LocalFileInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] - o.File = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.File = vs } // GetGcs returns the value of the Gcs field in InitScriptInfo as @@ -10325,7 +10317,10 @@ func (o *InitScriptInfo) GetGcs(ctx context.Context) (GcsStorageInfo, bool) { return e, false } var v []GcsStorageInfo - d := o.Gcs.ElementsAs(ctx, &v, true) + d := o.Gcs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10337,9 +10332,8 @@ func (o *InitScriptInfo) GetGcs(ctx context.Context) (GcsStorageInfo, bool) { // SetGcs sets the value of the Gcs field in InitScriptInfo. func (o *InitScriptInfo) SetGcs(ctx context.Context, v GcsStorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcs"] - o.Gcs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Gcs = vs } // GetS3 returns the value of the S3 field in InitScriptInfo as @@ -10351,7 +10345,10 @@ func (o *InitScriptInfo) GetS3(ctx context.Context) (S3StorageInfo, bool) { return e, false } var v []S3StorageInfo - d := o.S3.ElementsAs(ctx, &v, true) + d := o.S3.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10363,9 +10360,8 @@ func (o *InitScriptInfo) GetS3(ctx context.Context) (S3StorageInfo, bool) { // SetS3 sets the value of the S3 field in InitScriptInfo. func (o *InitScriptInfo) SetS3(ctx context.Context, v S3StorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["s3"] - o.S3 = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.S3 = vs } // GetVolumes returns the value of the Volumes field in InitScriptInfo as @@ -10377,7 +10373,10 @@ func (o *InitScriptInfo) GetVolumes(ctx context.Context) (VolumesStorageInfo, bo return e, false } var v []VolumesStorageInfo - d := o.Volumes.ElementsAs(ctx, &v, true) + d := o.Volumes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10389,9 +10388,8 @@ func (o *InitScriptInfo) GetVolumes(ctx context.Context) (VolumesStorageInfo, bo // SetVolumes sets the value of the Volumes field in InitScriptInfo. func (o *InitScriptInfo) SetVolumes(ctx context.Context, v VolumesStorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["volumes"] - o.Volumes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Volumes = vs } // GetWorkspace returns the value of the Workspace field in InitScriptInfo as @@ -10403,7 +10401,10 @@ func (o *InitScriptInfo) GetWorkspace(ctx context.Context) (WorkspaceStorageInfo return e, false } var v []WorkspaceStorageInfo - d := o.Workspace.ElementsAs(ctx, &v, true) + d := o.Workspace.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10415,16 +10416,15 @@ func (o *InitScriptInfo) GetWorkspace(ctx context.Context) (WorkspaceStorageInfo // SetWorkspace sets the value of the Workspace field in InitScriptInfo. func (o *InitScriptInfo) SetWorkspace(ctx context.Context, v WorkspaceStorageInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workspace"] - o.Workspace = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Workspace = vs } type InitScriptInfoAndExecutionDetails struct { // Details about the script - ExecutionDetails types.List `tfsdk:"execution_details" tf:"optional,object"` + ExecutionDetails types.Object `tfsdk:"execution_details" tf:"optional,object"` // The script - Script types.List `tfsdk:"script" tf:"optional,object"` + Script types.Object `tfsdk:"script" tf:"optional,object"` } func (newState *InitScriptInfoAndExecutionDetails) SyncEffectiveFieldsDuringCreateOrUpdate(plan InitScriptInfoAndExecutionDetails) { @@ -10463,12 +10463,8 @@ func (o InitScriptInfoAndExecutionDetails) ToObjectValue(ctx context.Context) ba func (o InitScriptInfoAndExecutionDetails) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "execution_details": basetypes.ListType{ - ElemType: InitScriptExecutionDetails{}.Type(ctx), - }, - "script": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), - }, + "execution_details": InitScriptExecutionDetails{}.Type(ctx), + "script": InitScriptInfo{}.Type(ctx), }, } } @@ -10482,7 +10478,10 @@ func (o *InitScriptInfoAndExecutionDetails) GetExecutionDetails(ctx context.Cont return e, false } var v []InitScriptExecutionDetails - d := o.ExecutionDetails.ElementsAs(ctx, &v, true) + d := o.ExecutionDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10494,9 +10493,8 @@ func (o *InitScriptInfoAndExecutionDetails) GetExecutionDetails(ctx context.Cont // SetExecutionDetails sets the value of the ExecutionDetails field in InitScriptInfoAndExecutionDetails. func (o *InitScriptInfoAndExecutionDetails) SetExecutionDetails(ctx context.Context, v InitScriptExecutionDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["execution_details"] - o.ExecutionDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExecutionDetails = vs } // GetScript returns the value of the Script field in InitScriptInfoAndExecutionDetails as @@ -10508,7 +10506,10 @@ func (o *InitScriptInfoAndExecutionDetails) GetScript(ctx context.Context) (Init return e, false } var v []InitScriptInfo - d := o.Script.ElementsAs(ctx, &v, true) + d := o.Script.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10520,9 +10521,8 @@ func (o *InitScriptInfoAndExecutionDetails) GetScript(ctx context.Context) (Init // SetScript sets the value of the Script field in InitScriptInfoAndExecutionDetails. func (o *InitScriptInfoAndExecutionDetails) SetScript(ctx context.Context, v InitScriptInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["script"] - o.Script = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Script = vs } type InstallLibraries struct { @@ -10782,10 +10782,10 @@ func (o *InstancePoolAccessControlResponse) SetAllPermissions(ctx context.Contex type InstancePoolAndStats struct { // Attributes related to instance pools running on Amazon Web Services. If // not specified at pool creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to instance pools running on Azure. If not specified // at pool creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // Additional tags for pool resources. Databricks will tag all pool // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -10805,7 +10805,7 @@ type InstancePoolAndStats struct { DefaultTags types.Map `tfsdk:"default_tags" tf:"optional"` // Defines the specification of the disks that will be attached to all spark // containers. - DiskSpec types.List `tfsdk:"disk_spec" tf:"optional,object"` + DiskSpec types.Object `tfsdk:"disk_spec" tf:"optional,object"` // Autoscaling Local Storage: when enabled, this instances in this pool will // dynamically acquire additional disk space when its Spark workers are // running low on disk space. In AWS, this feature requires specific AWS @@ -10814,7 +10814,7 @@ type InstancePoolAndStats struct { EnableElasticDisk types.Bool `tfsdk:"enable_elastic_disk" tf:"optional"` // Attributes related to instance pools running on Google Cloud Platform. If // not specified at pool creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // Automatically terminates the extra instances in the pool cache after they // are inactive for this time in minutes if min_idle_instances requirement // is already met. If not set, the extra pool instances will be @@ -10850,9 +10850,9 @@ type InstancePoolAndStats struct { // Current state of the instance pool. State types.String `tfsdk:"state" tf:"optional"` // Usage statistics about the instance pool. - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"optional,object"` // Status of failed pending instances in the pool. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` } func (newState *InstancePoolAndStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstancePoolAndStats) { @@ -10915,25 +10915,17 @@ func (o InstancePoolAndStats) ToObjectValue(ctx context.Context) basetypes.Objec func (o InstancePoolAndStats) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), - }, + "aws_attributes": InstancePoolAwsAttributes{}.Type(ctx), + "azure_attributes": InstancePoolAzureAttributes{}.Type(ctx), "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, "default_tags": basetypes.MapType{ ElemType: types.StringType, }, - "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), - }, - "enable_elastic_disk": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), - }, + "disk_spec": DiskSpec{}.Type(ctx), + "enable_elastic_disk": types.BoolType, + "gcp_attributes": InstancePoolGcpAttributes{}.Type(ctx), "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_id": types.StringType, "instance_pool_name": types.StringType, @@ -10946,13 +10938,9 @@ func (o InstancePoolAndStats) Type(ctx context.Context) attr.Type { "preloaded_spark_versions": basetypes.ListType{ ElemType: types.StringType, }, - "state": types.StringType, - "stats": basetypes.ListType{ - ElemType: InstancePoolStats{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: InstancePoolStatus{}.Type(ctx), - }, + "state": types.StringType, + "stats": InstancePoolStats{}.Type(ctx), + "status": InstancePoolStatus{}.Type(ctx), }, } } @@ -10966,7 +10954,10 @@ func (o *InstancePoolAndStats) GetAwsAttributes(ctx context.Context) (InstancePo return e, false } var v []InstancePoolAwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10978,9 +10969,8 @@ func (o *InstancePoolAndStats) GetAwsAttributes(ctx context.Context) (InstancePo // SetAwsAttributes sets the value of the AwsAttributes field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetAwsAttributes(ctx context.Context, v InstancePoolAwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in InstancePoolAndStats as @@ -10992,7 +10982,10 @@ func (o *InstancePoolAndStats) GetAzureAttributes(ctx context.Context) (Instance return e, false } var v []InstancePoolAzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11004,9 +10997,8 @@ func (o *InstancePoolAndStats) GetAzureAttributes(ctx context.Context) (Instance // SetAzureAttributes sets the value of the AzureAttributes field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetAzureAttributes(ctx context.Context, v InstancePoolAzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetCustomTags returns the value of the CustomTags field in InstancePoolAndStats as @@ -11070,7 +11062,10 @@ func (o *InstancePoolAndStats) GetDiskSpec(ctx context.Context) (DiskSpec, bool) return e, false } var v []DiskSpec - d := o.DiskSpec.ElementsAs(ctx, &v, true) + d := o.DiskSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11082,9 +11077,8 @@ func (o *InstancePoolAndStats) GetDiskSpec(ctx context.Context) (DiskSpec, bool) // SetDiskSpec sets the value of the DiskSpec field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetDiskSpec(ctx context.Context, v DiskSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disk_spec"] - o.DiskSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DiskSpec = vs } // GetGcpAttributes returns the value of the GcpAttributes field in InstancePoolAndStats as @@ -11096,7 +11090,10 @@ func (o *InstancePoolAndStats) GetGcpAttributes(ctx context.Context) (InstancePo return e, false } var v []InstancePoolGcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11108,9 +11105,8 @@ func (o *InstancePoolAndStats) GetGcpAttributes(ctx context.Context) (InstancePo // SetGcpAttributes sets the value of the GcpAttributes field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetGcpAttributes(ctx context.Context, v InstancePoolGcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetPreloadedDockerImages returns the value of the PreloadedDockerImages field in InstancePoolAndStats as @@ -11174,7 +11170,10 @@ func (o *InstancePoolAndStats) GetStats(ctx context.Context) (InstancePoolStats, return e, false } var v []InstancePoolStats - d := o.Stats.ElementsAs(ctx, &v, true) + d := o.Stats.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11186,9 +11185,8 @@ func (o *InstancePoolAndStats) GetStats(ctx context.Context) (InstancePoolStats, // SetStats sets the value of the Stats field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetStats(ctx context.Context, v InstancePoolStats) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] - o.Stats = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Stats = vs } // GetStatus returns the value of the Status field in InstancePoolAndStats as @@ -11200,7 +11198,10 @@ func (o *InstancePoolAndStats) GetStatus(ctx context.Context) (InstancePoolStatu return e, false } var v []InstancePoolStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11212,9 +11213,8 @@ func (o *InstancePoolAndStats) GetStatus(ctx context.Context) (InstancePoolStatu // SetStatus sets the value of the Status field in InstancePoolAndStats. func (o *InstancePoolAndStats) SetStatus(ctx context.Context, v InstancePoolStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } type InstancePoolAwsAttributes struct { @@ -11883,7 +11883,7 @@ func (o InstanceProfile) Type(ctx context.Context) attr.Type { type Library struct { // Specification of a CRAN library to be installed as part of the library - Cran types.List `tfsdk:"cran" tf:"optional,object"` + Cran types.Object `tfsdk:"cran" tf:"optional,object"` // Deprecated. URI of the egg library to install. Installing Python egg // files is deprecated and is not supported in Databricks Runtime 14.0 and // above. @@ -11898,10 +11898,10 @@ type Library struct { Jar types.String `tfsdk:"jar" tf:"optional"` // Specification of a maven library to be installed. For example: `{ // "coordinates": "org.jsoup:jsoup:1.7.2" }` - Maven types.List `tfsdk:"maven" tf:"optional,object"` + Maven types.Object `tfsdk:"maven" tf:"optional,object"` // Specification of a PyPi library to be installed. For example: `{ // "package": "simplejson" }` - Pypi types.List `tfsdk:"pypi" tf:"optional,object"` + Pypi types.Object `tfsdk:"pypi" tf:"optional,object"` // URI of the requirements.txt file to install. Only Workspace paths and // Unity Catalog Volumes paths are supported. For example: `{ // "requirements": "/Workspace/path/to/requirements.txt" }` or `{ @@ -11959,17 +11959,11 @@ func (o Library) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Library) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cran": basetypes.ListType{ - ElemType: RCranLibrary{}.Type(ctx), - }, - "egg": types.StringType, - "jar": types.StringType, - "maven": basetypes.ListType{ - ElemType: MavenLibrary{}.Type(ctx), - }, - "pypi": basetypes.ListType{ - ElemType: PythonPyPiLibrary{}.Type(ctx), - }, + "cran": RCranLibrary{}.Type(ctx), + "egg": types.StringType, + "jar": types.StringType, + "maven": MavenLibrary{}.Type(ctx), + "pypi": PythonPyPiLibrary{}.Type(ctx), "requirements": types.StringType, "whl": types.StringType, }, @@ -11985,7 +11979,10 @@ func (o *Library) GetCran(ctx context.Context) (RCranLibrary, bool) { return e, false } var v []RCranLibrary - d := o.Cran.ElementsAs(ctx, &v, true) + d := o.Cran.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11997,9 +11994,8 @@ func (o *Library) GetCran(ctx context.Context) (RCranLibrary, bool) { // SetCran sets the value of the Cran field in Library. func (o *Library) SetCran(ctx context.Context, v RCranLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cran"] - o.Cran = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Cran = vs } // GetMaven returns the value of the Maven field in Library as @@ -12011,7 +12007,10 @@ func (o *Library) GetMaven(ctx context.Context) (MavenLibrary, bool) { return e, false } var v []MavenLibrary - d := o.Maven.ElementsAs(ctx, &v, true) + d := o.Maven.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12023,9 +12022,8 @@ func (o *Library) GetMaven(ctx context.Context) (MavenLibrary, bool) { // SetMaven sets the value of the Maven field in Library. func (o *Library) SetMaven(ctx context.Context, v MavenLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maven"] - o.Maven = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Maven = vs } // GetPypi returns the value of the Pypi field in Library as @@ -12037,7 +12035,10 @@ func (o *Library) GetPypi(ctx context.Context) (PythonPyPiLibrary, bool) { return e, false } var v []PythonPyPiLibrary - d := o.Pypi.ElementsAs(ctx, &v, true) + d := o.Pypi.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12049,9 +12050,8 @@ func (o *Library) GetPypi(ctx context.Context) (PythonPyPiLibrary, bool) { // SetPypi sets the value of the Pypi field in Library. func (o *Library) SetPypi(ctx context.Context, v PythonPyPiLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pypi"] - o.Pypi = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Pypi = vs } // The status of the library on a specific cluster. @@ -12060,7 +12060,7 @@ type LibraryFullStatus struct { // libraries UI. IsLibraryForAllClusters types.Bool `tfsdk:"is_library_for_all_clusters" tf:"optional"` // Unique identifier for the library. - Library types.List `tfsdk:"library" tf:"optional,object"` + Library types.Object `tfsdk:"library" tf:"optional,object"` // All the info and warning messages that have occurred so far for this // library. Messages types.List `tfsdk:"messages" tf:"optional"` @@ -12107,9 +12107,7 @@ func (o LibraryFullStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "is_library_for_all_clusters": types.BoolType, - "library": basetypes.ListType{ - ElemType: Library{}.Type(ctx), - }, + "library": Library{}.Type(ctx), "messages": basetypes.ListType{ ElemType: types.StringType, }, @@ -12127,7 +12125,10 @@ func (o *LibraryFullStatus) GetLibrary(ctx context.Context) (Library, bool) { return e, false } var v []Library - d := o.Library.ElementsAs(ctx, &v, true) + d := o.Library.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12139,9 +12140,8 @@ func (o *LibraryFullStatus) GetLibrary(ctx context.Context) (Library, bool) { // SetLibrary sets the value of the Library field in LibraryFullStatus. func (o *LibraryFullStatus) SetLibrary(ctx context.Context, v Library) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["library"] - o.Library = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Library = vs } // GetMessages returns the value of the Messages field in LibraryFullStatus as @@ -12622,7 +12622,7 @@ func (o *ListClustersFilterBy) SetClusterStates(ctx context.Context, v []types.S // List clusters type ListClustersRequest struct { // Filters to apply to the list of clusters. - FilterBy types.List `tfsdk:"-"` + FilterBy types.Object `tfsdk:"-"` // Use this field to specify the maximum number of results to be returned by // the server. The server may further constrain the maximum number of // results returned in a single page. @@ -12631,7 +12631,7 @@ type ListClustersRequest struct { // to list the next or previous page of clusters respectively. PageToken types.String `tfsdk:"-"` // Sort the list of clusters by a specific criteria. - SortBy types.List `tfsdk:"-"` + SortBy types.Object `tfsdk:"-"` } func (newState *ListClustersRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListClustersRequest) { @@ -12672,14 +12672,10 @@ func (o ListClustersRequest) ToObjectValue(ctx context.Context) basetypes.Object func (o ListClustersRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "filter_by": basetypes.ListType{ - ElemType: ListClustersFilterBy{}.Type(ctx), - }, + "filter_by": ListClustersFilterBy{}.Type(ctx), "page_size": types.Int64Type, "page_token": types.StringType, - "sort_by": basetypes.ListType{ - ElemType: ListClustersSortBy{}.Type(ctx), - }, + "sort_by": ListClustersSortBy{}.Type(ctx), }, } } @@ -12693,7 +12689,10 @@ func (o *ListClustersRequest) GetFilterBy(ctx context.Context) (ListClustersFilt return e, false } var v []ListClustersFilterBy - d := o.FilterBy.ElementsAs(ctx, &v, true) + d := o.FilterBy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12705,9 +12704,8 @@ func (o *ListClustersRequest) GetFilterBy(ctx context.Context) (ListClustersFilt // SetFilterBy sets the value of the FilterBy field in ListClustersRequest. func (o *ListClustersRequest) SetFilterBy(ctx context.Context, v ListClustersFilterBy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter_by"] - o.FilterBy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FilterBy = vs } // GetSortBy returns the value of the SortBy field in ListClustersRequest as @@ -12719,7 +12717,10 @@ func (o *ListClustersRequest) GetSortBy(ctx context.Context) (ListClustersSortBy return e, false } var v []ListClustersSortBy - d := o.SortBy.ElementsAs(ctx, &v, true) + d := o.SortBy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12731,9 +12732,8 @@ func (o *ListClustersRequest) GetSortBy(ctx context.Context) (ListClustersSortBy // SetSortBy sets the value of the SortBy field in ListClustersRequest. func (o *ListClustersRequest) SetSortBy(ctx context.Context, v ListClustersSortBy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sort_by"] - o.SortBy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SortBy = vs } type ListClustersResponse struct { @@ -13651,9 +13651,9 @@ type NodeType struct { // Memory (in MB) available for this node type. MemoryMb types.Int64 `tfsdk:"memory_mb" tf:""` - NodeInfo types.List `tfsdk:"node_info" tf:"optional,object"` + NodeInfo types.Object `tfsdk:"node_info" tf:"optional,object"` - NodeInstanceType types.List `tfsdk:"node_instance_type" tf:"optional,object"` + NodeInstanceType types.Object `tfsdk:"node_instance_type" tf:"optional,object"` // Unique identifier for this node type. NodeTypeId types.String `tfsdk:"node_type_id" tf:""` // Number of CPU cores available for this node type. Note that this can be @@ -13742,12 +13742,8 @@ func (o NodeType) Type(ctx context.Context) attr.Type { "is_hidden": types.BoolType, "is_io_cache_enabled": types.BoolType, "memory_mb": types.Int64Type, - "node_info": basetypes.ListType{ - ElemType: CloudProviderNodeInfo{}.Type(ctx), - }, - "node_instance_type": basetypes.ListType{ - ElemType: NodeInstanceType{}.Type(ctx), - }, + "node_info": CloudProviderNodeInfo{}.Type(ctx), + "node_instance_type": NodeInstanceType{}.Type(ctx), "node_type_id": types.StringType, "num_cores": types.Float64Type, "num_gpus": types.Int64Type, @@ -13770,7 +13766,10 @@ func (o *NodeType) GetNodeInfo(ctx context.Context) (CloudProviderNodeInfo, bool return e, false } var v []CloudProviderNodeInfo - d := o.NodeInfo.ElementsAs(ctx, &v, true) + d := o.NodeInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13782,9 +13781,8 @@ func (o *NodeType) GetNodeInfo(ctx context.Context) (CloudProviderNodeInfo, bool // SetNodeInfo sets the value of the NodeInfo field in NodeType. func (o *NodeType) SetNodeInfo(ctx context.Context, v CloudProviderNodeInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_info"] - o.NodeInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NodeInfo = vs } // GetNodeInstanceType returns the value of the NodeInstanceType field in NodeType as @@ -13796,7 +13794,10 @@ func (o *NodeType) GetNodeInstanceType(ctx context.Context) (NodeInstanceType, b return e, false } var v []NodeInstanceType - d := o.NodeInstanceType.ElementsAs(ctx, &v, true) + d := o.NodeInstanceType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13808,9 +13809,8 @@ func (o *NodeType) GetNodeInstanceType(ctx context.Context) (NodeInstanceType, b // SetNodeInstanceType sets the value of the NodeInstanceType field in NodeType. func (o *NodeType) SetNodeInstanceType(ctx context.Context, v NodeInstanceType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_instance_type"] - o.NodeInstanceType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NodeInstanceType = vs } type PendingInstanceError struct { @@ -14385,7 +14385,7 @@ type ResizeCluster struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // The cluster to be resized. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Number of worker nodes that this cluster should have. A cluster has one @@ -14437,9 +14437,7 @@ func (o ResizeCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o ResizeCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, + "autoscale": AutoScale{}.Type(ctx), "cluster_id": types.StringType, "num_workers": types.Int64Type, }, @@ -14455,7 +14453,10 @@ func (o *ResizeCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14467,9 +14468,8 @@ func (o *ResizeCluster) GetAutoscale(ctx context.Context) (AutoScale, bool) { // SetAutoscale sets the value of the Autoscale field in ResizeCluster. func (o *ResizeCluster) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } type ResizeClusterResponse struct { @@ -14818,7 +14818,7 @@ type SparkNode struct { // Globally unique identifier for the host instance from the cloud provider. InstanceId types.String `tfsdk:"instance_id" tf:"optional"` // Attributes specific to AWS for a Spark node. - NodeAwsAttributes types.List `tfsdk:"node_aws_attributes" tf:"optional,object"` + NodeAwsAttributes types.Object `tfsdk:"node_aws_attributes" tf:"optional,object"` // Globally unique identifier for this node. NodeId types.String `tfsdk:"node_id" tf:"optional"` // Private IP address (typically a 10.x.x.x address) of the Spark node. Note @@ -14880,15 +14880,13 @@ func (o SparkNode) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SparkNode) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "host_private_ip": types.StringType, - "instance_id": types.StringType, - "node_aws_attributes": basetypes.ListType{ - ElemType: SparkNodeAwsAttributes{}.Type(ctx), - }, - "node_id": types.StringType, - "private_ip": types.StringType, - "public_dns": types.StringType, - "start_timestamp": types.Int64Type, + "host_private_ip": types.StringType, + "instance_id": types.StringType, + "node_aws_attributes": SparkNodeAwsAttributes{}.Type(ctx), + "node_id": types.StringType, + "private_ip": types.StringType, + "public_dns": types.StringType, + "start_timestamp": types.Int64Type, }, } } @@ -14902,7 +14900,10 @@ func (o *SparkNode) GetNodeAwsAttributes(ctx context.Context) (SparkNodeAwsAttri return e, false } var v []SparkNodeAwsAttributes - d := o.NodeAwsAttributes.ElementsAs(ctx, &v, true) + d := o.NodeAwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14914,9 +14915,8 @@ func (o *SparkNode) GetNodeAwsAttributes(ctx context.Context) (SparkNodeAwsAttri // SetNodeAwsAttributes sets the value of the NodeAwsAttributes field in SparkNode. func (o *SparkNode) SetNodeAwsAttributes(ctx context.Context, v SparkNodeAwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["node_aws_attributes"] - o.NodeAwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NodeAwsAttributes = vs } type SparkNodeAwsAttributes struct { @@ -15362,7 +15362,7 @@ func (o UnpinClusterResponse) Type(ctx context.Context) attr.Type { type UpdateCluster struct { // The cluster to be updated. - Cluster types.List `tfsdk:"cluster" tf:"optional,object"` + Cluster types.Object `tfsdk:"cluster" tf:"optional,object"` // ID of the cluster. ClusterId types.String `tfsdk:"cluster_id" tf:""` // Specifies which fields of the cluster will be updated. This is required @@ -15409,9 +15409,7 @@ func (o UpdateCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o UpdateCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cluster": basetypes.ListType{ - ElemType: UpdateClusterResource{}.Type(ctx), - }, + "cluster": UpdateClusterResource{}.Type(ctx), "cluster_id": types.StringType, "update_mask": types.StringType, }, @@ -15427,7 +15425,10 @@ func (o *UpdateCluster) GetCluster(ctx context.Context) (UpdateClusterResource, return e, false } var v []UpdateClusterResource - d := o.Cluster.ElementsAs(ctx, &v, true) + d := o.Cluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15439,16 +15440,15 @@ func (o *UpdateCluster) GetCluster(ctx context.Context) (UpdateClusterResource, // SetCluster sets the value of the Cluster field in UpdateCluster. func (o *UpdateCluster) SetCluster(ctx context.Context, v UpdateClusterResource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster"] - o.Cluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Cluster = vs } type UpdateClusterResource struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Automatically terminates the cluster after it is inactive for this time // in minutes. If not set, this cluster will not be automatically // terminated. If specified, the threshold must be between 10 and 10000 @@ -15457,17 +15457,17 @@ type UpdateClusterResource struct { AutoterminationMinutes types.Int64 `tfsdk:"autotermination_minutes" tf:"optional"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // The configuration for delivering spark logs to a long-term storage // destination. Two kinds of destinations (dbfs and s3) are supported. Only // one destination can be specified for one cluster. If the conf is given, // the logs will be delivered to the destination every `5 mins`. The // destination of driver logs is `$destination/$clusterId/driver`, while the // destination of executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Cluster name requested by the user. This doesn't have to be unique. If // not specified at creation, the cluster name will be an empty string. ClusterName types.String `tfsdk:"cluster_name" tf:"optional"` @@ -15504,7 +15504,7 @@ type UpdateClusterResource struct { // mode provides a way that doesn’t have UC nor passthrough enabled. DataSecurityMode types.String `tfsdk:"data_security_mode" tf:"optional"` - DockerImage types.List `tfsdk:"docker_image" tf:"optional,object"` + DockerImage types.Object `tfsdk:"docker_image" tf:"optional,object"` // The optional ID of the instance pool for the driver of the cluster // belongs. The pool cluster uses the instance pool with id // (instance_pool_id) if the driver pool is not assigned. @@ -15522,7 +15522,7 @@ type UpdateClusterResource struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -15589,7 +15589,7 @@ type UpdateClusterResource struct { // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` - WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` + WorkloadType types.Object `tfsdk:"workload_type" tf:"optional,object"` } func (newState *UpdateClusterResource) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateClusterResource) { @@ -15662,34 +15662,22 @@ func (o UpdateClusterResource) ToObjectValue(ctx context.Context) basetypes.Obje func (o UpdateClusterResource) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), - }, + "autoscale": AutoScale{}.Type(ctx), "autotermination_minutes": types.Int64Type, - "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), - }, - "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), - }, - "cluster_name": types.StringType, + "aws_attributes": AwsAttributes{}.Type(ctx), + "azure_attributes": AzureAttributes{}.Type(ctx), + "cluster_log_conf": ClusterLogConf{}.Type(ctx), + "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "data_security_mode": types.StringType, - "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), - }, + "data_security_mode": types.StringType, + "docker_image": DockerImage{}.Type(ctx), "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: InitScriptInfo{}.Type(ctx), }, @@ -15709,9 +15697,7 @@ func (o UpdateClusterResource) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -15725,7 +15711,10 @@ func (o *UpdateClusterResource) GetAutoscale(ctx context.Context) (AutoScale, bo return e, false } var v []AutoScale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15737,9 +15726,8 @@ func (o *UpdateClusterResource) GetAutoscale(ctx context.Context) (AutoScale, bo // SetAutoscale sets the value of the Autoscale field in UpdateClusterResource. func (o *UpdateClusterResource) SetAutoscale(ctx context.Context, v AutoScale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in UpdateClusterResource as @@ -15751,7 +15739,10 @@ func (o *UpdateClusterResource) GetAwsAttributes(ctx context.Context) (AwsAttrib return e, false } var v []AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15763,9 +15754,8 @@ func (o *UpdateClusterResource) GetAwsAttributes(ctx context.Context) (AwsAttrib // SetAwsAttributes sets the value of the AwsAttributes field in UpdateClusterResource. func (o *UpdateClusterResource) SetAwsAttributes(ctx context.Context, v AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in UpdateClusterResource as @@ -15777,7 +15767,10 @@ func (o *UpdateClusterResource) GetAzureAttributes(ctx context.Context) (AzureAt return e, false } var v []AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15789,9 +15782,8 @@ func (o *UpdateClusterResource) GetAzureAttributes(ctx context.Context) (AzureAt // SetAzureAttributes sets the value of the AzureAttributes field in UpdateClusterResource. func (o *UpdateClusterResource) SetAzureAttributes(ctx context.Context, v AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in UpdateClusterResource as @@ -15803,7 +15795,10 @@ func (o *UpdateClusterResource) GetClusterLogConf(ctx context.Context) (ClusterL return e, false } var v []ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15815,9 +15810,8 @@ func (o *UpdateClusterResource) GetClusterLogConf(ctx context.Context) (ClusterL // SetClusterLogConf sets the value of the ClusterLogConf field in UpdateClusterResource. func (o *UpdateClusterResource) SetClusterLogConf(ctx context.Context, v ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in UpdateClusterResource as @@ -15855,7 +15849,10 @@ func (o *UpdateClusterResource) GetDockerImage(ctx context.Context) (DockerImage return e, false } var v []DockerImage - d := o.DockerImage.ElementsAs(ctx, &v, true) + d := o.DockerImage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15867,9 +15864,8 @@ func (o *UpdateClusterResource) GetDockerImage(ctx context.Context) (DockerImage // SetDockerImage sets the value of the DockerImage field in UpdateClusterResource. func (o *UpdateClusterResource) SetDockerImage(ctx context.Context, v DockerImage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["docker_image"] - o.DockerImage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DockerImage = vs } // GetGcpAttributes returns the value of the GcpAttributes field in UpdateClusterResource as @@ -15881,7 +15877,10 @@ func (o *UpdateClusterResource) GetGcpAttributes(ctx context.Context) (GcpAttrib return e, false } var v []GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15893,9 +15892,8 @@ func (o *UpdateClusterResource) GetGcpAttributes(ctx context.Context) (GcpAttrib // SetGcpAttributes sets the value of the GcpAttributes field in UpdateClusterResource. func (o *UpdateClusterResource) SetGcpAttributes(ctx context.Context, v GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in UpdateClusterResource as @@ -16011,7 +16009,10 @@ func (o *UpdateClusterResource) GetWorkloadType(ctx context.Context) (WorkloadTy return e, false } var v []WorkloadType - d := o.WorkloadType.ElementsAs(ctx, &v, true) + d := o.WorkloadType.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16023,9 +16024,8 @@ func (o *UpdateClusterResource) GetWorkloadType(ctx context.Context) (WorkloadTy // SetWorkloadType sets the value of the WorkloadType field in UpdateClusterResource. func (o *UpdateClusterResource) SetWorkloadType(ctx context.Context, v WorkloadType) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["workload_type"] - o.WorkloadType = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WorkloadType = vs } type UpdateClusterResponse struct { @@ -16144,7 +16144,7 @@ func (o VolumesStorageInfo) Type(ctx context.Context) attr.Type { type WorkloadType struct { // defined what type of clients can use the cluster. E.g. Notebooks, Jobs - Clients types.List `tfsdk:"clients" tf:"object"` + Clients types.Object `tfsdk:"clients" tf:"object"` } func (newState *WorkloadType) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkloadType) { @@ -16181,9 +16181,7 @@ func (o WorkloadType) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o WorkloadType) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "clients": basetypes.ListType{ - ElemType: ClientsTypes{}.Type(ctx), - }, + "clients": ClientsTypes{}.Type(ctx), }, } } @@ -16197,7 +16195,10 @@ func (o *WorkloadType) GetClients(ctx context.Context) (ClientsTypes, bool) { return e, false } var v []ClientsTypes - d := o.Clients.ElementsAs(ctx, &v, true) + d := o.Clients.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16209,9 +16210,8 @@ func (o *WorkloadType) GetClients(ctx context.Context) (ClientsTypes, bool) { // SetClients sets the value of the Clients field in WorkloadType. func (o *WorkloadType) SetClients(ctx context.Context, v ClientsTypes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clients"] - o.Clients = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Clients = vs } type WorkspaceStorageInfo struct { diff --git a/internal/service/dashboards_tf/legacy_model.go b/internal/service/dashboards_tf/legacy_model.go new file mode 100755 index 000000000..13e604f40 --- /dev/null +++ b/internal/service/dashboards_tf/legacy_model.go @@ -0,0 +1,3194 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package dashboards_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/sql_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +// Create dashboard +type CreateDashboardRequest_SdkV2 struct { + Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` +} + +func (newState *CreateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDashboardRequest_SdkV2) { +} + +func (newState *CreateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateDashboardRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dashboard": reflect.TypeOf(Dashboard_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, CreateDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard": o.Dashboard, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard": basetypes.ListType{ + ElemType: Dashboard{}.Type(ctx), + }, + }, + } +} + +// GetDashboard returns the value of the Dashboard field in CreateDashboardRequest_SdkV2 as +// a Dashboard_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateDashboardRequest_SdkV2) GetDashboard(ctx context.Context) (Dashboard_SdkV2, bool) { + var e Dashboard_SdkV2 + if o.Dashboard.IsNull() || o.Dashboard.IsUnknown() { + return e, false + } + var v []Dashboard_SdkV2 + d := o.Dashboard.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDashboard sets the value of the Dashboard field in CreateDashboardRequest_SdkV2. +func (o *CreateDashboardRequest_SdkV2) SetDashboard(ctx context.Context, v Dashboard_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] + o.Dashboard = types.ListValueMust(t, vs) +} + +// Create dashboard schedule +type CreateScheduleRequest_SdkV2 struct { + // UUID identifying the dashboard to which the schedule belongs. + DashboardId types.String `tfsdk:"-"` + + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` +} + +func (newState *CreateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScheduleRequest_SdkV2) { +} + +func (newState *CreateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScheduleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScheduleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateScheduleRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "schedule": reflect.TypeOf(Schedule_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, CreateScheduleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateScheduleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule": o.Schedule, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "schedule": basetypes.ListType{ + ElemType: Schedule{}.Type(ctx), + }, + }, + } +} + +// GetSchedule returns the value of the Schedule field in CreateScheduleRequest_SdkV2 as +// a Schedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateScheduleRequest_SdkV2) GetSchedule(ctx context.Context) (Schedule_SdkV2, bool) { + var e Schedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []Schedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in CreateScheduleRequest_SdkV2. +func (o *CreateScheduleRequest_SdkV2) SetSchedule(ctx context.Context, v Schedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// Create schedule subscription +type CreateSubscriptionRequest_SdkV2 struct { + // UUID identifying the dashboard to which the subscription belongs. + DashboardId types.String `tfsdk:"-"` + // UUID identifying the schedule to which the subscription belongs. + ScheduleId types.String `tfsdk:"-"` + + Subscription types.List `tfsdk:"subscription" tf:"optional,object"` +} + +func (newState *CreateSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSubscriptionRequest_SdkV2) { +} + +func (newState *CreateSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateSubscriptionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateSubscriptionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateSubscriptionRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscription": reflect.TypeOf(Subscription_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, CreateSubscriptionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateSubscriptionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + "subscription": o.Subscription, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "schedule_id": types.StringType, + "subscription": basetypes.ListType{ + ElemType: Subscription{}.Type(ctx), + }, + }, + } +} + +// GetSubscription returns the value of the Subscription field in CreateSubscriptionRequest_SdkV2 as +// a Subscription_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateSubscriptionRequest_SdkV2) GetSubscription(ctx context.Context) (Subscription_SdkV2, bool) { + var e Subscription_SdkV2 + if o.Subscription.IsNull() || o.Subscription.IsUnknown() { + return e, false + } + var v []Subscription_SdkV2 + d := o.Subscription.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSubscription sets the value of the Subscription field in CreateSubscriptionRequest_SdkV2. +func (o *CreateSubscriptionRequest_SdkV2) SetSubscription(ctx context.Context, v Subscription_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["subscription"] + o.Subscription = types.ListValueMust(t, vs) +} + +type CronSchedule_SdkV2 struct { + // A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents + // everyday at 8am. See [Cron Trigger] for details. + // + // [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html + QuartzCronExpression types.String `tfsdk:"quartz_cron_expression" tf:""` + // A Java timezone id. The schedule will be resolved with respect to this + // timezone. See [Java TimeZone] for details. + // + // [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html + TimezoneId types.String `tfsdk:"timezone_id" tf:""` +} + +func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronSchedule_SdkV2) { +} + +func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronSchedule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CronSchedule_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, CronSchedule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CronSchedule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CronSchedule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "quartz_cron_expression": types.StringType, + "timezone_id": types.StringType, + }, + } +} + +type Dashboard_SdkV2 struct { + // The timestamp of when the dashboard was created. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // UUID identifying the dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + // The display name of the dashboard. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The etag for the dashboard. Can be optionally provided on updates to + // ensure that the dashboard has not been modified since the last read. This + // field is excluded in List Dashboards responses. + Etag types.String `tfsdk:"etag" tf:"computed"` + // The state of the dashboard resource. Used for tracking trashed status. + LifecycleState types.String `tfsdk:"lifecycle_state" tf:"computed"` + // The workspace path of the folder containing the dashboard. Includes + // leading slash and no trailing slash. This field is excluded in List + // Dashboards responses. + ParentPath types.String `tfsdk:"parent_path" tf:"computed"` + // The workspace path of the dashboard asset, including the file name. + // Exported dashboards always have the file extension `.lvdash.json`. This + // field is excluded in List Dashboards responses. + Path types.String `tfsdk:"path" tf:"computed"` + // The contents of the dashboard in serialized string form. This field is + // excluded in List Dashboards responses. Use the [get dashboard API] to + // retrieve an example response, which includes the `serialized_dashboard` + // field. This field provides the structure of the JSON string that + // represents the dashboard's layout and components. + // + // [get dashboard API]: https://docs.databricks.com/api/workspace/lakeview/get + SerializedDashboard types.String `tfsdk:"serialized_dashboard" tf:"optional"` + // The timestamp of when the dashboard was last updated by the user. This + // field is excluded in List Dashboards responses. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + // The warehouse ID used to run the dashboard. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard_SdkV2) { +} + +func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dashboard_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Dashboard_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, Dashboard_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Dashboard_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "dashboard_id": o.DashboardId, + "display_name": o.DisplayName, + "etag": o.Etag, + "lifecycle_state": o.LifecycleState, + "parent_path": o.ParentPath, + "path": o.Path, + "serialized_dashboard": o.SerializedDashboard, + "update_time": o.UpdateTime, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Dashboard_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "dashboard_id": types.StringType, + "display_name": types.StringType, + "etag": types.StringType, + "lifecycle_state": types.StringType, + "parent_path": types.StringType, + "path": types.StringType, + "serialized_dashboard": types.StringType, + "update_time": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// Delete dashboard schedule +type DeleteScheduleRequest_SdkV2 struct { + // UUID identifying the dashboard to which the schedule belongs. + DashboardId types.String `tfsdk:"-"` + // The etag for the schedule. Optionally, it can be provided to verify that + // the schedule has not been modified from its last retrieval. + Etag types.String `tfsdk:"-"` + // UUID identifying the schedule. + ScheduleId types.String `tfsdk:"-"` +} + +func (newState *DeleteScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleRequest_SdkV2) { +} + +func (newState *DeleteScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteScheduleRequest_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, DeleteScheduleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteScheduleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "etag": o.Etag, + "schedule_id": o.ScheduleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "etag": types.StringType, + "schedule_id": types.StringType, + }, + } +} + +type DeleteScheduleResponse_SdkV2 struct { +} + +func (newState *DeleteScheduleResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScheduleResponse_SdkV2) { +} + +func (newState *DeleteScheduleResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScheduleResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScheduleResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete schedule subscription +type DeleteSubscriptionRequest_SdkV2 struct { + // UUID identifying the dashboard which the subscription belongs. + DashboardId types.String `tfsdk:"-"` + // The etag for the subscription. Can be optionally provided to ensure that + // the subscription has not been modified since the last read. + Etag types.String `tfsdk:"-"` + // UUID identifying the schedule which the subscription belongs. + ScheduleId types.String `tfsdk:"-"` + // UUID identifying the subscription. + SubscriptionId types.String `tfsdk:"-"` +} + +func (newState *DeleteSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionRequest_SdkV2) { +} + +func (newState *DeleteSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteSubscriptionRequest_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, DeleteSubscriptionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteSubscriptionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "etag": o.Etag, + "schedule_id": o.ScheduleId, + "subscription_id": o.SubscriptionId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "etag": types.StringType, + "schedule_id": types.StringType, + "subscription_id": types.StringType, + }, + } +} + +type DeleteSubscriptionResponse_SdkV2 struct { +} + +func (newState *DeleteSubscriptionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSubscriptionResponse_SdkV2) { +} + +func (newState *DeleteSubscriptionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSubscriptionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSubscriptionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 { + Query types.List `tfsdk:"query" tf:"optional,object"` + + Text types.List `tfsdk:"text" tf:"optional,object"` +} + +func (newState *GenieAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieAttachment_SdkV2) { +} + +func (newState *GenieAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieAttachment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieAttachment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieAttachment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query": reflect.TypeOf(QueryAttachment_SdkV2{}), + "text": reflect.TypeOf(TextAttachment_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, GenieAttachment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieAttachment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query": o.Query, + "text": o.Text, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieAttachment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query": basetypes.ListType{ + ElemType: QueryAttachment{}.Type(ctx), + }, + "text": basetypes.ListType{ + ElemType: TextAttachment{}.Type(ctx), + }, + }, + } +} + +// GetQuery returns the value of the Query field in GenieAttachment_SdkV2 as +// a QueryAttachment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieAttachment_SdkV2) GetQuery(ctx context.Context) (QueryAttachment_SdkV2, bool) { + var e QueryAttachment_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []QueryAttachment_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in GenieAttachment_SdkV2. +func (o *GenieAttachment_SdkV2) SetQuery(ctx context.Context, v QueryAttachment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +// GetText returns the value of the Text field in GenieAttachment_SdkV2 as +// a TextAttachment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieAttachment_SdkV2) GetText(ctx context.Context) (TextAttachment_SdkV2, bool) { + var e TextAttachment_SdkV2 + if o.Text.IsNull() || o.Text.IsUnknown() { + return e, false + } + var v []TextAttachment_SdkV2 + d := o.Text.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetText sets the value of the Text field in GenieAttachment_SdkV2. +func (o *GenieAttachment_SdkV2) SetText(ctx context.Context, v TextAttachment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["text"] + o.Text = types.ListValueMust(t, vs) +} + +type GenieConversation_SdkV2 struct { + // Timestamp when the message was created + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + // Conversation ID + Id types.String `tfsdk:"id" tf:""` + // Timestamp when the message was last updated + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Genie space ID + SpaceId types.String `tfsdk:"space_id" tf:""` + // Conversation title + Title types.String `tfsdk:"title" tf:""` + // ID of the user who created the conversation + UserId types.Int64 `tfsdk:"user_id" tf:""` +} + +func (newState *GenieConversation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieConversation_SdkV2) { +} + +func (newState *GenieConversation_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieConversation_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieConversation. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieConversation_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, GenieConversation_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieConversation_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_timestamp": o.CreatedTimestamp, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "space_id": o.SpaceId, + "title": o.Title, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieConversation_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_timestamp": types.Int64Type, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "space_id": types.StringType, + "title": types.StringType, + "user_id": types.Int64Type, + }, + } +} + +type GenieCreateConversationMessageRequest_SdkV2 struct { + // User message content. + Content types.String `tfsdk:"content" tf:""` + // 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:"-"` +} + +func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieCreateConversationMessageRequest_SdkV2) { +} + +func (newState *GenieCreateConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieCreateConversationMessageRequest_SdkV2) { +} + +// 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 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, GenieCreateConversationMessageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieCreateConversationMessageRequest_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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieCreateConversationMessageRequest_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, + }, + } +} + +// Execute SQL query in a conversation message +type GenieExecuteMessageQueryRequest_SdkV2 struct { + // Conversation ID + ConversationId types.String `tfsdk:"-"` + // Message ID + MessageId types.String `tfsdk:"-"` + // Genie space ID + SpaceId types.String `tfsdk:"-"` +} + +func (newState *GenieExecuteMessageQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieExecuteMessageQueryRequest_SdkV2) { +} + +func (newState *GenieExecuteMessageQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieExecuteMessageQueryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieExecuteMessageQueryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 { + 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 +// only implements ToObjectValue() and Type(). +func (o GenieExecuteMessageQueryRequest_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 { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "conversation_id": types.StringType, + "message_id": types.StringType, + "space_id": types.StringType, + }, + } +} + +// Get conversation message +type GenieGetConversationMessageRequest_SdkV2 struct { + // The ID associated with the target conversation. + ConversationId types.String `tfsdk:"-"` + // The ID associated with the target message from the identified + // conversation. + MessageId types.String `tfsdk:"-"` + // The ID associated with the Genie space where the target conversation is + // located. + SpaceId types.String `tfsdk:"-"` +} + +func (newState *GenieGetConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetConversationMessageRequest_SdkV2) { +} + +func (newState *GenieGetConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetConversationMessageRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetConversationMessageRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieGetConversationMessageRequest_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, GenieGetConversationMessageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieGetConversationMessageRequest_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 GenieGetConversationMessageRequest_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, + }, + } +} + +// Get conversation message SQL query result +type GenieGetMessageQueryResultRequest_SdkV2 struct { + // Conversation ID + ConversationId types.String `tfsdk:"-"` + // Message ID + MessageId types.String `tfsdk:"-"` + // Genie space ID + SpaceId types.String `tfsdk:"-"` +} + +func (newState *GenieGetMessageQueryResultRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultRequest_SdkV2) { +} + +func (newState *GenieGetMessageQueryResultRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieGetMessageQueryResultRequest_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, GenieGetMessageQueryResultRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieGetMessageQueryResultRequest_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 GenieGetMessageQueryResultRequest_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 GenieGetMessageQueryResultResponse_SdkV2 struct { + // SQL Statement Execution response. See [Get status, manifest, and result + // first chunk](:method:statementexecution/getstatement) for more details. + StatementResponse types.List `tfsdk:"statement_response" tf:"optional,object"` +} + +func (newState *GenieGetMessageQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultResponse_SdkV2) { +} + +func (newState *GenieGetMessageQueryResultResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieGetMessageQueryResultResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieGetMessageQueryResultResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieGetMessageQueryResultResponse_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, GenieGetMessageQueryResultResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieGetMessageQueryResultResponse_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 GenieGetMessageQueryResultResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "statement_response": basetypes.ListType{ + ElemType: sql_tf.StatementResponse{}.Type(ctx), + }, + }, + } +} + +// GetStatementResponse returns the value of the StatementResponse field in GenieGetMessageQueryResultResponse_SdkV2 as +// a sql_tf.StatementResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieGetMessageQueryResultResponse_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 GenieGetMessageQueryResultResponse_SdkV2. +func (o *GenieGetMessageQueryResultResponse_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 GenieMessage_SdkV2 struct { + // AI produced response to the message + Attachments types.List `tfsdk:"attachments" tf:"optional"` + // User message content + Content types.String `tfsdk:"content" tf:""` + // Conversation ID + ConversationId types.String `tfsdk:"conversation_id" tf:""` + // Timestamp when the message was created + CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` + // Error message if AI failed to respond to the message + Error types.List `tfsdk:"error" tf:"optional,object"` + // Message ID + Id types.String `tfsdk:"id" tf:""` + // Timestamp when the message was last updated + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // The result of SQL query if the message has a query attachment + QueryResult types.List `tfsdk:"query_result" tf:"optional,object"` + // Genie space ID + SpaceId types.String `tfsdk:"space_id" tf:""` + // MesssageStatus. 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 users question. * `EXECUTING_QUERY`: Executing + // AI provided SQL query. Get the SQL query result by calling + // [getMessageQueryResult](:method:genie/getMessageQueryResult) API. + // **Important: The message status will stay in the `EXECUTING_QUERY` until + // a client calls + // [getMessageQueryResult](:method:genie/getMessageQueryResult)**. * + // `FAILED`: Generating a response or the executing the query failed. Please + // see `error` field. * `COMPLETED`: Message processing is completed. + // Results are in the `attachments` field. Get the SQL query result by + // calling [getMessageQueryResult](:method:genie/getMessageQueryResult) API. + // * `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL + // result is not available anymore. The user needs to execute the query + // again. * `CANCELLED`: Message has been cancelled. + Status types.String `tfsdk:"status" tf:"optional"` + // ID of the user who created the message + UserId types.Int64 `tfsdk:"user_id" tf:"optional"` +} + +func (newState *GenieMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieMessage_SdkV2) { +} + +func (newState *GenieMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieMessage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "attachments": reflect.TypeOf(GenieAttachment_SdkV2{}), + "error": reflect.TypeOf(MessageError_SdkV2{}), + "query_result": reflect.TypeOf(Result_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, GenieMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attachments": o.Attachments, + "content": o.Content, + "conversation_id": o.ConversationId, + "created_timestamp": o.CreatedTimestamp, + "error": o.Error, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "query_result": o.QueryResult, + "space_id": o.SpaceId, + "status": o.Status, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attachments": basetypes.ListType{ + ElemType: GenieAttachment{}.Type(ctx), + }, + "content": types.StringType, + "conversation_id": types.StringType, + "created_timestamp": types.Int64Type, + "error": basetypes.ListType{ + ElemType: MessageError{}.Type(ctx), + }, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "query_result": basetypes.ListType{ + ElemType: Result{}.Type(ctx), + }, + "space_id": types.StringType, + "status": types.StringType, + "user_id": types.Int64Type, + }, + } +} + +// GetAttachments returns the value of the Attachments field in GenieMessage_SdkV2 as +// a slice of GenieAttachment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieMessage_SdkV2) GetAttachments(ctx context.Context) ([]GenieAttachment_SdkV2, bool) { + if o.Attachments.IsNull() || o.Attachments.IsUnknown() { + return nil, false + } + var v []GenieAttachment_SdkV2 + d := o.Attachments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAttachments sets the value of the Attachments field in GenieMessage_SdkV2. +func (o *GenieMessage_SdkV2) SetAttachments(ctx context.Context, v []GenieAttachment_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["attachments"] + t = t.(attr.TypeWithElementType).ElementType() + o.Attachments = types.ListValueMust(t, vs) +} + +// GetError returns the value of the Error field in GenieMessage_SdkV2 as +// a MessageError_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieMessage_SdkV2) GetError(ctx context.Context) (MessageError_SdkV2, bool) { + var e MessageError_SdkV2 + if o.Error.IsNull() || o.Error.IsUnknown() { + return e, false + } + var v []MessageError_SdkV2 + d := o.Error.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetError sets the value of the Error field in GenieMessage_SdkV2. +func (o *GenieMessage_SdkV2) SetError(ctx context.Context, v MessageError_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] + o.Error = types.ListValueMust(t, vs) +} + +// GetQueryResult returns the value of the QueryResult field in GenieMessage_SdkV2 as +// a Result_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieMessage_SdkV2) GetQueryResult(ctx context.Context) (Result_SdkV2, bool) { + var e Result_SdkV2 + if o.QueryResult.IsNull() || o.QueryResult.IsUnknown() { + return e, false + } + var v []Result_SdkV2 + d := o.QueryResult.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueryResult sets the value of the QueryResult field in GenieMessage_SdkV2. +func (o *GenieMessage_SdkV2) SetQueryResult(ctx context.Context, v Result_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_result"] + o.QueryResult = types.ListValueMust(t, vs) +} + +type GenieStartConversationMessageRequest_SdkV2 struct { + // The text of the message that starts the conversation. + Content types.String `tfsdk:"content" tf:""` + // The ID associated with the Genie space where you want to start a + // conversation. + SpaceId types.String `tfsdk:"-"` +} + +func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieStartConversationMessageRequest_SdkV2) { +} + +func (newState *GenieStartConversationMessageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationMessageRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieStartConversationMessageRequest_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, GenieStartConversationMessageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieStartConversationMessageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "space_id": o.SpaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieStartConversationMessageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "space_id": types.StringType, + }, + } +} + +type GenieStartConversationResponse_SdkV2 struct { + Conversation types.List `tfsdk:"conversation" tf:"optional,object"` + // Conversation ID + ConversationId types.String `tfsdk:"conversation_id" tf:""` + + Message types.List `tfsdk:"message" tf:"optional,object"` + // Message ID + MessageId types.String `tfsdk:"message_id" tf:""` +} + +func (newState *GenieStartConversationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieStartConversationResponse_SdkV2) { +} + +func (newState *GenieStartConversationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenieStartConversationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenieStartConversationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenieStartConversationResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "conversation": reflect.TypeOf(GenieConversation_SdkV2{}), + "message": reflect.TypeOf(GenieMessage_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, GenieStartConversationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenieStartConversationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "conversation": o.Conversation, + "conversation_id": o.ConversationId, + "message": o.Message, + "message_id": o.MessageId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenieStartConversationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "conversation": basetypes.ListType{ + ElemType: GenieConversation{}.Type(ctx), + }, + "conversation_id": types.StringType, + "message": basetypes.ListType{ + ElemType: GenieMessage{}.Type(ctx), + }, + "message_id": types.StringType, + }, + } +} + +// GetConversation returns the value of the Conversation field in GenieStartConversationResponse_SdkV2 as +// a GenieConversation_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieStartConversationResponse_SdkV2) GetConversation(ctx context.Context) (GenieConversation_SdkV2, bool) { + var e GenieConversation_SdkV2 + if o.Conversation.IsNull() || o.Conversation.IsUnknown() { + return e, false + } + var v []GenieConversation_SdkV2 + d := o.Conversation.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConversation sets the value of the Conversation field in GenieStartConversationResponse_SdkV2. +func (o *GenieStartConversationResponse_SdkV2) SetConversation(ctx context.Context, v GenieConversation_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["conversation"] + o.Conversation = types.ListValueMust(t, vs) +} + +// GetMessage returns the value of the Message field in GenieStartConversationResponse_SdkV2 as +// a GenieMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GenieStartConversationResponse_SdkV2) GetMessage(ctx context.Context) (GenieMessage_SdkV2, bool) { + var e GenieMessage_SdkV2 + if o.Message.IsNull() || o.Message.IsUnknown() { + return e, false + } + var v []GenieMessage_SdkV2 + d := o.Message.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMessage sets the value of the Message field in GenieStartConversationResponse_SdkV2. +func (o *GenieStartConversationResponse_SdkV2) SetMessage(ctx context.Context, v GenieMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["message"] + o.Message = types.ListValueMust(t, vs) +} + +// Get dashboard +type GetDashboardRequest_SdkV2 struct { + // UUID identifying the dashboard. + DashboardId types.String `tfsdk:"-"` +} + +func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest_SdkV2) { +} + +func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDashboardRequest_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, GetDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +// Get published dashboard +type GetPublishedDashboardRequest_SdkV2 struct { + // UUID identifying the published dashboard. + DashboardId types.String `tfsdk:"-"` +} + +func (newState *GetPublishedDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedDashboardRequest_SdkV2) { +} + +func (newState *GetPublishedDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPublishedDashboardRequest_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, GetPublishedDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPublishedDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPublishedDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +// Get dashboard schedule +type GetScheduleRequest_SdkV2 struct { + // UUID identifying the dashboard to which the schedule belongs. + DashboardId types.String `tfsdk:"-"` + // UUID identifying the schedule. + ScheduleId types.String `tfsdk:"-"` +} + +func (newState *GetScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetScheduleRequest_SdkV2) { +} + +func (newState *GetScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetScheduleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetScheduleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetScheduleRequest_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, GetScheduleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetScheduleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "schedule_id": types.StringType, + }, + } +} + +// Get schedule subscription +type GetSubscriptionRequest_SdkV2 struct { + // UUID identifying the dashboard which the subscription belongs. + DashboardId types.String `tfsdk:"-"` + // UUID identifying the schedule which the subscription belongs. + ScheduleId types.String `tfsdk:"-"` + // UUID identifying the subscription. + SubscriptionId types.String `tfsdk:"-"` +} + +func (newState *GetSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSubscriptionRequest_SdkV2) { +} + +func (newState *GetSubscriptionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSubscriptionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSubscriptionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetSubscriptionRequest_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, GetSubscriptionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetSubscriptionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + "subscription_id": o.SubscriptionId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "schedule_id": types.StringType, + "subscription_id": types.StringType, + }, + } +} + +// List dashboards +type ListDashboardsRequest_SdkV2 struct { + // The number of dashboards to return per page. + PageSize types.Int64 `tfsdk:"-"` + // A page token, received from a previous `ListDashboards` call. This token + // can be used to retrieve the subsequent page. + PageToken types.String `tfsdk:"-"` + // The flag to include dashboards located in the trash. If unspecified, only + // active dashboards will be returned. + ShowTrashed types.Bool `tfsdk:"-"` + // `DASHBOARD_VIEW_BASIC`only includes summary metadata from the dashboard. + View types.String `tfsdk:"-"` +} + +func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest_SdkV2) { +} + +func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDashboardsRequest_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, ListDashboardsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsRequest_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, + "show_trashed": o.ShowTrashed, + "view": o.View, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDashboardsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "show_trashed": types.BoolType, + "view": types.StringType, + }, + } +} + +type ListDashboardsResponse_SdkV2 struct { + Dashboards types.List `tfsdk:"dashboards" tf:"optional"` + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent dashboards. + NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` +} + +func (newState *ListDashboardsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsResponse_SdkV2) { +} + +func (newState *ListDashboardsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDashboardsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dashboards": reflect.TypeOf(Dashboard_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, ListDashboardsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboards": o.Dashboards, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDashboardsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboards": basetypes.ListType{ + ElemType: Dashboard{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetDashboards returns the value of the Dashboards field in ListDashboardsResponse_SdkV2 as +// a slice of Dashboard_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListDashboardsResponse_SdkV2) GetDashboards(ctx context.Context) ([]Dashboard_SdkV2, bool) { + if o.Dashboards.IsNull() || o.Dashboards.IsUnknown() { + return nil, false + } + var v []Dashboard_SdkV2 + d := o.Dashboards.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDashboards sets the value of the Dashboards field in ListDashboardsResponse_SdkV2. +func (o *ListDashboardsResponse_SdkV2) SetDashboards(ctx context.Context, v []Dashboard_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["dashboards"] + t = t.(attr.TypeWithElementType).ElementType() + o.Dashboards = types.ListValueMust(t, vs) +} + +// List dashboard schedules +type ListSchedulesRequest_SdkV2 struct { + // UUID identifying the dashboard to which the schedules belongs. + DashboardId types.String `tfsdk:"-"` + // The number of schedules to return per page. + PageSize types.Int64 `tfsdk:"-"` + // A page token, received from a previous `ListSchedules` call. Use this to + // retrieve the subsequent page. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListSchedulesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesRequest_SdkV2) { +} + +func (newState *ListSchedulesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchedulesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSchedulesRequest_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, ListSchedulesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSchedulesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSchedulesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListSchedulesResponse_SdkV2 struct { + // A token that can be used as a `page_token` in subsequent requests to + // retrieve the next page of results. If this field is omitted, there are no + // subsequent schedules. + NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + + Schedules types.List `tfsdk:"schedules" tf:"optional"` +} + +func (newState *ListSchedulesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSchedulesResponse_SdkV2) { +} + +func (newState *ListSchedulesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSchedulesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSchedulesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSchedulesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "schedules": reflect.TypeOf(Schedule_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, ListSchedulesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSchedulesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schedules": o.Schedules, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSchedulesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "schedules": basetypes.ListType{ + ElemType: Schedule{}.Type(ctx), + }, + }, + } +} + +// GetSchedules returns the value of the Schedules field in ListSchedulesResponse_SdkV2 as +// a slice of Schedule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSchedulesResponse_SdkV2) GetSchedules(ctx context.Context) ([]Schedule_SdkV2, bool) { + if o.Schedules.IsNull() || o.Schedules.IsUnknown() { + return nil, false + } + var v []Schedule_SdkV2 + d := o.Schedules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchedules sets the value of the Schedules field in ListSchedulesResponse_SdkV2. +func (o *ListSchedulesResponse_SdkV2) SetSchedules(ctx context.Context, v []Schedule_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["schedules"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schedules = types.ListValueMust(t, vs) +} + +// List schedule subscriptions +type ListSubscriptionsRequest_SdkV2 struct { + // UUID identifying the dashboard which the subscriptions belongs. + DashboardId types.String `tfsdk:"-"` + // The number of subscriptions to return per page. + PageSize types.Int64 `tfsdk:"-"` + // A page token, received from a previous `ListSubscriptions` call. Use this + // to retrieve the subsequent page. + PageToken types.String `tfsdk:"-"` + // UUID identifying the schedule which the subscriptions belongs. + ScheduleId types.String `tfsdk:"-"` +} + +func (newState *ListSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsRequest_SdkV2) { +} + +func (newState *ListSubscriptionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSubscriptionsRequest_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, ListSubscriptionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSubscriptionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "page_size": o.PageSize, + "page_token": o.PageToken, + "schedule_id": o.ScheduleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSubscriptionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + "schedule_id": types.StringType, + }, + } +} + +type ListSubscriptionsResponse_SdkV2 struct { + // A token that can be used as a `page_token` in subsequent requests to + // retrieve the next page of results. If this field is omitted, there are no + // subsequent subscriptions. + NextPageToken types.String `tfsdk:"next_page_token" tf:"computed"` + + Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` +} + +func (newState *ListSubscriptionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSubscriptionsResponse_SdkV2) { +} + +func (newState *ListSubscriptionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSubscriptionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSubscriptionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSubscriptionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscriptions": reflect.TypeOf(Subscription_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, ListSubscriptionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSubscriptionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "subscriptions": o.Subscriptions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSubscriptionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "subscriptions": basetypes.ListType{ + ElemType: Subscription{}.Type(ctx), + }, + }, + } +} + +// GetSubscriptions returns the value of the Subscriptions field in ListSubscriptionsResponse_SdkV2 as +// a slice of Subscription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSubscriptionsResponse_SdkV2) GetSubscriptions(ctx context.Context) ([]Subscription_SdkV2, bool) { + if o.Subscriptions.IsNull() || o.Subscriptions.IsUnknown() { + return nil, false + } + var v []Subscription_SdkV2 + d := o.Subscriptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubscriptions sets the value of the Subscriptions field in ListSubscriptionsResponse_SdkV2. +func (o *ListSubscriptionsResponse_SdkV2) SetSubscriptions(ctx context.Context, v []Subscription_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["subscriptions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Subscriptions = types.ListValueMust(t, vs) +} + +type MessageError_SdkV2 struct { + Error types.String `tfsdk:"error" tf:"optional"` + + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *MessageError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MessageError_SdkV2) { +} + +func (newState *MessageError_SdkV2) SyncEffectiveFieldsDuringRead(existingState MessageError_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MessageError. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MessageError_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, MessageError_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MessageError_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error": o.Error, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MessageError_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error": types.StringType, + "type": types.StringType, + }, + } +} + +type MigrateDashboardRequest_SdkV2 struct { + // Display name for the new Lakeview dashboard. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The workspace path of the folder to contain the migrated Lakeview + // dashboard. + ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + // UUID of the dashboard to be migrated. + SourceDashboardId types.String `tfsdk:"source_dashboard_id" tf:""` +} + +func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest_SdkV2) { +} + +func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigrateDashboardRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MigrateDashboardRequest_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, MigrateDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MigrateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "parent_path": o.ParentPath, + "source_dashboard_id": o.SourceDashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MigrateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "parent_path": types.StringType, + "source_dashboard_id": types.StringType, + }, + } +} + +type PublishRequest_SdkV2 struct { + // UUID identifying the dashboard to be published. + DashboardId types.String `tfsdk:"-"` + // Flag to indicate if the publisher's credentials should be embedded in the + // published dashboard. These embedded credentials will be used to execute + // the published dashboard's queries. + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + // The ID of the warehouse that can be used to override the warehouse which + // was set in the draft. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishRequest_SdkV2) { +} + +func (newState *PublishRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PublishRequest_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, PublishRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PublishRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "embed_credentials": o.EmbedCredentials, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PublishRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "embed_credentials": types.BoolType, + "warehouse_id": types.StringType, + }, + } +} + +type PublishedDashboard_SdkV2 struct { + // The display name of the published dashboard. + DisplayName types.String `tfsdk:"display_name" tf:"computed"` + // Indicates whether credentials are embedded in the published dashboard. + EmbedCredentials types.Bool `tfsdk:"embed_credentials" tf:"optional"` + // The timestamp of when the published dashboard was last revised. + RevisionCreateTime types.String `tfsdk:"revision_create_time" tf:"computed"` + // The warehouse ID used to run the published dashboard. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *PublishedDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedDashboard_SdkV2) { +} + +func (newState *PublishedDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishedDashboard_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedDashboard. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PublishedDashboard_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, PublishedDashboard_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PublishedDashboard_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "embed_credentials": o.EmbedCredentials, + "revision_create_time": o.RevisionCreateTime, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PublishedDashboard_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "embed_credentials": types.BoolType, + "revision_create_time": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +type QueryAttachment_SdkV2 struct { + CachedQuerySchema types.List `tfsdk:"cached_query_schema" tf:"optional,object"` + // Description of the query + Description types.String `tfsdk:"description" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + // If the query was created on an instruction (trusted asset) we link to the + // id + InstructionId types.String `tfsdk:"instruction_id" tf:"optional"` + // Always store the title next to the id in case the original instruction + // title changes or the instruction is deleted. + InstructionTitle types.String `tfsdk:"instruction_title" tf:"optional"` + // Time when the user updated the query last + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // AI generated SQL query + Query types.String `tfsdk:"query" tf:"optional"` + // Name of the query + Title types.String `tfsdk:"title" tf:"optional"` +} + +func (newState *QueryAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryAttachment_SdkV2) { +} + +func (newState *QueryAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryAttachment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryAttachment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryAttachment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cached_query_schema": reflect.TypeOf(QuerySchema_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, QueryAttachment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryAttachment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cached_query_schema": o.CachedQuerySchema, + "description": o.Description, + "id": o.Id, + "instruction_id": o.InstructionId, + "instruction_title": o.InstructionTitle, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "query": o.Query, + "title": o.Title, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryAttachment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cached_query_schema": basetypes.ListType{ + ElemType: QuerySchema{}.Type(ctx), + }, + "description": types.StringType, + "id": types.StringType, + "instruction_id": types.StringType, + "instruction_title": types.StringType, + "last_updated_timestamp": types.Int64Type, + "query": types.StringType, + "title": types.StringType, + }, + } +} + +// GetCachedQuerySchema returns the value of the CachedQuerySchema field in QueryAttachment_SdkV2 as +// a QuerySchema_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryAttachment_SdkV2) GetCachedQuerySchema(ctx context.Context) (QuerySchema_SdkV2, bool) { + var e QuerySchema_SdkV2 + if o.CachedQuerySchema.IsNull() || o.CachedQuerySchema.IsUnknown() { + return e, false + } + var v []QuerySchema_SdkV2 + d := o.CachedQuerySchema.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCachedQuerySchema sets the value of the CachedQuerySchema field in QueryAttachment_SdkV2. +func (o *QueryAttachment_SdkV2) SetCachedQuerySchema(ctx context.Context, v QuerySchema_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cached_query_schema"] + o.CachedQuerySchema = types.ListValueMust(t, vs) +} + +type QuerySchema_SdkV2 struct { + Columns types.List `tfsdk:"columns" tf:"optional"` + // Used to determine if the stored query schema is compatible with the + // latest run. The service should always clear the schema when the query is + // re-executed. + StatementId types.String `tfsdk:"statement_id" tf:"optional"` +} + +func (newState *QuerySchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuerySchema_SdkV2) { +} + +func (newState *QuerySchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuerySchema_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchema. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QuerySchema_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(QuerySchemaColumn_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, QuerySchema_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QuerySchema_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "statement_id": o.StatementId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QuerySchema_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: QuerySchemaColumn{}.Type(ctx), + }, + "statement_id": types.StringType, + }, + } +} + +// GetColumns returns the value of the Columns field in QuerySchema_SdkV2 as +// a slice of QuerySchemaColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QuerySchema_SdkV2) GetColumns(ctx context.Context) ([]QuerySchemaColumn_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []QuerySchemaColumn_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 QuerySchema_SdkV2. +func (o *QuerySchema_SdkV2) SetColumns(ctx context.Context, v []QuerySchemaColumn_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) +} + +type QuerySchemaColumn_SdkV2 struct { + // Populated from + // https://docs.databricks.com/sql/language-manual/sql-ref-datatypes.html + DataType types.String `tfsdk:"data_type" tf:""` + + Name types.String `tfsdk:"name" tf:""` + // Corresponds to type desc + TypeText types.String `tfsdk:"type_text" tf:""` +} + +func (newState *QuerySchemaColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QuerySchemaColumn_SdkV2) { +} + +func (newState *QuerySchemaColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState QuerySchemaColumn_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QuerySchemaColumn. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QuerySchemaColumn_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, QuerySchemaColumn_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QuerySchemaColumn_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_type": o.DataType, + "name": o.Name, + "type_text": o.TypeText, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QuerySchemaColumn_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_type": types.StringType, + "name": types.StringType, + "type_text": types.StringType, + }, + } +} + +type Result_SdkV2 struct { + // If result is truncated + IsTruncated types.Bool `tfsdk:"is_truncated" tf:"optional"` + // Row count of the result + RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + // Statement Execution API statement id. Use [Get status, manifest, and + // result first chunk](:method:statementexecution/getstatement) to get the + // full result data. + StatementId types.String `tfsdk:"statement_id" tf:"optional"` +} + +func (newState *Result_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Result_SdkV2) { +} + +func (newState *Result_SdkV2) SyncEffectiveFieldsDuringRead(existingState Result_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Result. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Result_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, Result_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Result_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_truncated": o.IsTruncated, + "row_count": o.RowCount, + "statement_id": o.StatementId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Result_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_truncated": types.BoolType, + "row_count": types.Int64Type, + "statement_id": types.StringType, + }, + } +} + +type Schedule_SdkV2 struct { + // A timestamp indicating when the schedule was created. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // The cron expression describing the frequency of the periodic refresh for + // this schedule. + CronSchedule types.List `tfsdk:"cron_schedule" tf:"object"` + // UUID identifying the dashboard to which the schedule belongs. + DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + // The display name for schedule. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The etag for the schedule. Must be left empty on create, must be provided + // on updates to ensure that the schedule has not been modified since the + // last read, and can be optionally provided on delete. + Etag types.String `tfsdk:"etag" tf:"computed"` + // The status indicates whether this schedule is paused or not. + PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + // UUID identifying the schedule. + ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + // A timestamp indicating when the schedule was last updated. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` + // The warehouse id to run the dashboard with for the schedule. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *Schedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Schedule_SdkV2) { +} + +func (newState *Schedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState Schedule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Schedule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Schedule_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cron_schedule": reflect.TypeOf(CronSchedule_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, Schedule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Schedule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "cron_schedule": o.CronSchedule, + "dashboard_id": o.DashboardId, + "display_name": o.DisplayName, + "etag": o.Etag, + "pause_status": o.PauseStatus, + "schedule_id": o.ScheduleId, + "update_time": o.UpdateTime, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Schedule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "cron_schedule": basetypes.ListType{ + ElemType: CronSchedule{}.Type(ctx), + }, + "dashboard_id": types.StringType, + "display_name": types.StringType, + "etag": types.StringType, + "pause_status": types.StringType, + "schedule_id": types.StringType, + "update_time": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetCronSchedule returns the value of the CronSchedule field in Schedule_SdkV2 as +// a CronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Schedule_SdkV2) GetCronSchedule(ctx context.Context) (CronSchedule_SdkV2, bool) { + var e CronSchedule_SdkV2 + if o.CronSchedule.IsNull() || o.CronSchedule.IsUnknown() { + return e, false + } + var v []CronSchedule_SdkV2 + d := o.CronSchedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCronSchedule sets the value of the CronSchedule field in Schedule_SdkV2. +func (o *Schedule_SdkV2) SetCronSchedule(ctx context.Context, v CronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cron_schedule"] + o.CronSchedule = types.ListValueMust(t, vs) +} + +type Subscriber_SdkV2 struct { + // The destination to receive the subscription email. This parameter is + // mutually exclusive with `user_subscriber`. + DestinationSubscriber types.List `tfsdk:"destination_subscriber" tf:"optional,object"` + // The user to receive the subscription email. This parameter is mutually + // exclusive with `destination_subscriber`. + UserSubscriber types.List `tfsdk:"user_subscriber" tf:"optional,object"` +} + +func (newState *Subscriber_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscriber_SdkV2) { +} + +func (newState *Subscriber_SdkV2) SyncEffectiveFieldsDuringRead(existingState Subscriber_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscriber. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Subscriber_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "destination_subscriber": reflect.TypeOf(SubscriptionSubscriberDestination_SdkV2{}), + "user_subscriber": reflect.TypeOf(SubscriptionSubscriberUser_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, Subscriber_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Subscriber_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_subscriber": o.DestinationSubscriber, + "user_subscriber": o.UserSubscriber, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Subscriber_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_subscriber": basetypes.ListType{ + ElemType: SubscriptionSubscriberDestination{}.Type(ctx), + }, + "user_subscriber": basetypes.ListType{ + ElemType: SubscriptionSubscriberUser{}.Type(ctx), + }, + }, + } +} + +// GetDestinationSubscriber returns the value of the DestinationSubscriber field in Subscriber_SdkV2 as +// a SubscriptionSubscriberDestination_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Subscriber_SdkV2) GetDestinationSubscriber(ctx context.Context) (SubscriptionSubscriberDestination_SdkV2, bool) { + var e SubscriptionSubscriberDestination_SdkV2 + if o.DestinationSubscriber.IsNull() || o.DestinationSubscriber.IsUnknown() { + return e, false + } + var v []SubscriptionSubscriberDestination_SdkV2 + d := o.DestinationSubscriber.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDestinationSubscriber sets the value of the DestinationSubscriber field in Subscriber_SdkV2. +func (o *Subscriber_SdkV2) SetDestinationSubscriber(ctx context.Context, v SubscriptionSubscriberDestination_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["destination_subscriber"] + o.DestinationSubscriber = types.ListValueMust(t, vs) +} + +// GetUserSubscriber returns the value of the UserSubscriber field in Subscriber_SdkV2 as +// a SubscriptionSubscriberUser_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Subscriber_SdkV2) GetUserSubscriber(ctx context.Context) (SubscriptionSubscriberUser_SdkV2, bool) { + var e SubscriptionSubscriberUser_SdkV2 + if o.UserSubscriber.IsNull() || o.UserSubscriber.IsUnknown() { + return e, false + } + var v []SubscriptionSubscriberUser_SdkV2 + d := o.UserSubscriber.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUserSubscriber sets the value of the UserSubscriber field in Subscriber_SdkV2. +func (o *Subscriber_SdkV2) SetUserSubscriber(ctx context.Context, v SubscriptionSubscriberUser_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user_subscriber"] + o.UserSubscriber = types.ListValueMust(t, vs) +} + +type Subscription_SdkV2 struct { + // A timestamp indicating when the subscription was created. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // UserId of the user who adds subscribers (users or notification + // destinations) to the dashboard's schedule. + CreatedByUserId types.Int64 `tfsdk:"created_by_user_id" tf:"computed"` + // UUID identifying the dashboard to which the subscription belongs. + DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` + // The etag for the subscription. Must be left empty on create, can be + // optionally provided on delete to ensure that the subscription has not + // been deleted since the last read. + Etag types.String `tfsdk:"etag" tf:"computed"` + // UUID identifying the schedule to which the subscription belongs. + ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` + // Subscriber details for users and destinations to be added as subscribers + // to the schedule. + Subscriber types.List `tfsdk:"subscriber" tf:"object"` + // UUID identifying the subscription. + SubscriptionId types.String `tfsdk:"subscription_id" tf:"computed"` + // A timestamp indicating when the subscription was last updated. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` +} + +func (newState *Subscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscription_SdkV2) { +} + +func (newState *Subscription_SdkV2) SyncEffectiveFieldsDuringRead(existingState Subscription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Subscription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Subscription_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscriber": reflect.TypeOf(Subscriber_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, Subscription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Subscription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "created_by_user_id": o.CreatedByUserId, + "dashboard_id": o.DashboardId, + "etag": o.Etag, + "schedule_id": o.ScheduleId, + "subscriber": o.Subscriber, + "subscription_id": o.SubscriptionId, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Subscription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "created_by_user_id": types.Int64Type, + "dashboard_id": types.StringType, + "etag": types.StringType, + "schedule_id": types.StringType, + "subscriber": basetypes.ListType{ + ElemType: Subscriber{}.Type(ctx), + }, + "subscription_id": types.StringType, + "update_time": types.StringType, + }, + } +} + +// GetSubscriber returns the value of the Subscriber field in Subscription_SdkV2 as +// a Subscriber_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Subscription_SdkV2) GetSubscriber(ctx context.Context) (Subscriber_SdkV2, bool) { + var e Subscriber_SdkV2 + if o.Subscriber.IsNull() || o.Subscriber.IsUnknown() { + return e, false + } + var v []Subscriber_SdkV2 + d := o.Subscriber.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSubscriber sets the value of the Subscriber field in Subscription_SdkV2. +func (o *Subscription_SdkV2) SetSubscriber(ctx context.Context, v Subscriber_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["subscriber"] + o.Subscriber = types.ListValueMust(t, vs) +} + +type SubscriptionSubscriberDestination_SdkV2 struct { + // The canonical identifier of the destination to receive email + // notification. + DestinationId types.String `tfsdk:"destination_id" tf:"computed"` +} + +func (newState *SubscriptionSubscriberDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberDestination_SdkV2) { +} + +func (newState *SubscriptionSubscriberDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberDestination_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberDestination. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SubscriptionSubscriberDestination_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, SubscriptionSubscriberDestination_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SubscriptionSubscriberDestination_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_id": o.DestinationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SubscriptionSubscriberDestination_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_id": types.StringType, + }, + } +} + +type SubscriptionSubscriberUser_SdkV2 struct { + // UserId of the subscriber. + UserId types.Int64 `tfsdk:"user_id" tf:"computed"` +} + +func (newState *SubscriptionSubscriberUser_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubscriptionSubscriberUser_SdkV2) { +} + +func (newState *SubscriptionSubscriberUser_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubscriptionSubscriberUser_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SubscriptionSubscriberUser. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SubscriptionSubscriberUser_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, SubscriptionSubscriberUser_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SubscriptionSubscriberUser_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SubscriptionSubscriberUser_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "user_id": types.Int64Type, + }, + } +} + +type TextAttachment_SdkV2 struct { + // AI generated message + Content types.String `tfsdk:"content" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *TextAttachment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextAttachment_SdkV2) { +} + +func (newState *TextAttachment_SdkV2) SyncEffectiveFieldsDuringRead(existingState TextAttachment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TextAttachment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TextAttachment_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, TextAttachment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TextAttachment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TextAttachment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "id": types.StringType, + }, + } +} + +// Trash dashboard +type TrashDashboardRequest_SdkV2 struct { + // UUID identifying the dashboard. + DashboardId types.String `tfsdk:"-"` +} + +func (newState *TrashDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashDashboardRequest_SdkV2) { +} + +func (newState *TrashDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TrashDashboardRequest_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, TrashDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TrashDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TrashDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +type TrashDashboardResponse_SdkV2 struct { +} + +func (newState *TrashDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashDashboardResponse_SdkV2) { +} + +func (newState *TrashDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TrashDashboardResponse_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, TrashDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TrashDashboardResponse_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 TrashDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Unpublish dashboard +type UnpublishDashboardRequest_SdkV2 struct { + // UUID identifying the published dashboard. + DashboardId types.String `tfsdk:"-"` +} + +func (newState *UnpublishDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpublishDashboardRequest_SdkV2) { +} + +func (newState *UnpublishDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnpublishDashboardRequest_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, UnpublishDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnpublishDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UnpublishDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +type UnpublishDashboardResponse_SdkV2 struct { +} + +func (newState *UnpublishDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UnpublishDashboardResponse_SdkV2) { +} + +func (newState *UnpublishDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UnpublishDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UnpublishDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UnpublishDashboardResponse_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, UnpublishDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UnpublishDashboardResponse_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 UnpublishDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Update dashboard +type UpdateDashboardRequest_SdkV2 struct { + Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + // UUID identifying the dashboard. + DashboardId types.String `tfsdk:"-"` +} + +func (newState *UpdateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDashboardRequest_SdkV2) { +} + +func (newState *UpdateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateDashboardRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dashboard": reflect.TypeOf(Dashboard_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, UpdateDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard": o.Dashboard, + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard": basetypes.ListType{ + ElemType: Dashboard{}.Type(ctx), + }, + "dashboard_id": types.StringType, + }, + } +} + +// GetDashboard returns the value of the Dashboard field in UpdateDashboardRequest_SdkV2 as +// a Dashboard_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateDashboardRequest_SdkV2) GetDashboard(ctx context.Context) (Dashboard_SdkV2, bool) { + var e Dashboard_SdkV2 + if o.Dashboard.IsNull() || o.Dashboard.IsUnknown() { + return e, false + } + var v []Dashboard_SdkV2 + d := o.Dashboard.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDashboard sets the value of the Dashboard field in UpdateDashboardRequest_SdkV2. +func (o *UpdateDashboardRequest_SdkV2) SetDashboard(ctx context.Context, v Dashboard_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] + o.Dashboard = types.ListValueMust(t, vs) +} + +// Update dashboard schedule +type UpdateScheduleRequest_SdkV2 struct { + // UUID identifying the dashboard to which the schedule belongs. + DashboardId types.String `tfsdk:"-"` + + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // UUID identifying the schedule. + ScheduleId types.String `tfsdk:"-"` +} + +func (newState *UpdateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateScheduleRequest_SdkV2) { +} + +func (newState *UpdateScheduleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateScheduleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateScheduleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateScheduleRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "schedule": reflect.TypeOf(Schedule_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, UpdateScheduleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateScheduleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule": o.Schedule, + "schedule_id": o.ScheduleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "schedule": basetypes.ListType{ + ElemType: Schedule{}.Type(ctx), + }, + "schedule_id": types.StringType, + }, + } +} + +// GetSchedule returns the value of the Schedule field in UpdateScheduleRequest_SdkV2 as +// a Schedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateScheduleRequest_SdkV2) GetSchedule(ctx context.Context) (Schedule_SdkV2, bool) { + var e Schedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []Schedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in UpdateScheduleRequest_SdkV2. +func (o *UpdateScheduleRequest_SdkV2) SetSchedule(ctx context.Context, v Schedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} diff --git a/internal/service/dashboards_tf/model.go b/internal/service/dashboards_tf/model.go index 71b2320c1..22f04b74d 100755 --- a/internal/service/dashboards_tf/model.go +++ b/internal/service/dashboards_tf/model.go @@ -24,7 +24,7 @@ import ( // Create dashboard type CreateDashboardRequest struct { - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` } func (newState *CreateDashboardRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDashboardRequest) { @@ -61,9 +61,7 @@ func (o CreateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateDashboardRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "dashboard": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), - }, + "dashboard": Dashboard{}.Type(ctx), }, } } @@ -77,7 +75,10 @@ func (o *CreateDashboardRequest) GetDashboard(ctx context.Context) (Dashboard, b return e, false } var v []Dashboard - d := o.Dashboard.ElementsAs(ctx, &v, true) + d := o.Dashboard.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -89,9 +90,8 @@ func (o *CreateDashboardRequest) GetDashboard(ctx context.Context) (Dashboard, b // SetDashboard sets the value of the Dashboard field in CreateDashboardRequest. func (o *CreateDashboardRequest) SetDashboard(ctx context.Context, v Dashboard) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] - o.Dashboard = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dashboard = vs } // Create dashboard schedule @@ -99,7 +99,7 @@ type CreateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` } func (newState *CreateScheduleRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScheduleRequest) { @@ -138,9 +138,7 @@ func (o CreateScheduleRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, - "schedule": basetypes.ListType{ - ElemType: Schedule{}.Type(ctx), - }, + "schedule": Schedule{}.Type(ctx), }, } } @@ -154,7 +152,10 @@ func (o *CreateScheduleRequest) GetSchedule(ctx context.Context) (Schedule, bool return e, false } var v []Schedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -166,9 +167,8 @@ func (o *CreateScheduleRequest) GetSchedule(ctx context.Context) (Schedule, bool // SetSchedule sets the value of the Schedule field in CreateScheduleRequest. func (o *CreateScheduleRequest) SetSchedule(ctx context.Context, v Schedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // Create schedule subscription @@ -178,7 +178,7 @@ type CreateSubscriptionRequest struct { // UUID identifying the schedule to which the subscription belongs. ScheduleId types.String `tfsdk:"-"` - Subscription types.List `tfsdk:"subscription" tf:"optional,object"` + Subscription types.Object `tfsdk:"subscription" tf:"optional,object"` } func (newState *CreateSubscriptionRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateSubscriptionRequest) { @@ -219,9 +219,7 @@ func (o CreateSubscriptionRequest) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, "schedule_id": types.StringType, - "subscription": basetypes.ListType{ - ElemType: Subscription{}.Type(ctx), - }, + "subscription": Subscription{}.Type(ctx), }, } } @@ -235,7 +233,10 @@ func (o *CreateSubscriptionRequest) GetSubscription(ctx context.Context) (Subscr return e, false } var v []Subscription - d := o.Subscription.ElementsAs(ctx, &v, true) + d := o.Subscription.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -247,9 +248,8 @@ func (o *CreateSubscriptionRequest) GetSubscription(ctx context.Context) (Subscr // SetSubscription sets the value of the Subscription field in CreateSubscriptionRequest. func (o *CreateSubscriptionRequest) SetSubscription(ctx context.Context, v Subscription) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["subscription"] - o.Subscription = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Subscription = vs } type CronSchedule struct { @@ -577,9 +577,9 @@ func (o DeleteSubscriptionResponse) Type(ctx context.Context) attr.Type { // Genie AI Response type GenieAttachment struct { - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` - Text types.List `tfsdk:"text" tf:"optional,object"` + Text types.Object `tfsdk:"text" tf:"optional,object"` } func (newState *GenieAttachment) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieAttachment) { @@ -618,12 +618,8 @@ func (o GenieAttachment) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o GenieAttachment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "query": basetypes.ListType{ - ElemType: QueryAttachment{}.Type(ctx), - }, - "text": basetypes.ListType{ - ElemType: TextAttachment{}.Type(ctx), - }, + "query": QueryAttachment{}.Type(ctx), + "text": TextAttachment{}.Type(ctx), }, } } @@ -637,7 +633,10 @@ func (o *GenieAttachment) GetQuery(ctx context.Context) (QueryAttachment, bool) return e, false } var v []QueryAttachment - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -649,9 +648,8 @@ func (o *GenieAttachment) GetQuery(ctx context.Context) (QueryAttachment, bool) // SetQuery sets the value of the Query field in GenieAttachment. func (o *GenieAttachment) SetQuery(ctx context.Context, v QueryAttachment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } // GetText returns the value of the Text field in GenieAttachment as @@ -663,7 +661,10 @@ func (o *GenieAttachment) GetText(ctx context.Context) (TextAttachment, bool) { return e, false } var v []TextAttachment - d := o.Text.ElementsAs(ctx, &v, true) + d := o.Text.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -675,9 +676,8 @@ func (o *GenieAttachment) GetText(ctx context.Context) (TextAttachment, bool) { // SetText sets the value of the Text field in GenieAttachment. func (o *GenieAttachment) SetText(ctx context.Context, v TextAttachment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["text"] - o.Text = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Text = vs } type GenieConversation struct { @@ -950,7 +950,7 @@ func (o GenieGetMessageQueryResultRequest) Type(ctx context.Context) attr.Type { type GenieGetMessageQueryResultResponse struct { // SQL Statement Execution response. See [Get status, manifest, and result // first chunk](:method:statementexecution/getstatement) for more details. - StatementResponse types.List `tfsdk:"statement_response" tf:"optional,object"` + StatementResponse types.Object `tfsdk:"statement_response" tf:"optional,object"` } func (newState *GenieGetMessageQueryResultResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultResponse) { @@ -987,9 +987,7 @@ func (o GenieGetMessageQueryResultResponse) ToObjectValue(ctx context.Context) b func (o GenieGetMessageQueryResultResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "statement_response": basetypes.ListType{ - ElemType: sql_tf.StatementResponse{}.Type(ctx), - }, + "statement_response": sql_tf.StatementResponse{}.Type(ctx), }, } } @@ -1003,7 +1001,10 @@ func (o *GenieGetMessageQueryResultResponse) GetStatementResponse(ctx context.Co return e, false } var v []sql_tf.StatementResponse - d := o.StatementResponse.ElementsAs(ctx, &v, true) + d := o.StatementResponse.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1015,9 +1016,8 @@ func (o *GenieGetMessageQueryResultResponse) GetStatementResponse(ctx context.Co // SetStatementResponse sets the value of the StatementResponse field in GenieGetMessageQueryResultResponse. func (o *GenieGetMessageQueryResultResponse) SetStatementResponse(ctx context.Context, v sql_tf.StatementResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["statement_response"] - o.StatementResponse = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.StatementResponse = vs } type GenieMessage struct { @@ -1030,13 +1030,13 @@ type GenieMessage struct { // Timestamp when the message was created CreatedTimestamp types.Int64 `tfsdk:"created_timestamp" tf:"optional"` // Error message if AI failed to respond to the message - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"optional,object"` // Message ID Id types.String `tfsdk:"id" tf:""` // Timestamp when the message was last updated LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` // The result of SQL query if the message has a query attachment - QueryResult types.List `tfsdk:"query_result" tf:"optional,object"` + QueryResult types.Object `tfsdk:"query_result" tf:"optional,object"` // Genie space ID SpaceId types.String `tfsdk:"space_id" tf:""` // MesssageStatus. The possible values are: * `FETCHING_METADATA`: Fetching @@ -1109,20 +1109,16 @@ func (o GenieMessage) Type(ctx context.Context) attr.Type { "attachments": basetypes.ListType{ ElemType: GenieAttachment{}.Type(ctx), }, - "content": types.StringType, - "conversation_id": types.StringType, - "created_timestamp": types.Int64Type, - "error": basetypes.ListType{ - ElemType: MessageError{}.Type(ctx), - }, + "content": types.StringType, + "conversation_id": types.StringType, + "created_timestamp": types.Int64Type, + "error": MessageError{}.Type(ctx), "id": types.StringType, "last_updated_timestamp": types.Int64Type, - "query_result": basetypes.ListType{ - ElemType: Result{}.Type(ctx), - }, - "space_id": types.StringType, - "status": types.StringType, - "user_id": types.Int64Type, + "query_result": Result{}.Type(ctx), + "space_id": types.StringType, + "status": types.StringType, + "user_id": types.Int64Type, }, } } @@ -1162,7 +1158,10 @@ func (o *GenieMessage) GetError(ctx context.Context) (MessageError, bool) { return e, false } var v []MessageError - d := o.Error.ElementsAs(ctx, &v, true) + d := o.Error.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1174,9 +1173,8 @@ func (o *GenieMessage) GetError(ctx context.Context) (MessageError, bool) { // SetError sets the value of the Error field in GenieMessage. func (o *GenieMessage) SetError(ctx context.Context, v MessageError) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] - o.Error = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Error = vs } // GetQueryResult returns the value of the QueryResult field in GenieMessage as @@ -1188,7 +1186,10 @@ func (o *GenieMessage) GetQueryResult(ctx context.Context) (Result, bool) { return e, false } var v []Result - d := o.QueryResult.ElementsAs(ctx, &v, true) + d := o.QueryResult.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1200,9 +1201,8 @@ func (o *GenieMessage) GetQueryResult(ctx context.Context) (Result, bool) { // SetQueryResult sets the value of the QueryResult field in GenieMessage. func (o *GenieMessage) SetQueryResult(ctx context.Context, v Result) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_result"] - o.QueryResult = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueryResult = vs } type GenieStartConversationMessageRequest struct { @@ -1253,11 +1253,11 @@ func (o GenieStartConversationMessageRequest) Type(ctx context.Context) attr.Typ } type GenieStartConversationResponse struct { - Conversation types.List `tfsdk:"conversation" tf:"optional,object"` + Conversation types.Object `tfsdk:"conversation" tf:"optional,object"` // Conversation ID ConversationId types.String `tfsdk:"conversation_id" tf:""` - Message types.List `tfsdk:"message" tf:"optional,object"` + Message types.Object `tfsdk:"message" tf:"optional,object"` // Message ID MessageId types.String `tfsdk:"message_id" tf:""` } @@ -1300,14 +1300,10 @@ func (o GenieStartConversationResponse) ToObjectValue(ctx context.Context) baset func (o GenieStartConversationResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "conversation": basetypes.ListType{ - ElemType: GenieConversation{}.Type(ctx), - }, + "conversation": GenieConversation{}.Type(ctx), "conversation_id": types.StringType, - "message": basetypes.ListType{ - ElemType: GenieMessage{}.Type(ctx), - }, - "message_id": types.StringType, + "message": GenieMessage{}.Type(ctx), + "message_id": types.StringType, }, } } @@ -1321,7 +1317,10 @@ func (o *GenieStartConversationResponse) GetConversation(ctx context.Context) (G return e, false } var v []GenieConversation - d := o.Conversation.ElementsAs(ctx, &v, true) + d := o.Conversation.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1333,9 +1332,8 @@ func (o *GenieStartConversationResponse) GetConversation(ctx context.Context) (G // SetConversation sets the value of the Conversation field in GenieStartConversationResponse. func (o *GenieStartConversationResponse) SetConversation(ctx context.Context, v GenieConversation) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["conversation"] - o.Conversation = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Conversation = vs } // GetMessage returns the value of the Message field in GenieStartConversationResponse as @@ -1347,7 +1345,10 @@ func (o *GenieStartConversationResponse) GetMessage(ctx context.Context) (GenieM return e, false } var v []GenieMessage - d := o.Message.ElementsAs(ctx, &v, true) + d := o.Message.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1359,9 +1360,8 @@ func (o *GenieStartConversationResponse) GetMessage(ctx context.Context) (GenieM // SetMessage sets the value of the Message field in GenieStartConversationResponse. func (o *GenieStartConversationResponse) SetMessage(ctx context.Context, v GenieMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["message"] - o.Message = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Message = vs } // Get dashboard @@ -2149,7 +2149,7 @@ func (o PublishedDashboard) Type(ctx context.Context) attr.Type { } type QueryAttachment struct { - CachedQuerySchema types.List `tfsdk:"cached_query_schema" tf:"optional,object"` + CachedQuerySchema types.Object `tfsdk:"cached_query_schema" tf:"optional,object"` // Description of the query Description types.String `tfsdk:"description" tf:"optional"` @@ -2209,9 +2209,7 @@ func (o QueryAttachment) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o QueryAttachment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cached_query_schema": basetypes.ListType{ - ElemType: QuerySchema{}.Type(ctx), - }, + "cached_query_schema": QuerySchema{}.Type(ctx), "description": types.StringType, "id": types.StringType, "instruction_id": types.StringType, @@ -2232,7 +2230,10 @@ func (o *QueryAttachment) GetCachedQuerySchema(ctx context.Context) (QuerySchema return e, false } var v []QuerySchema - d := o.CachedQuerySchema.ElementsAs(ctx, &v, true) + d := o.CachedQuerySchema.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2244,9 +2245,8 @@ func (o *QueryAttachment) GetCachedQuerySchema(ctx context.Context) (QuerySchema // SetCachedQuerySchema sets the value of the CachedQuerySchema field in QueryAttachment. func (o *QueryAttachment) SetCachedQuerySchema(ctx context.Context, v QuerySchema) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cached_query_schema"] - o.CachedQuerySchema = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CachedQuerySchema = vs } type QuerySchema struct { @@ -2434,7 +2434,7 @@ type Schedule struct { CreateTime types.String `tfsdk:"create_time" tf:"computed"` // The cron expression describing the frequency of the periodic refresh for // this schedule. - CronSchedule types.List `tfsdk:"cron_schedule" tf:"object"` + CronSchedule types.Object `tfsdk:"cron_schedule" tf:"object"` // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"dashboard_id" tf:"computed"` // The display name for schedule. @@ -2495,17 +2495,15 @@ func (o Schedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Schedule) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "create_time": types.StringType, - "cron_schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), - }, - "dashboard_id": types.StringType, - "display_name": types.StringType, - "etag": types.StringType, - "pause_status": types.StringType, - "schedule_id": types.StringType, - "update_time": types.StringType, - "warehouse_id": types.StringType, + "create_time": types.StringType, + "cron_schedule": CronSchedule{}.Type(ctx), + "dashboard_id": types.StringType, + "display_name": types.StringType, + "etag": types.StringType, + "pause_status": types.StringType, + "schedule_id": types.StringType, + "update_time": types.StringType, + "warehouse_id": types.StringType, }, } } @@ -2519,7 +2517,10 @@ func (o *Schedule) GetCronSchedule(ctx context.Context) (CronSchedule, bool) { return e, false } var v []CronSchedule - d := o.CronSchedule.ElementsAs(ctx, &v, true) + d := o.CronSchedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2531,18 +2532,17 @@ func (o *Schedule) GetCronSchedule(ctx context.Context) (CronSchedule, bool) { // SetCronSchedule sets the value of the CronSchedule field in Schedule. func (o *Schedule) SetCronSchedule(ctx context.Context, v CronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cron_schedule"] - o.CronSchedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CronSchedule = vs } type Subscriber struct { // The destination to receive the subscription email. This parameter is // mutually exclusive with `user_subscriber`. - DestinationSubscriber types.List `tfsdk:"destination_subscriber" tf:"optional,object"` + DestinationSubscriber types.Object `tfsdk:"destination_subscriber" tf:"optional,object"` // The user to receive the subscription email. This parameter is mutually // exclusive with `destination_subscriber`. - UserSubscriber types.List `tfsdk:"user_subscriber" tf:"optional,object"` + UserSubscriber types.Object `tfsdk:"user_subscriber" tf:"optional,object"` } func (newState *Subscriber) SyncEffectiveFieldsDuringCreateOrUpdate(plan Subscriber) { @@ -2581,12 +2581,8 @@ func (o Subscriber) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Subscriber) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "destination_subscriber": basetypes.ListType{ - ElemType: SubscriptionSubscriberDestination{}.Type(ctx), - }, - "user_subscriber": basetypes.ListType{ - ElemType: SubscriptionSubscriberUser{}.Type(ctx), - }, + "destination_subscriber": SubscriptionSubscriberDestination{}.Type(ctx), + "user_subscriber": SubscriptionSubscriberUser{}.Type(ctx), }, } } @@ -2600,7 +2596,10 @@ func (o *Subscriber) GetDestinationSubscriber(ctx context.Context) (Subscription return e, false } var v []SubscriptionSubscriberDestination - d := o.DestinationSubscriber.ElementsAs(ctx, &v, true) + d := o.DestinationSubscriber.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2612,9 +2611,8 @@ func (o *Subscriber) GetDestinationSubscriber(ctx context.Context) (Subscription // SetDestinationSubscriber sets the value of the DestinationSubscriber field in Subscriber. func (o *Subscriber) SetDestinationSubscriber(ctx context.Context, v SubscriptionSubscriberDestination) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["destination_subscriber"] - o.DestinationSubscriber = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DestinationSubscriber = vs } // GetUserSubscriber returns the value of the UserSubscriber field in Subscriber as @@ -2626,7 +2624,10 @@ func (o *Subscriber) GetUserSubscriber(ctx context.Context) (SubscriptionSubscri return e, false } var v []SubscriptionSubscriberUser - d := o.UserSubscriber.ElementsAs(ctx, &v, true) + d := o.UserSubscriber.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2638,9 +2639,8 @@ func (o *Subscriber) GetUserSubscriber(ctx context.Context) (SubscriptionSubscri // SetUserSubscriber sets the value of the UserSubscriber field in Subscriber. func (o *Subscriber) SetUserSubscriber(ctx context.Context, v SubscriptionSubscriberUser) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user_subscriber"] - o.UserSubscriber = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.UserSubscriber = vs } type Subscription struct { @@ -2659,7 +2659,7 @@ type Subscription struct { ScheduleId types.String `tfsdk:"schedule_id" tf:"computed"` // Subscriber details for users and destinations to be added as subscribers // to the schedule. - Subscriber types.List `tfsdk:"subscriber" tf:"object"` + Subscriber types.Object `tfsdk:"subscriber" tf:"object"` // UUID identifying the subscription. SubscriptionId types.String `tfsdk:"subscription_id" tf:"computed"` // A timestamp indicating when the subscription was last updated. @@ -2712,11 +2712,9 @@ func (o Subscription) Type(ctx context.Context) attr.Type { "dashboard_id": types.StringType, "etag": types.StringType, "schedule_id": types.StringType, - "subscriber": basetypes.ListType{ - ElemType: Subscriber{}.Type(ctx), - }, - "subscription_id": types.StringType, - "update_time": types.StringType, + "subscriber": Subscriber{}.Type(ctx), + "subscription_id": types.StringType, + "update_time": types.StringType, }, } } @@ -2730,7 +2728,10 @@ func (o *Subscription) GetSubscriber(ctx context.Context) (Subscriber, bool) { return e, false } var v []Subscriber - d := o.Subscriber.ElementsAs(ctx, &v, true) + d := o.Subscriber.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2742,9 +2743,8 @@ func (o *Subscription) GetSubscriber(ctx context.Context) (Subscriber, bool) { // SetSubscriber sets the value of the Subscriber field in Subscription. func (o *Subscription) SetSubscriber(ctx context.Context, v Subscriber) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["subscriber"] - o.Subscriber = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Subscriber = vs } type SubscriptionSubscriberDestination struct { @@ -3038,7 +3038,7 @@ func (o UnpublishDashboardResponse) Type(ctx context.Context) attr.Type { // Update dashboard type UpdateDashboardRequest struct { - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` // UUID identifying the dashboard. DashboardId types.String `tfsdk:"-"` } @@ -3078,9 +3078,7 @@ func (o UpdateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o UpdateDashboardRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "dashboard": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), - }, + "dashboard": Dashboard{}.Type(ctx), "dashboard_id": types.StringType, }, } @@ -3095,7 +3093,10 @@ func (o *UpdateDashboardRequest) GetDashboard(ctx context.Context) (Dashboard, b return e, false } var v []Dashboard - d := o.Dashboard.ElementsAs(ctx, &v, true) + d := o.Dashboard.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3107,9 +3108,8 @@ func (o *UpdateDashboardRequest) GetDashboard(ctx context.Context) (Dashboard, b // SetDashboard sets the value of the Dashboard field in UpdateDashboardRequest. func (o *UpdateDashboardRequest) SetDashboard(ctx context.Context, v Dashboard) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] - o.Dashboard = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dashboard = vs } // Update dashboard schedule @@ -3117,7 +3117,7 @@ type UpdateScheduleRequest struct { // UUID identifying the dashboard to which the schedule belongs. DashboardId types.String `tfsdk:"-"` - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // UUID identifying the schedule. ScheduleId types.String `tfsdk:"-"` } @@ -3159,10 +3159,8 @@ func (o UpdateScheduleRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, - "schedule": basetypes.ListType{ - ElemType: Schedule{}.Type(ctx), - }, - "schedule_id": types.StringType, + "schedule": Schedule{}.Type(ctx), + "schedule_id": types.StringType, }, } } @@ -3176,7 +3174,10 @@ func (o *UpdateScheduleRequest) GetSchedule(ctx context.Context) (Schedule, bool return e, false } var v []Schedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3188,7 +3189,6 @@ func (o *UpdateScheduleRequest) GetSchedule(ctx context.Context) (Schedule, bool // SetSchedule sets the value of the Schedule field in UpdateScheduleRequest. func (o *UpdateScheduleRequest) SetSchedule(ctx context.Context, v Schedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } diff --git a/internal/service/files_tf/legacy_model.go b/internal/service/files_tf/legacy_model.go new file mode 100755 index 000000000..b5a6afc79 --- /dev/null +++ b/internal/service/files_tf/legacy_model.go @@ -0,0 +1,1675 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package files_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AddBlock_SdkV2 struct { + // The base64-encoded data to append to the stream. This has a limit of 1 + // MB. + Data types.String `tfsdk:"data" tf:""` + // The handle on an open stream. + Handle types.Int64 `tfsdk:"handle" tf:""` +} + +func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddBlock_SdkV2) { +} + +func (newState *AddBlock_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddBlock_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddBlock_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, AddBlock_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddBlock_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data": o.Data, + "handle": o.Handle, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AddBlock_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data": types.StringType, + "handle": types.Int64Type, + }, + } +} + +type AddBlockResponse_SdkV2 struct { +} + +func (newState *AddBlockResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddBlockResponse_SdkV2) { +} + +func (newState *AddBlockResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddBlockResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AddBlockResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddBlockResponse_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, AddBlockResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddBlockResponse_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 AddBlockResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Close_SdkV2 struct { + // The handle on an open stream. + Handle types.Int64 `tfsdk:"handle" tf:""` +} + +func (newState *Close_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Close_SdkV2) { +} + +func (newState *Close_SdkV2) SyncEffectiveFieldsDuringRead(existingState Close_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Close_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, Close_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Close_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "handle": o.Handle, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Close_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "handle": types.Int64Type, + }, + } +} + +type CloseResponse_SdkV2 struct { +} + +func (newState *CloseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloseResponse_SdkV2) { +} + +func (newState *CloseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CloseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CloseResponse_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, CloseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CloseResponse_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 CloseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Create_SdkV2 struct { + // The flag that specifies whether to overwrite existing file/files. + Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + // The path of the new file. The path should be the absolute DBFS path. + Path types.String `tfsdk:"path" tf:""` +} + +func (newState *Create_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Create_SdkV2) { +} + +func (newState *Create_SdkV2) SyncEffectiveFieldsDuringRead(existingState Create_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Create_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, Create_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Create_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "overwrite": o.Overwrite, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Create_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "overwrite": types.BoolType, + "path": types.StringType, + }, + } +} + +// Create a directory +type CreateDirectoryRequest_SdkV2 struct { + // The absolute path of a directory. + DirectoryPath types.String `tfsdk:"-"` +} + +func (newState *CreateDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryRequest_SdkV2) { +} + +func (newState *CreateDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateDirectoryRequest_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, CreateDirectoryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateDirectoryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateDirectoryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "directory_path": types.StringType, + }, + } +} + +type CreateDirectoryResponse_SdkV2 struct { +} + +func (newState *CreateDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateDirectoryResponse_SdkV2) { +} + +func (newState *CreateDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateDirectoryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateDirectoryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateDirectoryResponse_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, CreateDirectoryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateDirectoryResponse_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 CreateDirectoryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type CreateResponse_SdkV2 struct { + // Handle which should subsequently be passed into the AddBlock and Close + // calls when writing to a file through a stream. + Handle types.Int64 `tfsdk:"handle" tf:"optional"` +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateResponse_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, CreateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "handle": o.Handle, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "handle": types.Int64Type, + }, + } +} + +type Delete_SdkV2 struct { + // The path of the file or directory to delete. The path should be the + // absolute DBFS path. + Path types.String `tfsdk:"path" tf:""` + // Whether or not to recursively delete the directory's contents. Deleting + // empty directories can be done without providing the recursive flag. + Recursive types.Bool `tfsdk:"recursive" tf:"optional"` +} + +func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { +} + +func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Delete_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, Delete_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Delete_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + "recursive": o.Recursive, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Delete_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + "recursive": types.BoolType, + }, + } +} + +// Delete a directory +type DeleteDirectoryRequest_SdkV2 struct { + // The absolute path of a directory. + DirectoryPath types.String `tfsdk:"-"` +} + +func (newState *DeleteDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryRequest_SdkV2) { +} + +func (newState *DeleteDirectoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDirectoryRequest_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, DeleteDirectoryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDirectoryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDirectoryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "directory_path": types.StringType, + }, + } +} + +type DeleteDirectoryResponse_SdkV2 struct { +} + +func (newState *DeleteDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDirectoryResponse_SdkV2) { +} + +func (newState *DeleteDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDirectoryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDirectoryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDirectoryResponse_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, DeleteDirectoryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDirectoryResponse_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 DeleteDirectoryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a file +type DeleteFileRequest_SdkV2 struct { + // The absolute path of the file. + FilePath types.String `tfsdk:"-"` +} + +func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest_SdkV2) { +} + +func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteFileRequest_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, DeleteFileRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteFileRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_path": o.FilePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteFileRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_path": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 DirectoryEntry_SdkV2 struct { + // The length of the file in bytes. This field is omitted for directories. + FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + // True if the path is a directory. + IsDirectory types.Bool `tfsdk:"is_directory" tf:"optional"` + // Last modification time of given file in milliseconds since unix epoch. + LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + // The name of the file or directory. This is the last component of the + // path. + Name types.String `tfsdk:"name" tf:"optional"` + // The absolute path of the file or directory. + Path types.String `tfsdk:"path" tf:"optional"` +} + +func (newState *DirectoryEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectoryEntry_SdkV2) { +} + +func (newState *DirectoryEntry_SdkV2) SyncEffectiveFieldsDuringRead(existingState DirectoryEntry_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectoryEntry. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DirectoryEntry_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, DirectoryEntry_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DirectoryEntry_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_directory": o.IsDirectory, + "last_modified": o.LastModified, + "name": o.Name, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DirectoryEntry_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_size": types.Int64Type, + "is_directory": types.BoolType, + "last_modified": types.Int64Type, + "name": types.StringType, + "path": types.StringType, + }, + } +} + +// Download a file +type DownloadRequest_SdkV2 struct { + // The absolute path of the file. + FilePath types.String `tfsdk:"-"` +} + +func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadRequest_SdkV2) { +} + +func (newState *DownloadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DownloadRequest_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, DownloadRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DownloadRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_path": o.FilePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DownloadRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_path": types.StringType, + }, + } +} + +type DownloadResponse_SdkV2 struct { + ContentLength types.Int64 `tfsdk:"-"` + + ContentType types.String `tfsdk:"-"` + + Contents types.Object `tfsdk:"-"` + + LastModified types.String `tfsdk:"-"` +} + +func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse_SdkV2) { +} + +func (newState *DownloadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DownloadResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DownloadResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DownloadResponse_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, DownloadResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DownloadResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content-length": o.ContentLength, + "content-type": o.ContentType, + "contents": o.Contents, + "last-modified": o.LastModified, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DownloadResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content-length": types.Int64Type, + "content-type": types.StringType, + "contents": types.ObjectType{}, + "last-modified": types.StringType, + }, + } +} + +type FileInfo_SdkV2 struct { + // The length of the file in bytes. This field is omitted for directories. + FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + // True if the path is a directory. + IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + // Last modification time of given file in milliseconds since epoch. + ModificationTime types.Int64 `tfsdk:"modification_time" tf:"optional"` + // The absolute path of the file or directory. + Path types.String `tfsdk:"path" tf:"optional"` +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { +} + +// 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, + "modification_time": o.ModificationTime, + "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, + "modification_time": types.Int64Type, + "path": types.StringType, + }, + } +} + +// Get directory metadata +type GetDirectoryMetadataRequest_SdkV2 struct { + // The absolute path of a directory. + DirectoryPath types.String `tfsdk:"-"` +} + +func (newState *GetDirectoryMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataRequest_SdkV2) { +} + +func (newState *GetDirectoryMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDirectoryMetadataRequest_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, GetDirectoryMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDirectoryMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDirectoryMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "directory_path": types.StringType, + }, + } +} + +type GetDirectoryMetadataResponse_SdkV2 struct { +} + +func (newState *GetDirectoryMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDirectoryMetadataResponse_SdkV2) { +} + +func (newState *GetDirectoryMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDirectoryMetadataResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDirectoryMetadataResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDirectoryMetadataResponse_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, GetDirectoryMetadataResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDirectoryMetadataResponse_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 GetDirectoryMetadataResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Get file metadata +type GetMetadataRequest_SdkV2 struct { + // The absolute path of the file. + FilePath types.String `tfsdk:"-"` +} + +func (newState *GetMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataRequest_SdkV2) { +} + +func (newState *GetMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetadataRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetMetadataRequest_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, GetMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_path": o.FilePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_path": types.StringType, + }, + } +} + +type GetMetadataResponse_SdkV2 struct { + ContentLength types.Int64 `tfsdk:"-"` + + ContentType types.String `tfsdk:"-"` + + LastModified types.String `tfsdk:"-"` +} + +func (newState *GetMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetadataResponse_SdkV2) { +} + +func (newState *GetMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetadataResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetadataResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetMetadataResponse_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, GetMetadataResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetMetadataResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content-length": o.ContentLength, + "content-type": o.ContentType, + "last-modified": o.LastModified, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetMetadataResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content-length": types.Int64Type, + "content-type": types.StringType, + "last-modified": types.StringType, + }, + } +} + +// Get the information of a file or directory +type GetStatusRequest_SdkV2 struct { + // The path of the file or directory. The path should be the absolute DBFS + // path. + Path types.String `tfsdk:"-"` +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStatusRequest_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, GetStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +// List directory contents or file details +type ListDbfsRequest_SdkV2 struct { + // The path of the file or directory. The path should be the absolute DBFS + // path. + Path types.String `tfsdk:"-"` +} + +func (newState *ListDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDbfsRequest_SdkV2) { +} + +func (newState *ListDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDbfsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDbfsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDbfsRequest_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, ListDbfsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDbfsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDbfsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +// List directory contents +type ListDirectoryContentsRequest_SdkV2 struct { + // The absolute path of a directory. + DirectoryPath types.String `tfsdk:"-"` + // The maximum number of directory entries to return. The response may + // contain fewer entries. If the response contains a `next_page_token`, + // there may be more entries, even if fewer than `page_size` entries are in + // the response. + // + // We recommend not to set this value unless you are intentionally listing + // less than the complete directory contents. + // + // If unspecified, at most 1000 directory entries will be returned. The + // maximum value is 1000. Values above 1000 will be coerced to 1000. + PageSize types.Int64 `tfsdk:"-"` + // An opaque page token which was the `next_page_token` in the response of + // the previous request to list the contents of this directory. Provide this + // token to retrieve the next page of directory entries. When providing a + // `page_token`, all other parameters provided to the request must match the + // previous request. To list all of the entries in a directory, it is + // necessary to continue requesting pages of entries until the response + // contains no `next_page_token`. Note that the number of entries returned + // must not be used to determine when the listing is complete. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListDirectoryContentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryContentsRequest_SdkV2) { +} + +func (newState *ListDirectoryContentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDirectoryContentsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryContentsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDirectoryContentsRequest_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, ListDirectoryContentsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDirectoryContentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDirectoryContentsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "directory_path": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListDirectoryResponse_SdkV2 struct { + // Array of DirectoryEntry. + Contents types.List `tfsdk:"contents" tf:"optional"` + // A token, which can be sent as `page_token` to retrieve the next page. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDirectoryResponse_SdkV2) { +} + +func (newState *ListDirectoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDirectoryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDirectoryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDirectoryResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "contents": reflect.TypeOf(DirectoryEntry_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, ListDirectoryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDirectoryResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "contents": o.Contents, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDirectoryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "contents": basetypes.ListType{ + ElemType: DirectoryEntry{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetContents returns the value of the Contents field in ListDirectoryResponse_SdkV2 as +// a slice of DirectoryEntry_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListDirectoryResponse_SdkV2) GetContents(ctx context.Context) ([]DirectoryEntry_SdkV2, bool) { + if o.Contents.IsNull() || o.Contents.IsUnknown() { + return nil, false + } + var v []DirectoryEntry_SdkV2 + d := o.Contents.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetContents sets the value of the Contents field in ListDirectoryResponse_SdkV2. +func (o *ListDirectoryResponse_SdkV2) SetContents(ctx context.Context, v []DirectoryEntry_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["contents"] + t = t.(attr.TypeWithElementType).ElementType() + o.Contents = types.ListValueMust(t, vs) +} + +type ListStatusResponse_SdkV2 struct { + // A list of FileInfo's that describe contents of directory or file. See + // example above. + Files types.List `tfsdk:"files" tf:"optional"` +} + +func (newState *ListStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListStatusResponse_SdkV2) { +} + +func (newState *ListStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListStatusResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListStatusResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListStatusResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "files": reflect.TypeOf(FileInfo_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, ListStatusResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListStatusResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "files": o.Files, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "files": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + }, + } +} + +// GetFiles returns the value of the Files field in ListStatusResponse_SdkV2 as +// a slice of FileInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListStatusResponse_SdkV2) GetFiles(ctx context.Context) ([]FileInfo_SdkV2, bool) { + if o.Files.IsNull() || o.Files.IsUnknown() { + return nil, false + } + var v []FileInfo_SdkV2 + d := o.Files.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFiles sets the value of the Files field in ListStatusResponse_SdkV2. +func (o *ListStatusResponse_SdkV2) SetFiles(ctx context.Context, v []FileInfo_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["files"] + t = t.(attr.TypeWithElementType).ElementType() + o.Files = types.ListValueMust(t, vs) +} + +type MkDirs_SdkV2 struct { + // The path of the new directory. The path should be the absolute DBFS path. + Path types.String `tfsdk:"path" tf:""` +} + +func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDirs_SdkV2) { +} + +func (newState *MkDirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkDirs_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MkDirs_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, MkDirs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MkDirs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MkDirs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +type MkDirsResponse_SdkV2 struct { +} + +func (newState *MkDirsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkDirsResponse_SdkV2) { +} + +func (newState *MkDirsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkDirsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MkDirsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MkDirsResponse_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, MkDirsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MkDirsResponse_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 MkDirsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Move_SdkV2 struct { + // The destination path of the file or directory. The path should be the + // absolute DBFS path. + DestinationPath types.String `tfsdk:"destination_path" tf:""` + // The source path of the file or directory. The path should be the absolute + // DBFS path. + SourcePath types.String `tfsdk:"source_path" tf:""` +} + +func (newState *Move_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Move_SdkV2) { +} + +func (newState *Move_SdkV2) SyncEffectiveFieldsDuringRead(existingState Move_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Move_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, Move_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Move_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_path": o.DestinationPath, + "source_path": o.SourcePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Move_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_path": types.StringType, + "source_path": types.StringType, + }, + } +} + +type MoveResponse_SdkV2 struct { +} + +func (newState *MoveResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MoveResponse_SdkV2) { +} + +func (newState *MoveResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MoveResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MoveResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MoveResponse_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, MoveResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MoveResponse_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 MoveResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Put_SdkV2 struct { + // This parameter might be absent, and instead a posted file will be used. + Contents types.String `tfsdk:"contents" tf:"optional"` + // The flag that specifies whether to overwrite existing file/files. + Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + // The path of the new file. The path should be the absolute DBFS path. + Path types.String `tfsdk:"path" tf:""` +} + +func (newState *Put_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Put_SdkV2) { +} + +func (newState *Put_SdkV2) SyncEffectiveFieldsDuringRead(existingState Put_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Put_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, Put_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Put_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "contents": o.Contents, + "overwrite": o.Overwrite, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Put_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "contents": types.StringType, + "overwrite": types.BoolType, + "path": types.StringType, + }, + } +} + +type PutResponse_SdkV2 struct { +} + +func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutResponse_SdkV2) { +} + +func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutResponse_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, PutResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutResponse_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 PutResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Get the contents of a file +type ReadDbfsRequest_SdkV2 struct { + // The number of bytes to read starting from the offset. This has a limit of + // 1 MB, and a default value of 0.5 MB. + Length types.Int64 `tfsdk:"-"` + // The offset to read from in bytes. + Offset types.Int64 `tfsdk:"-"` + // The path of the file to read. The path should be the absolute DBFS path. + Path types.String `tfsdk:"-"` +} + +func (newState *ReadDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadDbfsRequest_SdkV2) { +} + +func (newState *ReadDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadDbfsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadDbfsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReadDbfsRequest_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, ReadDbfsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReadDbfsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "length": o.Length, + "offset": o.Offset, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ReadDbfsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "length": types.Int64Type, + "offset": types.Int64Type, + "path": types.StringType, + }, + } +} + +type ReadResponse_SdkV2 struct { + // The number of bytes read (could be less than ``length`` if we hit end of + // file). This refers to number of bytes read in unencoded version (response + // data is base64-encoded). + BytesRead types.Int64 `tfsdk:"bytes_read" tf:"optional"` + // The base64-encoded contents of the file read. + Data types.String `tfsdk:"data" tf:"optional"` +} + +func (newState *ReadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReadResponse_SdkV2) { +} + +func (newState *ReadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReadResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReadResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReadResponse_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, ReadResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReadResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bytes_read": o.BytesRead, + "data": o.Data, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ReadResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bytes_read": types.Int64Type, + "data": types.StringType, + }, + } +} + +// Upload a file +type UploadRequest_SdkV2 struct { + Contents types.Object `tfsdk:"-"` + // The absolute path of the file. + FilePath types.String `tfsdk:"-"` + // If true, an existing file will be overwritten. + Overwrite types.Bool `tfsdk:"-"` +} + +func (newState *UploadRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadRequest_SdkV2) { +} + +func (newState *UploadRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UploadRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UploadRequest_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, UploadRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UploadRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "contents": o.Contents, + "file_path": o.FilePath, + "overwrite": o.Overwrite, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UploadRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "contents": types.ObjectType{}, + "file_path": types.StringType, + "overwrite": types.BoolType, + }, + } +} + +type UploadResponse_SdkV2 struct { +} + +func (newState *UploadResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UploadResponse_SdkV2) { +} + +func (newState *UploadResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UploadResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UploadResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UploadResponse_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, UploadResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UploadResponse_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 UploadResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} diff --git a/internal/service/iam_tf/legacy_model.go b/internal/service/iam_tf/legacy_model.go new file mode 100755 index 000000000..69982a05f --- /dev/null +++ b/internal/service/iam_tf/legacy_model.go @@ -0,0 +1,4850 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package iam_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *AccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlRequest_SdkV2) { +} + +func (newState *AccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccessControlRequest_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, AccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type AccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *AccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControlResponse_SdkV2) { +} + +func (newState *AccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(Permission_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, AccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: Permission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in AccessControlResponse_SdkV2 as +// a slice of Permission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]Permission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []Permission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in AccessControlResponse_SdkV2. +func (o *AccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []Permission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type ComplexValue_SdkV2 struct { + Display types.String `tfsdk:"display" tf:"optional"` + + Primary types.Bool `tfsdk:"primary" tf:"optional"` + + Ref types.String `tfsdk:"$ref" tf:"optional"` + + Type_ types.String `tfsdk:"type" tf:"optional"` + + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *ComplexValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplexValue_SdkV2) { +} + +func (newState *ComplexValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplexValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplexValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ComplexValue_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, ComplexValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ComplexValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display": o.Display, + "primary": o.Primary, + "$ref": o.Ref, + "type": o.Type_, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ComplexValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display": types.StringType, + "primary": types.BoolType, + "$ref": types.StringType, + "type": types.StringType, + "value": types.StringType, + }, + } +} + +// Delete a group +type DeleteAccountGroupRequest_SdkV2 struct { + // Unique ID for a group in the Databricks account. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountGroupRequest_SdkV2) { +} + +func (newState *DeleteAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountGroupRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountGroupRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountGroupRequest_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, DeleteAccountGroupRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountGroupRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a service principal +type DeleteAccountServicePrincipalRequest_SdkV2 struct { + // Unique ID for a service principal in the Databricks account. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountServicePrincipalRequest_SdkV2) { +} + +func (newState *DeleteAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountServicePrincipalRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountServicePrincipalRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountServicePrincipalRequest_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, DeleteAccountServicePrincipalRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountServicePrincipalRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountServicePrincipalRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a user +type DeleteAccountUserRequest_SdkV2 struct { + // Unique ID for a user in the Databricks account. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountUserRequest_SdkV2) { +} + +func (newState *DeleteAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountUserRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountUserRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountUserRequest_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, DeleteAccountUserRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountUserRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountUserRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a group +type DeleteGroupRequest_SdkV2 struct { + // Unique ID for a group in the Databricks workspace. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteGroupRequest_SdkV2) { +} + +func (newState *DeleteGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteGroupRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteGroupRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteGroupRequest_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, DeleteGroupRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteGroupRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete a service principal +type DeleteServicePrincipalRequest_SdkV2 struct { + // Unique ID for a service principal in the Databricks workspace. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalRequest_SdkV2) { +} + +func (newState *DeleteServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteServicePrincipalRequest_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, DeleteServicePrincipalRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteServicePrincipalRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteServicePrincipalRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a user +type DeleteUserRequest_SdkV2 struct { + // Unique ID for a user in the Databricks workspace. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteUserRequest_SdkV2) { +} + +func (newState *DeleteUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteUserRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteUserRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteUserRequest_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, DeleteUserRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteUserRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteUserRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete permissions assignment +type DeleteWorkspaceAssignmentRequest_SdkV2 struct { + // The ID of the user, service principal, or group. + PrincipalId types.Int64 `tfsdk:"-"` + // The workspace ID for the account. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceAssignmentRequest_SdkV2) { +} + +func (newState *DeleteWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceAssignmentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceAssignmentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWorkspaceAssignmentRequest_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, DeleteWorkspaceAssignmentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspaceAssignmentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal_id": o.PrincipalId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteWorkspaceAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal_id": types.Int64Type, + "workspace_id": types.Int64Type, + }, + } +} + +type DeleteWorkspacePermissionAssignmentResponse_SdkV2 struct { +} + +func (newState *DeleteWorkspacePermissionAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspacePermissionAssignmentResponse_SdkV2) { +} + +func (newState *DeleteWorkspacePermissionAssignmentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspacePermissionAssignmentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspacePermissionAssignmentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWorkspacePermissionAssignmentResponse_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, DeleteWorkspacePermissionAssignmentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspacePermissionAssignmentResponse_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 DeleteWorkspacePermissionAssignmentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Get group details +type GetAccountGroupRequest_SdkV2 struct { + // Unique ID for a group in the Databricks account. + Id types.String `tfsdk:"-"` +} + +func (newState *GetAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountGroupRequest_SdkV2) { +} + +func (newState *GetAccountGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountGroupRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountGroupRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountGroupRequest_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, GetAccountGroupRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountGroupRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Get service principal details +type GetAccountServicePrincipalRequest_SdkV2 struct { + // Unique ID for a service principal in the Databricks account. + Id types.String `tfsdk:"-"` +} + +func (newState *GetAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountServicePrincipalRequest_SdkV2) { +} + +func (newState *GetAccountServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountServicePrincipalRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountServicePrincipalRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountServicePrincipalRequest_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, GetAccountServicePrincipalRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountServicePrincipalRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountServicePrincipalRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Get user details +type GetAccountUserRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. Default is 10000. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Unique ID for a user in the Databricks account. + Id types.String `tfsdk:"-"` + // Attribute to sort the results. Multi-part paths are supported. For + // example, `userName`, `name.givenName`, and `emails`. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *GetAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountUserRequest_SdkV2) { +} + +func (newState *GetAccountUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountUserRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountUserRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountUserRequest_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, GetAccountUserRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountUserRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "id": o.Id, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountUserRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "id": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// Get assignable roles for a resource +type GetAssignableRolesForResourceRequest_SdkV2 struct { + // The resource name for which assignable roles will be listed. + Resource types.String `tfsdk:"-"` +} + +func (newState *GetAssignableRolesForResourceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceRequest_SdkV2) { +} + +func (newState *GetAssignableRolesForResourceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAssignableRolesForResourceRequest_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, GetAssignableRolesForResourceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAssignableRolesForResourceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "resource": o.Resource, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAssignableRolesForResourceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "resource": types.StringType, + }, + } +} + +type GetAssignableRolesForResourceResponse_SdkV2 struct { + Roles types.List `tfsdk:"roles" tf:"optional"` +} + +func (newState *GetAssignableRolesForResourceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAssignableRolesForResourceResponse_SdkV2) { +} + +func (newState *GetAssignableRolesForResourceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAssignableRolesForResourceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAssignableRolesForResourceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAssignableRolesForResourceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "roles": reflect.TypeOf(Role_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, GetAssignableRolesForResourceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAssignableRolesForResourceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "roles": o.Roles, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAssignableRolesForResourceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "roles": basetypes.ListType{ + ElemType: Role{}.Type(ctx), + }, + }, + } +} + +// GetRoles returns the value of the Roles field in GetAssignableRolesForResourceResponse_SdkV2 as +// a slice of Role_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetAssignableRolesForResourceResponse_SdkV2) GetRoles(ctx context.Context) ([]Role_SdkV2, bool) { + if o.Roles.IsNull() || o.Roles.IsUnknown() { + return nil, false + } + var v []Role_SdkV2 + d := o.Roles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRoles sets the value of the Roles field in GetAssignableRolesForResourceResponse_SdkV2. +func (o *GetAssignableRolesForResourceResponse_SdkV2) SetRoles(ctx context.Context, v []Role_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["roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.Roles = types.ListValueMust(t, vs) +} + +// Get group details +type GetGroupRequest_SdkV2 struct { + // Unique ID for a group in the Databricks workspace. + Id types.String `tfsdk:"-"` +} + +func (newState *GetGroupRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetGroupRequest_SdkV2) { +} + +func (newState *GetGroupRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetGroupRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetGroupRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetGroupRequest_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, GetGroupRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetGroupRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetGroupRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetPasswordPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetPasswordPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPasswordPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetPasswordPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPasswordPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPasswordPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPasswordPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(PasswordPermissionsDescription_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, GetPasswordPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPasswordPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: PasswordPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetPasswordPermissionLevelsResponse_SdkV2 as +// a slice of PasswordPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPasswordPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]PasswordPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []PasswordPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetPasswordPermissionLevelsResponse_SdkV2. +func (o *GetPasswordPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []PasswordPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get object permission levels +type GetPermissionLevelsRequest_SdkV2 struct { + // + RequestObjectId types.String `tfsdk:"-"` + // + RequestObjectType types.String `tfsdk:"-"` +} + +func (newState *GetPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPermissionLevelsRequest_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, GetPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "request_object_id": types.StringType, + "request_object_type": types.StringType, + }, + } +} + +type GetPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(PermissionsDescription_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, GetPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: PermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetPermissionLevelsResponse_SdkV2 as +// a slice of PermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]PermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []PermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetPermissionLevelsResponse_SdkV2. +func (o *GetPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []PermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get object permissions +type GetPermissionRequest_SdkV2 struct { + // The id of the request object. + RequestObjectId types.String `tfsdk:"-"` + // The type of the request object. Can be one of the following: alerts, + // authorization, clusters, cluster-policies, dashboards, dbsql-dashboards, + // directories, experiments, files, instance-pools, jobs, notebooks, + // pipelines, queries, registered-models, repos, serving-endpoints, or + // warehouses. + RequestObjectType types.String `tfsdk:"-"` +} + +func (newState *GetPermissionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPermissionRequest_SdkV2) { +} + +func (newState *GetPermissionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPermissionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPermissionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPermissionRequest_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, GetPermissionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPermissionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPermissionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "request_object_id": types.StringType, + "request_object_type": types.StringType, + }, + } +} + +// Get a rule set +type GetRuleSetRequest_SdkV2 struct { + // Etag used for versioning. The response is at least as fresh as the eTag + // provided. Etag is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a rule set from overwriting each + // other. It is strongly suggested that systems make use of the etag in the + // read -> modify -> write pattern to perform rule set updates in order to + // avoid race conditions that is get an etag from a GET rule set request, + // and pass it with the PUT update request to identify the rule set version + // you are updating. + Etag types.String `tfsdk:"-"` + // The ruleset name associated with the request. + Name types.String `tfsdk:"-"` +} + +func (newState *GetRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRuleSetRequest_SdkV2) { +} + +func (newState *GetRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRuleSetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRuleSetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRuleSetRequest_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, GetRuleSetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRuleSetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRuleSetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "name": types.StringType, + }, + } +} + +// Get service principal details +type GetServicePrincipalRequest_SdkV2 struct { + // Unique ID for a service principal in the Databricks workspace. + Id types.String `tfsdk:"-"` +} + +func (newState *GetServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalRequest_SdkV2) { +} + +func (newState *GetServicePrincipalRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetServicePrincipalRequest_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, GetServicePrincipalRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServicePrincipalRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetServicePrincipalRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Get user details +type GetUserRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Unique ID for a user in the Databricks workspace. + Id types.String `tfsdk:"-"` + // Attribute to sort the results. Multi-part paths are supported. For + // example, `userName`, `name.givenName`, and `emails`. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *GetUserRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUserRequest_SdkV2) { +} + +func (newState *GetUserRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUserRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUserRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetUserRequest_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, GetUserRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetUserRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "id": o.Id, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetUserRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "id": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// List workspace permissions +type GetWorkspaceAssignmentRequest_SdkV2 struct { + // The workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *GetWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceAssignmentRequest_SdkV2) { +} + +func (newState *GetWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceAssignmentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceAssignmentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceAssignmentRequest_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, GetWorkspaceAssignmentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceAssignmentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_id": types.Int64Type, + }, + } +} + +type GrantRule_SdkV2 struct { + // Principals this grant rule applies to. + Principals types.List `tfsdk:"principals" tf:"optional"` + // Role that is assigned to the list of principals. + Role types.String `tfsdk:"role" tf:""` +} + +func (newState *GrantRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GrantRule_SdkV2) { +} + +func (newState *GrantRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState GrantRule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GrantRule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GrantRule_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "principals": 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, GrantRule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GrantRule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principals": o.Principals, + "role": o.Role, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GrantRule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principals": basetypes.ListType{ + ElemType: types.StringType, + }, + "role": types.StringType, + }, + } +} + +// GetPrincipals returns the value of the Principals field in GrantRule_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GrantRule_SdkV2) GetPrincipals(ctx context.Context) ([]types.String, bool) { + if o.Principals.IsNull() || o.Principals.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Principals.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrincipals sets the value of the Principals field in GrantRule_SdkV2. +func (o *GrantRule_SdkV2) SetPrincipals(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["principals"] + t = t.(attr.TypeWithElementType).ElementType() + o.Principals = types.ListValueMust(t, vs) +} + +type Group_SdkV2 struct { + // String that represents a human-readable group name + DisplayName types.String `tfsdk:"displayName" tf:"optional"` + // Entitlements assigned to the group. See [assigning entitlements] for a + // full list of supported values. + // + // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements + Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + + ExternalId types.String `tfsdk:"externalId" tf:"optional"` + + Groups types.List `tfsdk:"groups" tf:"optional"` + // Databricks group ID + Id types.String `tfsdk:"id" tf:"optional"` + + Members types.List `tfsdk:"members" tf:"optional"` + // Container for the group identifier. Workspace local versus account. + Meta types.List `tfsdk:"meta" tf:"optional,object"` + // Corresponds to AWS instance profile/arn role. + Roles types.List `tfsdk:"roles" tf:"optional"` + // The schema of the group. + Schemas types.List `tfsdk:"schemas" tf:"optional"` +} + +func (newState *Group_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Group_SdkV2) { +} + +func (newState *Group_SdkV2) SyncEffectiveFieldsDuringRead(existingState Group_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Group. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Group_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "entitlements": reflect.TypeOf(ComplexValue_SdkV2{}), + "groups": reflect.TypeOf(ComplexValue_SdkV2{}), + "members": reflect.TypeOf(ComplexValue_SdkV2{}), + "meta": reflect.TypeOf(ResourceMeta_SdkV2{}), + "roles": reflect.TypeOf(ComplexValue_SdkV2{}), + "schemas": 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, Group_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Group_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "displayName": o.DisplayName, + "entitlements": o.Entitlements, + "externalId": o.ExternalId, + "groups": o.Groups, + "id": o.Id, + "members": o.Members, + "meta": o.Meta, + "roles": o.Roles, + "schemas": o.Schemas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Group_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "displayName": types.StringType, + "entitlements": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "externalId": types.StringType, + "groups": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "id": types.StringType, + "members": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "meta": basetypes.ListType{ + ElemType: ResourceMeta{}.Type(ctx), + }, + "roles": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetEntitlements returns the value of the Entitlements field in Group_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetEntitlements(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Entitlements.IsNull() || o.Entitlements.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Entitlements.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEntitlements sets the value of the Entitlements field in Group_SdkV2. +func (o *Group_SdkV2) SetEntitlements(ctx context.Context, v []ComplexValue_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["entitlements"] + t = t.(attr.TypeWithElementType).ElementType() + o.Entitlements = types.ListValueMust(t, vs) +} + +// GetGroups returns the value of the Groups field in Group_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetGroups(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Groups.IsNull() || o.Groups.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Groups.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGroups sets the value of the Groups field in Group_SdkV2. +func (o *Group_SdkV2) SetGroups(ctx context.Context, v []ComplexValue_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["groups"] + t = t.(attr.TypeWithElementType).ElementType() + o.Groups = types.ListValueMust(t, vs) +} + +// GetMembers returns the value of the Members field in Group_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetMembers(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Members.IsNull() || o.Members.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Members.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMembers sets the value of the Members field in Group_SdkV2. +func (o *Group_SdkV2) SetMembers(ctx context.Context, v []ComplexValue_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["members"] + t = t.(attr.TypeWithElementType).ElementType() + o.Members = types.ListValueMust(t, vs) +} + +// GetMeta returns the value of the Meta field in Group_SdkV2 as +// a ResourceMeta_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetMeta(ctx context.Context) (ResourceMeta_SdkV2, bool) { + var e ResourceMeta_SdkV2 + if o.Meta.IsNull() || o.Meta.IsUnknown() { + return e, false + } + var v []ResourceMeta_SdkV2 + d := o.Meta.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMeta sets the value of the Meta field in Group_SdkV2. +func (o *Group_SdkV2) SetMeta(ctx context.Context, v ResourceMeta_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["meta"] + o.Meta = types.ListValueMust(t, vs) +} + +// GetRoles returns the value of the Roles field in Group_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetRoles(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Roles.IsNull() || o.Roles.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Roles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRoles sets the value of the Roles field in Group_SdkV2. +func (o *Group_SdkV2) SetRoles(ctx context.Context, v []ComplexValue_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["roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.Roles = types.ListValueMust(t, vs) +} + +// GetSchemas returns the value of the Schemas field in Group_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Group_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in Group_SdkV2. +func (o *Group_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +// List group details +type ListAccountGroupsRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. Default is 10000. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListAccountGroupsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountGroupsRequest_SdkV2) { +} + +func (newState *ListAccountGroupsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountGroupsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountGroupsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountGroupsRequest_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, ListAccountGroupsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountGroupsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountGroupsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// List service principals +type ListAccountServicePrincipalsRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. Default is 10000. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListAccountServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountServicePrincipalsRequest_SdkV2) { +} + +func (newState *ListAccountServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountServicePrincipalsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountServicePrincipalsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountServicePrincipalsRequest_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, ListAccountServicePrincipalsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountServicePrincipalsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountServicePrincipalsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// List users +type ListAccountUsersRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. Default is 10000. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. Multi-part paths are supported. For + // example, `userName`, `name.givenName`, and `emails`. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListAccountUsersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountUsersRequest_SdkV2) { +} + +func (newState *ListAccountUsersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountUsersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountUsersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountUsersRequest_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, ListAccountUsersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountUsersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAccountUsersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// List group details +type ListGroupsRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListGroupsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsRequest_SdkV2) { +} + +func (newState *ListGroupsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGroupsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListGroupsRequest_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, ListGroupsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListGroupsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListGroupsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +type ListGroupsResponse_SdkV2 struct { + // Total results returned in the response. + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + // User objects returned in the response. + Resources types.List `tfsdk:"Resources" tf:"optional"` + // The schema of the service principal. + Schemas types.List `tfsdk:"schemas" tf:"optional"` + // Starting index of all the results that matched the request filters. First + // item is number 1. + StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + // Total results that match the request filters. + TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` +} + +func (newState *ListGroupsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListGroupsResponse_SdkV2) { +} + +func (newState *ListGroupsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListGroupsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListGroupsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListGroupsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "Resources": reflect.TypeOf(Group_SdkV2{}), + "schemas": 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, ListGroupsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListGroupsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListGroupsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "itemsPerPage": types.Int64Type, + "Resources": basetypes.ListType{ + ElemType: Group{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + "startIndex": types.Int64Type, + "totalResults": types.Int64Type, + }, + } +} + +// GetResources returns the value of the Resources field in ListGroupsResponse_SdkV2 as +// a slice of Group_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListGroupsResponse_SdkV2) GetResources(ctx context.Context) ([]Group_SdkV2, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []Group_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 ListGroupsResponse_SdkV2. +func (o *ListGroupsResponse_SdkV2) SetResources(ctx context.Context, v []Group_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) +} + +// GetSchemas returns the value of the Schemas field in ListGroupsResponse_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListGroupsResponse_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ListGroupsResponse_SdkV2. +func (o *ListGroupsResponse_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +type ListServicePrincipalResponse_SdkV2 struct { + // Total results returned in the response. + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + // User objects returned in the response. + Resources types.List `tfsdk:"Resources" tf:"optional"` + // The schema of the List response. + Schemas types.List `tfsdk:"schemas" tf:"optional"` + // Starting index of all the results that matched the request filters. First + // item is number 1. + StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + // Total results that match the request filters. + TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` +} + +func (newState *ListServicePrincipalResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalResponse_SdkV2) { +} + +func (newState *ListServicePrincipalResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListServicePrincipalResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "Resources": reflect.TypeOf(ServicePrincipal_SdkV2{}), + "schemas": 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, ListServicePrincipalResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServicePrincipalResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "itemsPerPage": types.Int64Type, + "Resources": basetypes.ListType{ + ElemType: ServicePrincipal{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + "startIndex": types.Int64Type, + "totalResults": types.Int64Type, + }, + } +} + +// GetResources returns the value of the Resources field in ListServicePrincipalResponse_SdkV2 as +// a slice of ServicePrincipal_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListServicePrincipalResponse_SdkV2) GetResources(ctx context.Context) ([]ServicePrincipal_SdkV2, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []ServicePrincipal_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 ListServicePrincipalResponse_SdkV2. +func (o *ListServicePrincipalResponse_SdkV2) SetResources(ctx context.Context, v []ServicePrincipal_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) +} + +// GetSchemas returns the value of the Schemas field in ListServicePrincipalResponse_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListServicePrincipalResponse_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ListServicePrincipalResponse_SdkV2. +func (o *ListServicePrincipalResponse_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +// List service principals +type ListServicePrincipalsRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalsRequest_SdkV2) { +} + +func (newState *ListServicePrincipalsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListServicePrincipalsRequest_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, ListServicePrincipalsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServicePrincipalsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +// List users +type ListUsersRequest_SdkV2 struct { + // Comma-separated list of attributes to return in response. + Attributes types.String `tfsdk:"-"` + // Desired number of results per page. + Count types.Int64 `tfsdk:"-"` + // Comma-separated list of attributes to exclude in response. + ExcludedAttributes types.String `tfsdk:"-"` + // Query by which the results have to be filtered. Supported operators are + // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). + // Additionally, simple expressions can be formed using logical operators - + // `and` and `or`. The [SCIM RFC] has more details but we currently only + // support simple expressions. + // + // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + Filter types.String `tfsdk:"-"` + // Attribute to sort the results. Multi-part paths are supported. For + // example, `userName`, `name.givenName`, and `emails`. + SortBy types.String `tfsdk:"-"` + // The order to sort the results. + SortOrder types.String `tfsdk:"-"` + // Specifies the index of the first result. First item is number 1. + StartIndex types.Int64 `tfsdk:"-"` +} + +func (newState *ListUsersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersRequest_SdkV2) { +} + +func (newState *ListUsersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUsersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListUsersRequest_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, ListUsersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListUsersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attributes": o.Attributes, + "count": o.Count, + "excludedAttributes": o.ExcludedAttributes, + "filter": o.Filter, + "sortBy": o.SortBy, + "sortOrder": o.SortOrder, + "startIndex": o.StartIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListUsersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attributes": types.StringType, + "count": types.Int64Type, + "excludedAttributes": types.StringType, + "filter": types.StringType, + "sortBy": types.StringType, + "sortOrder": types.StringType, + "startIndex": types.Int64Type, + }, + } +} + +type ListUsersResponse_SdkV2 struct { + // Total results returned in the response. + ItemsPerPage types.Int64 `tfsdk:"itemsPerPage" tf:"optional"` + // User objects returned in the response. + Resources types.List `tfsdk:"Resources" tf:"optional"` + // The schema of the List response. + Schemas types.List `tfsdk:"schemas" tf:"optional"` + // Starting index of all the results that matched the request filters. First + // item is number 1. + StartIndex types.Int64 `tfsdk:"startIndex" tf:"optional"` + // Total results that match the request filters. + TotalResults types.Int64 `tfsdk:"totalResults" tf:"optional"` +} + +func (newState *ListUsersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUsersResponse_SdkV2) { +} + +func (newState *ListUsersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUsersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUsersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListUsersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "Resources": reflect.TypeOf(User_SdkV2{}), + "schemas": 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, ListUsersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListUsersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListUsersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "itemsPerPage": types.Int64Type, + "Resources": basetypes.ListType{ + ElemType: User{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + "startIndex": types.Int64Type, + "totalResults": types.Int64Type, + }, + } +} + +// GetResources returns the value of the Resources field in ListUsersResponse_SdkV2 as +// a slice of User_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListUsersResponse_SdkV2) GetResources(ctx context.Context) ([]User_SdkV2, bool) { + if o.Resources.IsNull() || o.Resources.IsUnknown() { + return nil, false + } + var v []User_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 ListUsersResponse_SdkV2. +func (o *ListUsersResponse_SdkV2) SetResources(ctx context.Context, v []User_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) +} + +// GetSchemas returns the value of the Schemas field in ListUsersResponse_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListUsersResponse_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ListUsersResponse_SdkV2. +func (o *ListUsersResponse_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +// Get permission assignments +type ListWorkspaceAssignmentRequest_SdkV2 struct { + // The workspace ID for the account. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *ListWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceAssignmentRequest_SdkV2) { +} + +func (newState *ListWorkspaceAssignmentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceAssignmentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceAssignmentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListWorkspaceAssignmentRequest_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, ListWorkspaceAssignmentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWorkspaceAssignmentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWorkspaceAssignmentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_id": types.Int64Type, + }, + } +} + +type MigratePermissionsRequest_SdkV2 struct { + // The name of the workspace group that permissions will be migrated from. + FromWorkspaceGroupName types.String `tfsdk:"from_workspace_group_name" tf:""` + // The maximum number of permissions that will be migrated. + Size types.Int64 `tfsdk:"size" tf:"optional"` + // The name of the account group that permissions will be migrated to. + ToAccountGroupName types.String `tfsdk:"to_account_group_name" tf:""` + // WorkspaceId of the associated workspace where the permission migration + // will occur. + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:""` +} + +func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsRequest_SdkV2) { +} + +func (newState *MigratePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MigratePermissionsRequest_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, MigratePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MigratePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "from_workspace_group_name": o.FromWorkspaceGroupName, + "size": o.Size, + "to_account_group_name": o.ToAccountGroupName, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MigratePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "from_workspace_group_name": types.StringType, + "size": types.Int64Type, + "to_account_group_name": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type MigratePermissionsResponse_SdkV2 struct { + // Number of permissions migrated. + PermissionsMigrated types.Int64 `tfsdk:"permissions_migrated" tf:"optional"` +} + +func (newState *MigratePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigratePermissionsResponse_SdkV2) { +} + +func (newState *MigratePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MigratePermissionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MigratePermissionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MigratePermissionsResponse_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, MigratePermissionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MigratePermissionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permissions_migrated": o.PermissionsMigrated, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MigratePermissionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permissions_migrated": types.Int64Type, + }, + } +} + +type Name_SdkV2 struct { + // Family name of the Databricks user. + FamilyName types.String `tfsdk:"familyName" tf:"optional"` + // Given name of the Databricks user. + GivenName types.String `tfsdk:"givenName" tf:"optional"` +} + +func (newState *Name_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Name_SdkV2) { +} + +func (newState *Name_SdkV2) SyncEffectiveFieldsDuringRead(existingState Name_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Name. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Name_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, Name_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Name_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "familyName": o.FamilyName, + "givenName": o.GivenName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Name_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "familyName": types.StringType, + "givenName": types.StringType, + }, + } +} + +type ObjectPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *ObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectPermissions_SdkV2) { +} + +func (newState *ObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ObjectPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ObjectPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AccessControlResponse_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, ObjectPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ObjectPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ObjectPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ObjectPermissions_SdkV2 as +// a slice of AccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ObjectPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]AccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ObjectPermissions_SdkV2. +func (o *ObjectPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []AccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type PartialUpdate_SdkV2 struct { + // Unique ID for a user in the Databricks workspace. + Id types.String `tfsdk:"-"` + + Operations types.List `tfsdk:"Operations" tf:"optional"` + // The schema of the patch request. Must be + // ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]. + Schemas types.List `tfsdk:"schemas" tf:"optional"` +} + +func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartialUpdate_SdkV2) { +} + +func (newState *PartialUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartialUpdate_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PartialUpdate_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "Operations": reflect.TypeOf(Patch_SdkV2{}), + "schemas": 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, PartialUpdate_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PartialUpdate_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "Operations": o.Operations, + "schemas": o.Schemas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PartialUpdate_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "Operations": basetypes.ListType{ + ElemType: Patch{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetOperations returns the value of the Operations field in PartialUpdate_SdkV2 as +// a slice of Patch_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PartialUpdate_SdkV2) GetOperations(ctx context.Context) ([]Patch_SdkV2, bool) { + if o.Operations.IsNull() || o.Operations.IsUnknown() { + return nil, false + } + var v []Patch_SdkV2 + d := o.Operations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOperations sets the value of the Operations field in PartialUpdate_SdkV2. +func (o *PartialUpdate_SdkV2) SetOperations(ctx context.Context, v []Patch_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["Operations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Operations = types.ListValueMust(t, vs) +} + +// GetSchemas returns the value of the Schemas field in PartialUpdate_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PartialUpdate_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in PartialUpdate_SdkV2. +func (o *PartialUpdate_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +type PasswordAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *PasswordAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlRequest_SdkV2) { +} + +func (newState *PasswordAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordAccessControlRequest_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, PasswordAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type PasswordAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *PasswordAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordAccessControlResponse_SdkV2) { +} + +func (newState *PasswordAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(PasswordPermission_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, PasswordAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: PasswordPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in PasswordAccessControlResponse_SdkV2 as +// a slice of PasswordPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PasswordAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]PasswordPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []PasswordPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in PasswordAccessControlResponse_SdkV2. +func (o *PasswordAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []PasswordPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type PasswordPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PasswordPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermission_SdkV2) { +} + +func (newState *PasswordPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, PasswordPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in PasswordPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PasswordPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in PasswordPermission_SdkV2. +func (o *PasswordPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type PasswordPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *PasswordPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissions_SdkV2) { +} + +func (newState *PasswordPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(PasswordAccessControlResponse_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, PasswordPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: PasswordAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in PasswordPermissions_SdkV2 as +// a slice of PasswordAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PasswordPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]PasswordAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []PasswordAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in PasswordPermissions_SdkV2. +func (o *PasswordPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []PasswordAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type PasswordPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PasswordPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsDescription_SdkV2) { +} + +func (newState *PasswordPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PasswordPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordPermissionsDescription_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, PasswordPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type PasswordPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` +} + +func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PasswordPermissionsRequest_SdkV2) { +} + +func (newState *PasswordPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PasswordPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PasswordPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(PasswordAccessControlRequest_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, PasswordPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PasswordPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: PasswordAccessControlRequest{}.Type(ctx), + }, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in PasswordPermissionsRequest_SdkV2 as +// a slice of PasswordAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PasswordPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]PasswordAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []PasswordAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in PasswordPermissionsRequest_SdkV2. +func (o *PasswordPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []PasswordAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type Patch_SdkV2 struct { + // Type of patch operation. + Op types.String `tfsdk:"op" tf:"optional"` + // Selection of patch operation + Path types.String `tfsdk:"path" tf:"optional"` + // Value to modify + Value types.Object `tfsdk:"value" tf:"optional"` +} + +func (newState *Patch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch_SdkV2) { +} + +func (newState *Patch_SdkV2) SyncEffectiveFieldsDuringRead(existingState Patch_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Patch. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Patch_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, Patch_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Patch_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "op": o.Op, + "path": o.Path, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Patch_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "op": types.StringType, + "path": types.StringType, + "value": types.ObjectType{}, + }, + } +} + +type PatchResponse_SdkV2 struct { +} + +func (newState *PatchResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchResponse_SdkV2) { +} + +func (newState *PatchResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PatchResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PatchResponse_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, PatchResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PatchResponse_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 PatchResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Permission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *Permission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Permission_SdkV2) { +} + +func (newState *Permission_SdkV2) SyncEffectiveFieldsDuringRead(existingState Permission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Permission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Permission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, Permission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Permission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Permission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in Permission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Permission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in Permission_SdkV2. +func (o *Permission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +// The output format for existing workspace PermissionAssignment records, which +// contains some info for user consumption. +type PermissionAssignment_SdkV2 struct { + // Error response associated with a workspace permission assignment, if any. + Error types.String `tfsdk:"error" tf:"optional"` + // The permissions level of the principal. + Permissions types.List `tfsdk:"permissions" tf:"optional"` + // Information about the principal assigned to the workspace. + Principal types.List `tfsdk:"principal" tf:"optional,object"` +} + +func (newState *PermissionAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignment_SdkV2) { +} + +func (newState *PermissionAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permissions": reflect.TypeOf(types.String{}), + "principal": reflect.TypeOf(PrincipalOutput_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, PermissionAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error": o.Error, + "permissions": o.Permissions, + "principal": o.Principal, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error": types.StringType, + "permissions": basetypes.ListType{ + ElemType: types.StringType, + }, + "principal": basetypes.ListType{ + ElemType: PrincipalOutput{}.Type(ctx), + }, + }, + } +} + +// GetPermissions returns the value of the Permissions field in PermissionAssignment_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionAssignment_SdkV2) GetPermissions(ctx context.Context) ([]types.String, bool) { + if o.Permissions.IsNull() || o.Permissions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Permissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissions sets the value of the Permissions field in PermissionAssignment_SdkV2. +func (o *PermissionAssignment_SdkV2) SetPermissions(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["permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Permissions = types.ListValueMust(t, vs) +} + +// GetPrincipal returns the value of the Principal field in PermissionAssignment_SdkV2 as +// a PrincipalOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionAssignment_SdkV2) GetPrincipal(ctx context.Context) (PrincipalOutput_SdkV2, bool) { + var e PrincipalOutput_SdkV2 + if o.Principal.IsNull() || o.Principal.IsUnknown() { + return e, false + } + var v []PrincipalOutput_SdkV2 + d := o.Principal.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPrincipal sets the value of the Principal field in PermissionAssignment_SdkV2. +func (o *PermissionAssignment_SdkV2) SetPrincipal(ctx context.Context, v PrincipalOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["principal"] + o.Principal = types.ListValueMust(t, vs) +} + +type PermissionAssignments_SdkV2 struct { + // Array of permissions assignments defined for a workspace. + PermissionAssignments types.List `tfsdk:"permission_assignments" tf:"optional"` +} + +func (newState *PermissionAssignments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignments_SdkV2) { +} + +func (newState *PermissionAssignments_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionAssignments_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionAssignments. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionAssignments_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_assignments": reflect.TypeOf(PermissionAssignment_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, PermissionAssignments_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionAssignments_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_assignments": o.PermissionAssignments, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionAssignments_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_assignments": basetypes.ListType{ + ElemType: PermissionAssignment{}.Type(ctx), + }, + }, + } +} + +// GetPermissionAssignments returns the value of the PermissionAssignments field in PermissionAssignments_SdkV2 as +// a slice of PermissionAssignment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionAssignments_SdkV2) GetPermissionAssignments(ctx context.Context) ([]PermissionAssignment_SdkV2, bool) { + if o.PermissionAssignments.IsNull() || o.PermissionAssignments.IsUnknown() { + return nil, false + } + var v []PermissionAssignment_SdkV2 + d := o.PermissionAssignments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionAssignments sets the value of the PermissionAssignments field in PermissionAssignments_SdkV2. +func (o *PermissionAssignments_SdkV2) SetPermissionAssignments(ctx context.Context, v []PermissionAssignment_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["permission_assignments"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionAssignments = types.ListValueMust(t, vs) +} + +type PermissionOutput_SdkV2 struct { + // The results of a permissions query. + Description types.String `tfsdk:"description" tf:"optional"` + + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PermissionOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionOutput_SdkV2) { +} + +func (newState *PermissionOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionOutput_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, PermissionOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type PermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsDescription_SdkV2) { +} + +func (newState *PermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionsDescription_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, PermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type PermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The id of the request object. + RequestObjectId types.String `tfsdk:"-"` + // The type of the request object. Can be one of the following: alerts, + // authorization, clusters, cluster-policies, dashboards, dbsql-dashboards, + // directories, experiments, files, instance-pools, jobs, notebooks, + // pipelines, queries, registered-models, repos, serving-endpoints, or + // warehouses. + RequestObjectType types.String `tfsdk:"-"` +} + +func (newState *PermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionsRequest_SdkV2) { +} + +func (newState *PermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AccessControlRequest_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, PermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AccessControlRequest{}.Type(ctx), + }, + "request_object_id": types.StringType, + "request_object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in PermissionsRequest_SdkV2 as +// a slice of AccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]AccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in PermissionsRequest_SdkV2. +func (o *PermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []AccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// Information about the principal assigned to the workspace. +type PrincipalOutput_SdkV2 struct { + // The display name of the principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The group name of the group. Present only if the principal is a group. + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // The unique, opaque id of the principal. + PrincipalId types.Int64 `tfsdk:"principal_id" tf:"optional"` + // The name of the service principal. Present only if the principal is a + // service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // The username of the user. Present only if the principal is a user. + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *PrincipalOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrincipalOutput_SdkV2) { +} + +func (newState *PrincipalOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrincipalOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PrincipalOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PrincipalOutput_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, PrincipalOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PrincipalOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "group_name": o.GroupName, + "principal_id": o.PrincipalId, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PrincipalOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "group_name": types.StringType, + "principal_id": types.Int64Type, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type ResourceMeta_SdkV2 struct { + // Identifier for group type. Can be local workspace group + // (`WorkspaceGroup`) or account group (`Group`). + ResourceType types.String `tfsdk:"resourceType" tf:"optional"` +} + +func (newState *ResourceMeta_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResourceMeta_SdkV2) { +} + +func (newState *ResourceMeta_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResourceMeta_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResourceMeta. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResourceMeta_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, ResourceMeta_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResourceMeta_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "resourceType": o.ResourceType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResourceMeta_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "resourceType": types.StringType, + }, + } +} + +type Role_SdkV2 struct { + // Role to assign to a principal or a list of principals on a resource. + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *Role_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Role_SdkV2) { +} + +func (newState *Role_SdkV2) SyncEffectiveFieldsDuringRead(existingState Role_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Role. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Role_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, Role_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Role_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 Role_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type RuleSetResponse_SdkV2 struct { + // Identifies the version of the rule set returned. + Etag types.String `tfsdk:"etag" tf:"optional"` + + GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + // Name of the rule set. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *RuleSetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RuleSetResponse_SdkV2) { +} + +func (newState *RuleSetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RuleSetResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RuleSetResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "grant_rules": reflect.TypeOf(GrantRule_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, RuleSetResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RuleSetResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "grant_rules": o.GrantRules, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RuleSetResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "grant_rules": basetypes.ListType{ + ElemType: GrantRule{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetGrantRules returns the value of the GrantRules field in RuleSetResponse_SdkV2 as +// a slice of GrantRule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RuleSetResponse_SdkV2) GetGrantRules(ctx context.Context) ([]GrantRule_SdkV2, bool) { + if o.GrantRules.IsNull() || o.GrantRules.IsUnknown() { + return nil, false + } + var v []GrantRule_SdkV2 + d := o.GrantRules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGrantRules sets the value of the GrantRules field in RuleSetResponse_SdkV2. +func (o *RuleSetResponse_SdkV2) SetGrantRules(ctx context.Context, v []GrantRule_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["grant_rules"] + t = t.(attr.TypeWithElementType).ElementType() + o.GrantRules = types.ListValueMust(t, vs) +} + +type RuleSetUpdateRequest_SdkV2 struct { + // The expected etag of the rule set to update. The update will fail if the + // value does not match the value that is stored in account access control + // service. + Etag types.String `tfsdk:"etag" tf:""` + + GrantRules types.List `tfsdk:"grant_rules" tf:"optional"` + // Name of the rule set. + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *RuleSetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RuleSetUpdateRequest_SdkV2) { +} + +func (newState *RuleSetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RuleSetUpdateRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RuleSetUpdateRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RuleSetUpdateRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "grant_rules": reflect.TypeOf(GrantRule_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, RuleSetUpdateRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RuleSetUpdateRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "grant_rules": o.GrantRules, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RuleSetUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "grant_rules": basetypes.ListType{ + ElemType: GrantRule{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetGrantRules returns the value of the GrantRules field in RuleSetUpdateRequest_SdkV2 as +// a slice of GrantRule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RuleSetUpdateRequest_SdkV2) GetGrantRules(ctx context.Context) ([]GrantRule_SdkV2, bool) { + if o.GrantRules.IsNull() || o.GrantRules.IsUnknown() { + return nil, false + } + var v []GrantRule_SdkV2 + d := o.GrantRules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGrantRules sets the value of the GrantRules field in RuleSetUpdateRequest_SdkV2. +func (o *RuleSetUpdateRequest_SdkV2) SetGrantRules(ctx context.Context, v []GrantRule_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["grant_rules"] + t = t.(attr.TypeWithElementType).ElementType() + o.GrantRules = types.ListValueMust(t, vs) +} + +type ServicePrincipal_SdkV2 struct { + // If this user is active + Active types.Bool `tfsdk:"active" tf:"optional"` + // UUID relating to the service principal + ApplicationId types.String `tfsdk:"applicationId" tf:"optional"` + // String that represents a concatenation of given and family names. + DisplayName types.String `tfsdk:"displayName" tf:"optional"` + // Entitlements assigned to the service principal. See [assigning + // entitlements] for a full list of supported values. + // + // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements + Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + + ExternalId types.String `tfsdk:"externalId" tf:"optional"` + + Groups types.List `tfsdk:"groups" tf:"optional"` + // Databricks service principal ID. + Id types.String `tfsdk:"id" tf:"optional"` + // Corresponds to AWS instance profile/arn role. + Roles types.List `tfsdk:"roles" tf:"optional"` + // The schema of the List response. + Schemas types.List `tfsdk:"schemas" tf:"optional"` +} + +func (newState *ServicePrincipal_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServicePrincipal_SdkV2) { +} + +func (newState *ServicePrincipal_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServicePrincipal_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServicePrincipal. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServicePrincipal_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "entitlements": reflect.TypeOf(ComplexValue_SdkV2{}), + "groups": reflect.TypeOf(ComplexValue_SdkV2{}), + "roles": reflect.TypeOf(ComplexValue_SdkV2{}), + "schemas": 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, ServicePrincipal_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServicePrincipal_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "active": o.Active, + "applicationId": o.ApplicationId, + "displayName": o.DisplayName, + "entitlements": o.Entitlements, + "externalId": o.ExternalId, + "groups": o.Groups, + "id": o.Id, + "roles": o.Roles, + "schemas": o.Schemas, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServicePrincipal_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "active": types.BoolType, + "applicationId": types.StringType, + "displayName": types.StringType, + "entitlements": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "externalId": types.StringType, + "groups": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "id": types.StringType, + "roles": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetEntitlements returns the value of the Entitlements field in ServicePrincipal_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServicePrincipal_SdkV2) GetEntitlements(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Entitlements.IsNull() || o.Entitlements.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Entitlements.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEntitlements sets the value of the Entitlements field in ServicePrincipal_SdkV2. +func (o *ServicePrincipal_SdkV2) SetEntitlements(ctx context.Context, v []ComplexValue_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["entitlements"] + t = t.(attr.TypeWithElementType).ElementType() + o.Entitlements = types.ListValueMust(t, vs) +} + +// GetGroups returns the value of the Groups field in ServicePrincipal_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServicePrincipal_SdkV2) GetGroups(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Groups.IsNull() || o.Groups.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Groups.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGroups sets the value of the Groups field in ServicePrincipal_SdkV2. +func (o *ServicePrincipal_SdkV2) SetGroups(ctx context.Context, v []ComplexValue_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["groups"] + t = t.(attr.TypeWithElementType).ElementType() + o.Groups = types.ListValueMust(t, vs) +} + +// GetRoles returns the value of the Roles field in ServicePrincipal_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServicePrincipal_SdkV2) GetRoles(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Roles.IsNull() || o.Roles.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Roles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRoles sets the value of the Roles field in ServicePrincipal_SdkV2. +func (o *ServicePrincipal_SdkV2) SetRoles(ctx context.Context, v []ComplexValue_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["roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.Roles = types.ListValueMust(t, vs) +} + +// GetSchemas returns the value of the Schemas field in ServicePrincipal_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServicePrincipal_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in ServicePrincipal_SdkV2. +func (o *ServicePrincipal_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateRuleSetRequest_SdkV2 struct { + // Name of the rule set. + Name types.String `tfsdk:"name" tf:""` + + RuleSet types.List `tfsdk:"rule_set" tf:"object"` +} + +func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRuleSetRequest_SdkV2) { +} + +func (newState *UpdateRuleSetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRuleSetRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRuleSetRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "rule_set": reflect.TypeOf(RuleSetUpdateRequest_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, UpdateRuleSetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRuleSetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "rule_set": o.RuleSet, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRuleSetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "rule_set": basetypes.ListType{ + ElemType: RuleSetUpdateRequest{}.Type(ctx), + }, + }, + } +} + +// GetRuleSet returns the value of the RuleSet field in UpdateRuleSetRequest_SdkV2 as +// a RuleSetUpdateRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRuleSetRequest_SdkV2) GetRuleSet(ctx context.Context) (RuleSetUpdateRequest_SdkV2, bool) { + var e RuleSetUpdateRequest_SdkV2 + if o.RuleSet.IsNull() || o.RuleSet.IsUnknown() { + return e, false + } + var v []RuleSetUpdateRequest_SdkV2 + d := o.RuleSet.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRuleSet sets the value of the RuleSet field in UpdateRuleSetRequest_SdkV2. +func (o *UpdateRuleSetRequest_SdkV2) SetRuleSet(ctx context.Context, v RuleSetUpdateRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["rule_set"] + o.RuleSet = types.ListValueMust(t, vs) +} + +type UpdateWorkspaceAssignments_SdkV2 struct { + // Array of permissions assignments to update on the workspace. Valid values + // are "USER" and "ADMIN" (case-sensitive). If both "USER" and "ADMIN" are + // provided, "ADMIN" takes precedence. Other values will be ignored. Note + // that excluding this field, or providing unsupported values, will have the + // same effect as providing an empty list, which will result in the deletion + // of all permissions for the principal. + Permissions types.List `tfsdk:"permissions" tf:"optional"` + // The ID of the user, service principal, or group. + PrincipalId types.Int64 `tfsdk:"-"` + // The workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceAssignments_SdkV2) { +} + +func (newState *UpdateWorkspaceAssignments_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceAssignments_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateWorkspaceAssignments_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permissions": 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, UpdateWorkspaceAssignments_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceAssignments_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permissions": o.Permissions, + "principal_id": o.PrincipalId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWorkspaceAssignments_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permissions": basetypes.ListType{ + ElemType: types.StringType, + }, + "principal_id": types.Int64Type, + "workspace_id": types.Int64Type, + }, + } +} + +// GetPermissions returns the value of the Permissions field in UpdateWorkspaceAssignments_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateWorkspaceAssignments_SdkV2) GetPermissions(ctx context.Context) ([]types.String, bool) { + if o.Permissions.IsNull() || o.Permissions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Permissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissions sets the value of the Permissions field in UpdateWorkspaceAssignments_SdkV2. +func (o *UpdateWorkspaceAssignments_SdkV2) SetPermissions(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["permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Permissions = types.ListValueMust(t, vs) +} + +type User_SdkV2 struct { + // If this user is active + Active types.Bool `tfsdk:"active" tf:"optional"` + // String that represents a concatenation of given and family names. For + // example `John Smith`. This field cannot be updated through the Workspace + // SCIM APIs when [identity federation is enabled]. Use Account SCIM APIs to + // update `displayName`. + // + // [identity federation is enabled]: https://docs.databricks.com/administration-guide/users-groups/best-practices.html#enable-identity-federation + DisplayName types.String `tfsdk:"displayName" tf:"optional"` + // All the emails associated with the Databricks user. + Emails types.List `tfsdk:"emails" tf:"optional"` + // Entitlements assigned to the user. See [assigning entitlements] for a + // full list of supported values. + // + // [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements + Entitlements types.List `tfsdk:"entitlements" tf:"optional"` + // External ID is not currently supported. It is reserved for future use. + ExternalId types.String `tfsdk:"externalId" tf:"optional"` + + Groups types.List `tfsdk:"groups" tf:"optional"` + // Databricks user ID. This is automatically set by Databricks. Any value + // provided by the client will be ignored. + Id types.String `tfsdk:"id" tf:"optional"` + + Name types.List `tfsdk:"name" tf:"optional,object"` + // Corresponds to AWS instance profile/arn role. + Roles types.List `tfsdk:"roles" tf:"optional"` + // The schema of the user. + Schemas types.List `tfsdk:"schemas" tf:"optional"` + // Email address of the Databricks user. + UserName types.String `tfsdk:"userName" tf:"optional"` +} + +func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_SdkV2) { +} + +func (newState *User_SdkV2) SyncEffectiveFieldsDuringRead(existingState User_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in User. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a User_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "emails": reflect.TypeOf(ComplexValue_SdkV2{}), + "entitlements": reflect.TypeOf(ComplexValue_SdkV2{}), + "groups": reflect.TypeOf(ComplexValue_SdkV2{}), + "name": reflect.TypeOf(Name_SdkV2{}), + "roles": reflect.TypeOf(ComplexValue_SdkV2{}), + "schemas": 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, User_SdkV2 +// only implements ToObjectValue() and Type(). +func (o User_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "active": o.Active, + "displayName": o.DisplayName, + "emails": o.Emails, + "entitlements": o.Entitlements, + "externalId": o.ExternalId, + "groups": o.Groups, + "id": o.Id, + "name": o.Name, + "roles": o.Roles, + "schemas": o.Schemas, + "userName": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o User_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "active": types.BoolType, + "displayName": types.StringType, + "emails": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "entitlements": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "externalId": types.StringType, + "groups": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "id": types.StringType, + "name": basetypes.ListType{ + ElemType: Name{}.Type(ctx), + }, + "roles": basetypes.ListType{ + ElemType: ComplexValue{}.Type(ctx), + }, + "schemas": basetypes.ListType{ + ElemType: types.StringType, + }, + "userName": types.StringType, + }, + } +} + +// GetEmails returns the value of the Emails field in User_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetEmails(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Emails.IsNull() || o.Emails.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Emails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmails sets the value of the Emails field in User_SdkV2. +func (o *User_SdkV2) SetEmails(ctx context.Context, v []ComplexValue_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["emails"] + t = t.(attr.TypeWithElementType).ElementType() + o.Emails = types.ListValueMust(t, vs) +} + +// GetEntitlements returns the value of the Entitlements field in User_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetEntitlements(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Entitlements.IsNull() || o.Entitlements.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Entitlements.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEntitlements sets the value of the Entitlements field in User_SdkV2. +func (o *User_SdkV2) SetEntitlements(ctx context.Context, v []ComplexValue_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["entitlements"] + t = t.(attr.TypeWithElementType).ElementType() + o.Entitlements = types.ListValueMust(t, vs) +} + +// GetGroups returns the value of the Groups field in User_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetGroups(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Groups.IsNull() || o.Groups.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Groups.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetGroups sets the value of the Groups field in User_SdkV2. +func (o *User_SdkV2) SetGroups(ctx context.Context, v []ComplexValue_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["groups"] + t = t.(attr.TypeWithElementType).ElementType() + o.Groups = types.ListValueMust(t, vs) +} + +// GetName returns the value of the Name field in User_SdkV2 as +// a Name_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetName(ctx context.Context) (Name_SdkV2, bool) { + var e Name_SdkV2 + if o.Name.IsNull() || o.Name.IsUnknown() { + return e, false + } + var v []Name_SdkV2 + d := o.Name.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetName sets the value of the Name field in User_SdkV2. +func (o *User_SdkV2) SetName(ctx context.Context, v Name_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["name"] + o.Name = types.ListValueMust(t, vs) +} + +// GetRoles returns the value of the Roles field in User_SdkV2 as +// a slice of ComplexValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetRoles(ctx context.Context) ([]ComplexValue_SdkV2, bool) { + if o.Roles.IsNull() || o.Roles.IsUnknown() { + return nil, false + } + var v []ComplexValue_SdkV2 + d := o.Roles.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRoles sets the value of the Roles field in User_SdkV2. +func (o *User_SdkV2) SetRoles(ctx context.Context, v []ComplexValue_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["roles"] + t = t.(attr.TypeWithElementType).ElementType() + o.Roles = types.ListValueMust(t, vs) +} + +// GetSchemas returns the value of the Schemas field in User_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *User_SdkV2) GetSchemas(ctx context.Context) ([]types.String, bool) { + if o.Schemas.IsNull() || o.Schemas.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Schemas.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSchemas sets the value of the Schemas field in User_SdkV2. +func (o *User_SdkV2) SetSchemas(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["schemas"] + t = t.(attr.TypeWithElementType).ElementType() + o.Schemas = types.ListValueMust(t, vs) +} + +type WorkspacePermissions_SdkV2 struct { + // Array of permissions defined for a workspace. + Permissions types.List `tfsdk:"permissions" tf:"optional"` +} + +func (newState *WorkspacePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspacePermissions_SdkV2) { +} + +func (newState *WorkspacePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspacePermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspacePermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspacePermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permissions": reflect.TypeOf(PermissionOutput_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, WorkspacePermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspacePermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permissions": o.Permissions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspacePermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permissions": basetypes.ListType{ + ElemType: PermissionOutput{}.Type(ctx), + }, + }, + } +} + +// GetPermissions returns the value of the Permissions field in WorkspacePermissions_SdkV2 as +// a slice of PermissionOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspacePermissions_SdkV2) GetPermissions(ctx context.Context) ([]PermissionOutput_SdkV2, bool) { + if o.Permissions.IsNull() || o.Permissions.IsUnknown() { + return nil, false + } + var v []PermissionOutput_SdkV2 + d := o.Permissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissions sets the value of the Permissions field in WorkspacePermissions_SdkV2. +func (o *WorkspacePermissions_SdkV2) SetPermissions(ctx context.Context, v []PermissionOutput_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["permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Permissions = types.ListValueMust(t, vs) +} diff --git a/internal/service/iam_tf/model.go b/internal/service/iam_tf/model.go index 04df338c0..e70ded669 100755 --- a/internal/service/iam_tf/model.go +++ b/internal/service/iam_tf/model.go @@ -1471,7 +1471,7 @@ type Group struct { Members types.List `tfsdk:"members" tf:"optional"` // Container for the group identifier. Workspace local versus account. - Meta types.List `tfsdk:"meta" tf:"optional,object"` + Meta types.Object `tfsdk:"meta" tf:"optional,object"` // Corresponds to AWS instance profile/arn role. Roles types.List `tfsdk:"roles" tf:"optional"` // The schema of the group. @@ -1537,9 +1537,7 @@ func (o Group) Type(ctx context.Context) attr.Type { "members": basetypes.ListType{ ElemType: ComplexValue{}.Type(ctx), }, - "meta": basetypes.ListType{ - ElemType: ResourceMeta{}.Type(ctx), - }, + "meta": ResourceMeta{}.Type(ctx), "roles": basetypes.ListType{ ElemType: ComplexValue{}.Type(ctx), }, @@ -1637,7 +1635,10 @@ func (o *Group) GetMeta(ctx context.Context) (ResourceMeta, bool) { return e, false } var v []ResourceMeta - d := o.Meta.ElementsAs(ctx, &v, true) + d := o.Meta.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1649,9 +1650,8 @@ func (o *Group) GetMeta(ctx context.Context) (ResourceMeta, bool) { // SetMeta sets the value of the Meta field in Group. func (o *Group) SetMeta(ctx context.Context, v ResourceMeta) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["meta"] - o.Meta = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Meta = vs } // GetRoles returns the value of the Roles field in Group as @@ -3464,7 +3464,7 @@ type PermissionAssignment struct { // The permissions level of the principal. Permissions types.List `tfsdk:"permissions" tf:"optional"` // Information about the principal assigned to the workspace. - Principal types.List `tfsdk:"principal" tf:"optional,object"` + Principal types.Object `tfsdk:"principal" tf:"optional,object"` } func (newState *PermissionAssignment) SyncEffectiveFieldsDuringCreateOrUpdate(plan PermissionAssignment) { @@ -3508,9 +3508,7 @@ func (o PermissionAssignment) Type(ctx context.Context) attr.Type { "permissions": basetypes.ListType{ ElemType: types.StringType, }, - "principal": basetypes.ListType{ - ElemType: PrincipalOutput{}.Type(ctx), - }, + "principal": PrincipalOutput{}.Type(ctx), }, } } @@ -3550,7 +3548,10 @@ func (o *PermissionAssignment) GetPrincipal(ctx context.Context) (PrincipalOutpu return e, false } var v []PrincipalOutput - d := o.Principal.ElementsAs(ctx, &v, true) + d := o.Principal.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3562,9 +3563,8 @@ func (o *PermissionAssignment) GetPrincipal(ctx context.Context) (PrincipalOutpu // SetPrincipal sets the value of the Principal field in PermissionAssignment. func (o *PermissionAssignment) SetPrincipal(ctx context.Context, v PrincipalOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["principal"] - o.Principal = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Principal = vs } type PermissionAssignments struct { @@ -4354,7 +4354,7 @@ type UpdateRuleSetRequest struct { // Name of the rule set. Name types.String `tfsdk:"name" tf:""` - RuleSet types.List `tfsdk:"rule_set" tf:"object"` + RuleSet types.Object `tfsdk:"rule_set" tf:"object"` } func (newState *UpdateRuleSetRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRuleSetRequest) { @@ -4392,10 +4392,8 @@ func (o UpdateRuleSetRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o UpdateRuleSetRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, - "rule_set": basetypes.ListType{ - ElemType: RuleSetUpdateRequest{}.Type(ctx), - }, + "name": types.StringType, + "rule_set": RuleSetUpdateRequest{}.Type(ctx), }, } } @@ -4409,7 +4407,10 @@ func (o *UpdateRuleSetRequest) GetRuleSet(ctx context.Context) (RuleSetUpdateReq return e, false } var v []RuleSetUpdateRequest - d := o.RuleSet.ElementsAs(ctx, &v, true) + d := o.RuleSet.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4421,9 +4422,8 @@ func (o *UpdateRuleSetRequest) GetRuleSet(ctx context.Context) (RuleSetUpdateReq // SetRuleSet sets the value of the RuleSet field in UpdateRuleSetRequest. func (o *UpdateRuleSetRequest) SetRuleSet(ctx context.Context, v RuleSetUpdateRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["rule_set"] - o.RuleSet = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RuleSet = vs } type UpdateWorkspaceAssignments struct { @@ -4536,7 +4536,7 @@ type User struct { // provided by the client will be ignored. Id types.String `tfsdk:"id" tf:"optional"` - Name types.List `tfsdk:"name" tf:"optional,object"` + Name types.Object `tfsdk:"name" tf:"optional,object"` // Corresponds to AWS instance profile/arn role. Roles types.List `tfsdk:"roles" tf:"optional"` // The schema of the user. @@ -4606,10 +4606,8 @@ func (o User) Type(ctx context.Context) attr.Type { "groups": basetypes.ListType{ ElemType: ComplexValue{}.Type(ctx), }, - "id": types.StringType, - "name": basetypes.ListType{ - ElemType: Name{}.Type(ctx), - }, + "id": types.StringType, + "name": Name{}.Type(ctx), "roles": basetypes.ListType{ ElemType: ComplexValue{}.Type(ctx), }, @@ -4708,7 +4706,10 @@ func (o *User) GetName(ctx context.Context) (Name, bool) { return e, false } var v []Name - d := o.Name.ElementsAs(ctx, &v, true) + d := o.Name.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4720,9 +4721,8 @@ func (o *User) GetName(ctx context.Context) (Name, bool) { // SetName sets the value of the Name field in User. func (o *User) SetName(ctx context.Context, v Name) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["name"] - o.Name = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Name = vs } // GetRoles returns the value of the Roles field in User as diff --git a/internal/service/jobs_tf/legacy_model.go b/internal/service/jobs_tf/legacy_model.go new file mode 100755 index 000000000..c43308080 --- /dev/null +++ b/internal/service/jobs_tf/legacy_model.go @@ -0,0 +1,16353 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package jobs_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type BaseJob_SdkV2 struct { + // The time at which this job was created in epoch milliseconds + // (milliseconds since 1/1/1970 UTC). + CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + // The creator user name. This field won’t be included in the response if + // the user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // The id of the budget policy used by this job for cost attribution + // purposes. This may be set through (in order of precedence): 1. Budget + // admins through the account or workspace console 2. Jobs UI in the job + // details page and Jobs API using `budget_policy_id` 3. Inferred default + // based on accessible budget policies of the run_as identity on job + // creation or modification. + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + // The canonical identifier for this job. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + // Settings for this job and all of its runs. These settings can be updated + // using the `resetJob` method. + Settings types.List `tfsdk:"settings" tf:"optional,object"` +} + +func (newState *BaseJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseJob_SdkV2) { +} + +func (newState *BaseJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseJob_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseJob. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BaseJob_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "settings": reflect.TypeOf(JobSettings_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, BaseJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BaseJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_time": o.CreatedTime, + "creator_user_name": o.CreatorUserName, + "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "job_id": o.JobId, + "settings": o.Settings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BaseJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_time": types.Int64Type, + "creator_user_name": types.StringType, + "effective_budget_policy_id": types.StringType, + "job_id": types.Int64Type, + "settings": basetypes.ListType{ + ElemType: JobSettings{}.Type(ctx), + }, + }, + } +} + +// GetSettings returns the value of the Settings field in BaseJob_SdkV2 as +// a JobSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseJob_SdkV2) GetSettings(ctx context.Context) (JobSettings_SdkV2, bool) { + var e JobSettings_SdkV2 + if o.Settings.IsNull() || o.Settings.IsUnknown() { + return e, false + } + var v []JobSettings_SdkV2 + d := o.Settings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSettings sets the value of the Settings field in BaseJob_SdkV2. +func (o *BaseJob_SdkV2) SetSettings(ctx context.Context, v JobSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] + o.Settings = types.ListValueMust(t, vs) +} + +type BaseRun_SdkV2 struct { + // The sequence number of this run attempt for a triggered job run. The + // initial attempt of a run has an attempt_number of 0. If the initial run + // attempt fails, and the job has a retry policy (`max_retries` > 0), + // subsequent runs are created with an `original_attempt_run_id` of the + // original attempt’s ID and an incrementing `attempt_number`. Runs are + // retried only until they succeed, and the maximum `attempt_number` is the + // same as the `max_retries` value for the job. + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + // The time in milliseconds it took to terminate the cluster and clean up + // any associated artifacts. The duration of a task run is the sum of the + // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The + // `cleanup_duration` field is set to 0 for multitask job runs. The total + // duration of a multitask job run is the value of the `run_duration` field. + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + // The cluster used for this run. If the run is specified to use a new + // cluster, this field is set once the Jobs service has requested a cluster + // for the run. + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + // A snapshot of the job’s cluster specification when this run was + // created. + ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + // The creator user name. This field won’t be included in the response if + // the user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // Description of the run + Description types.String `tfsdk:"description" tf:"optional"` + // The time at which this run ended in epoch milliseconds (milliseconds + // since 1/1/1970 UTC). This field is set to 0 if the job is still running. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The time in milliseconds it took to execute the commands in the JAR or + // notebook until they completed, failed, timed out, were cancelled, or + // encountered an unexpected error. The duration of a task run is the sum of + // the `setup_duration`, `execution_duration`, and the `cleanup_duration`. + // The `execution_duration` field is set to 0 for multitask job runs. The + // total duration of a multitask job run is the value of the `run_duration` + // field. + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. + // + // If `git_source` is set, these tasks retrieve the file from the remote + // repository by default. However, this behavior can be overridden by + // setting `source` to `WORKSPACE` on the task. + // + // Note: dbt and SQL File tasks support only version-controlled sources. If + // dbt or SQL File tasks are used, `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // A list of job cluster specifications that can be shared and reused by + // tasks of this job. Libraries cannot be declared in a shared job cluster. + // You must declare dependent libraries in task settings. + JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // The canonical identifier of the job that contains this run. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + // Job-level parameters used in the run + JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + // ID of the job run that this run belongs to. For legacy and single-task + // job runs the field is populated with the job run ID. For task runs, the + // field is populated with the ID of the job run that the task run belongs + // to. + JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + // A unique identifier for this job run. This is set to the same value as + // `run_id`. + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + // If this run is a retry of a prior run attempt, this field contains the + // run_id of the original attempt; otherwise, it is the same as the run_id. + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + // The parameters used for this run. + OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + // The time in milliseconds that the run has spent in the queue. + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + // The repair history of the run. + RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + // The time in milliseconds it took the job run and all of its repairs to + // finish. + RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + // The canonical identifier of the run. This ID is unique across all runs of + // all jobs. + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + // An optional name for the run. The maximum length is 4096 bytes in UTF-8 + // encoding. + RunName types.String `tfsdk:"run_name" tf:"optional"` + // The URL to the detail page of the run. + RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + // The type of a run. * `JOB_RUN`: Normal job run. A run created with + // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with + // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with + // :method:jobs/submit. + // + // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow + RunType types.String `tfsdk:"run_type" tf:"optional"` + // The cron schedule that triggered this run if it was triggered by the + // periodic scheduler. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // The time in milliseconds it took to set up the cluster. For runs that run + // on new clusters this is the cluster creation time, for runs that run on + // existing clusters this time should be very short. The duration of a task + // run is the sum of the `setup_duration`, `execution_duration`, and the + // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask + // job runs. The total duration of a multitask job run is the value of the + // `run_duration` field. + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + // The time at which this run was started in epoch milliseconds + // (milliseconds since 1/1/1970 UTC). This may not be the time when the job + // task starts executing, for example, if the job is scheduled to run on a + // new cluster, this is the time the cluster creation call is issued. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Deprecated. Please use the `status` field instead. + State types.List `tfsdk:"state" tf:"optional,object"` + // The current status of the run + Status types.List `tfsdk:"status" tf:"optional,object"` + // The list of tasks performed by the run. Each task has its own `run_id` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. + Tasks types.List `tfsdk:"tasks" tf:"optional"` + // 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. * `TABLE`: Indicates a run that is triggered by a table update. + Trigger types.String `tfsdk:"trigger" tf:"optional"` + // Additional details about what triggered the run + TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` +} + +func (newState *BaseRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseRun_SdkV2) { +} + +func (newState *BaseRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseRun_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseRun. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BaseRun_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster_instance": reflect.TypeOf(ClusterInstance_SdkV2{}), + "cluster_spec": reflect.TypeOf(ClusterSpec_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "job_clusters": reflect.TypeOf(JobCluster_SdkV2{}), + "job_parameters": reflect.TypeOf(JobParameter_SdkV2{}), + "overriding_parameters": reflect.TypeOf(RunParameters_SdkV2{}), + "repair_history": reflect.TypeOf(RepairHistoryItem_SdkV2{}), + "schedule": reflect.TypeOf(CronSchedule_SdkV2{}), + "state": reflect.TypeOf(RunState_SdkV2{}), + "status": reflect.TypeOf(RunStatus_SdkV2{}), + "tasks": reflect.TypeOf(RunTask_SdkV2{}), + "trigger_info": reflect.TypeOf(TriggerInfo_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, BaseRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BaseRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attempt_number": o.AttemptNumber, + "cleanup_duration": o.CleanupDuration, + "cluster_instance": o.ClusterInstance, + "cluster_spec": o.ClusterSpec, + "creator_user_name": o.CreatorUserName, + "description": o.Description, + "end_time": o.EndTime, + "execution_duration": o.ExecutionDuration, + "git_source": o.GitSource, + "job_clusters": o.JobClusters, + "job_id": o.JobId, + "job_parameters": o.JobParameters, + "job_run_id": o.JobRunId, + "number_in_job": o.NumberInJob, + "original_attempt_run_id": o.OriginalAttemptRunId, + "overriding_parameters": o.OverridingParameters, + "queue_duration": o.QueueDuration, + "repair_history": o.RepairHistory, + "run_duration": o.RunDuration, + "run_id": o.RunId, + "run_name": o.RunName, + "run_page_url": o.RunPageUrl, + "run_type": o.RunType, + "schedule": o.Schedule, + "setup_duration": o.SetupDuration, + "start_time": o.StartTime, + "state": o.State, + "status": o.Status, + "tasks": o.Tasks, + "trigger": o.Trigger, + "trigger_info": o.TriggerInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BaseRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attempt_number": types.Int64Type, + "cleanup_duration": types.Int64Type, + "cluster_instance": basetypes.ListType{ + ElemType: ClusterInstance{}.Type(ctx), + }, + "cluster_spec": basetypes.ListType{ + ElemType: ClusterSpec{}.Type(ctx), + }, + "creator_user_name": types.StringType, + "description": types.StringType, + "end_time": types.Int64Type, + "execution_duration": types.Int64Type, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "job_clusters": basetypes.ListType{ + ElemType: JobCluster{}.Type(ctx), + }, + "job_id": types.Int64Type, + "job_parameters": basetypes.ListType{ + ElemType: JobParameter{}.Type(ctx), + }, + "job_run_id": types.Int64Type, + "number_in_job": types.Int64Type, + "original_attempt_run_id": types.Int64Type, + "overriding_parameters": basetypes.ListType{ + ElemType: RunParameters{}.Type(ctx), + }, + "queue_duration": types.Int64Type, + "repair_history": basetypes.ListType{ + ElemType: RepairHistoryItem{}.Type(ctx), + }, + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_name": types.StringType, + "run_page_url": types.StringType, + "run_type": types.StringType, + "schedule": basetypes.ListType{ + ElemType: CronSchedule{}.Type(ctx), + }, + "setup_duration": types.Int64Type, + "start_time": types.Int64Type, + "state": basetypes.ListType{ + ElemType: RunState{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: RunStatus{}.Type(ctx), + }, + "tasks": basetypes.ListType{ + ElemType: RunTask{}.Type(ctx), + }, + "trigger": types.StringType, + "trigger_info": basetypes.ListType{ + ElemType: TriggerInfo{}.Type(ctx), + }, + }, + } +} + +// GetClusterInstance returns the value of the ClusterInstance field in BaseRun_SdkV2 as +// a ClusterInstance_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetClusterInstance(ctx context.Context) (ClusterInstance_SdkV2, bool) { + var e ClusterInstance_SdkV2 + if o.ClusterInstance.IsNull() || o.ClusterInstance.IsUnknown() { + return e, false + } + var v []ClusterInstance_SdkV2 + d := o.ClusterInstance.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterInstance sets the value of the ClusterInstance field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetClusterInstance(ctx context.Context, v ClusterInstance_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] + o.ClusterInstance = types.ListValueMust(t, vs) +} + +// GetClusterSpec returns the value of the ClusterSpec field in BaseRun_SdkV2 as +// a ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetClusterSpec(ctx context.Context) (ClusterSpec_SdkV2, bool) { + var e ClusterSpec_SdkV2 + if o.ClusterSpec.IsNull() || o.ClusterSpec.IsUnknown() { + return e, false + } + var v []ClusterSpec_SdkV2 + d := o.ClusterSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterSpec sets the value of the ClusterSpec field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetClusterSpec(ctx context.Context, v ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_spec"] + o.ClusterSpec = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in BaseRun_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetJobClusters returns the value of the JobClusters field in BaseRun_SdkV2 as +// a slice of JobCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetJobClusters(ctx context.Context) ([]JobCluster_SdkV2, bool) { + if o.JobClusters.IsNull() || o.JobClusters.IsUnknown() { + return nil, false + } + var v []JobCluster_SdkV2 + d := o.JobClusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobClusters sets the value of the JobClusters field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetJobClusters(ctx context.Context, v []JobCluster_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["job_clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobClusters = types.ListValueMust(t, vs) +} + +// GetJobParameters returns the value of the JobParameters field in BaseRun_SdkV2 as +// a slice of JobParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetJobParameters(ctx context.Context) ([]JobParameter_SdkV2, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v []JobParameter_SdkV2 + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetJobParameters(ctx context.Context, v []JobParameter_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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.ListValueMust(t, vs) +} + +// GetOverridingParameters returns the value of the OverridingParameters field in BaseRun_SdkV2 as +// a RunParameters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetOverridingParameters(ctx context.Context) (RunParameters_SdkV2, bool) { + var e RunParameters_SdkV2 + if o.OverridingParameters.IsNull() || o.OverridingParameters.IsUnknown() { + return e, false + } + var v []RunParameters_SdkV2 + d := o.OverridingParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOverridingParameters sets the value of the OverridingParameters field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetOverridingParameters(ctx context.Context, v RunParameters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["overriding_parameters"] + o.OverridingParameters = types.ListValueMust(t, vs) +} + +// GetRepairHistory returns the value of the RepairHistory field in BaseRun_SdkV2 as +// a slice of RepairHistoryItem_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetRepairHistory(ctx context.Context) ([]RepairHistoryItem_SdkV2, bool) { + if o.RepairHistory.IsNull() || o.RepairHistory.IsUnknown() { + return nil, false + } + var v []RepairHistoryItem_SdkV2 + d := o.RepairHistory.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRepairHistory sets the value of the RepairHistory field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetRepairHistory(ctx context.Context, v []RepairHistoryItem_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["repair_history"] + t = t.(attr.TypeWithElementType).ElementType() + o.RepairHistory = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in BaseRun_SdkV2 as +// a CronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetSchedule(ctx context.Context) (CronSchedule_SdkV2, bool) { + var e CronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []CronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetSchedule(ctx context.Context, v CronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in BaseRun_SdkV2 as +// a RunState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetState(ctx context.Context) (RunState_SdkV2, bool) { + var e RunState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []RunState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetState(ctx context.Context, v RunState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in BaseRun_SdkV2 as +// a RunStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetStatus(ctx context.Context) (RunStatus_SdkV2, bool) { + var e RunStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []RunStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetStatus(ctx context.Context, v RunStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// GetTasks returns the value of the Tasks field in BaseRun_SdkV2 as +// a slice of RunTask_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetTasks(ctx context.Context) ([]RunTask_SdkV2, bool) { + if o.Tasks.IsNull() || o.Tasks.IsUnknown() { + return nil, false + } + var v []RunTask_SdkV2 + d := o.Tasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTasks sets the value of the Tasks field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetTasks(ctx context.Context, v []RunTask_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["tasks"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tasks = types.ListValueMust(t, vs) +} + +// GetTriggerInfo returns the value of the TriggerInfo field in BaseRun_SdkV2 as +// a TriggerInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *BaseRun_SdkV2) GetTriggerInfo(ctx context.Context) (TriggerInfo_SdkV2, bool) { + var e TriggerInfo_SdkV2 + if o.TriggerInfo.IsNull() || o.TriggerInfo.IsUnknown() { + return e, false + } + var v []TriggerInfo_SdkV2 + d := o.TriggerInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTriggerInfo sets the value of the TriggerInfo field in BaseRun_SdkV2. +func (o *BaseRun_SdkV2) SetTriggerInfo(ctx context.Context, v TriggerInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger_info"] + o.TriggerInfo = types.ListValueMust(t, vs) +} + +type CancelAllRuns_SdkV2 struct { + // Optional boolean parameter to cancel all queued runs. If no job_id is + // provided, all queued runs in the workspace are canceled. + AllQueuedRuns types.Bool `tfsdk:"all_queued_runs" tf:"optional"` + // The canonical identifier of the job to cancel all runs of. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` +} + +func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRuns_SdkV2) { +} + +func (newState *CancelAllRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelAllRuns_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelAllRuns_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, CancelAllRuns_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelAllRuns_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_queued_runs": o.AllQueuedRuns, + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CancelAllRuns_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_queued_runs": types.BoolType, + "job_id": types.Int64Type, + }, + } +} + +type CancelAllRunsResponse_SdkV2 struct { +} + +func (newState *CancelAllRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelAllRunsResponse_SdkV2) { +} + +func (newState *CancelAllRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelAllRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelAllRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelAllRunsResponse_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, CancelAllRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelAllRunsResponse_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 CancelAllRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type CancelRun_SdkV2 struct { + // This field is required. + RunId types.Int64 `tfsdk:"run_id" tf:""` +} + +func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRun_SdkV2) { +} + +func (newState *CancelRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelRun_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, CancelRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CancelRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +type CancelRunResponse_SdkV2 struct { +} + +func (newState *CancelRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelRunResponse_SdkV2) { +} + +func (newState *CancelRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelRunResponse_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, CancelRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelRunResponse_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 CancelRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Stores the run state of the clean room notebook V1 task. +type CleanRoomTaskRunState_SdkV2 struct { + // A value indicating the run's current lifecycle state. This field is + // always available in the response. + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + // A value indicating the run's result. This field is only available for + // terminal lifecycle states. + ResultState types.String `tfsdk:"result_state" tf:"optional"` +} + +func (newState *CleanRoomTaskRunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomTaskRunState_SdkV2) { +} + +func (newState *CleanRoomTaskRunState_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomTaskRunState_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomTaskRunState. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomTaskRunState_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, CleanRoomTaskRunState_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomTaskRunState_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "life_cycle_state": o.LifeCycleState, + "result_state": o.ResultState, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomTaskRunState_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "life_cycle_state": types.StringType, + "result_state": types.StringType, + }, + } +} + +type ClusterInstance_SdkV2 struct { + // The canonical identifier for the cluster used by a run. This field is + // always available for runs on existing clusters. For runs on new clusters, + // it becomes available once the cluster is created. This value can be used + // to view logs by browsing to `/#setting/sparkui/$cluster_id/driver-logs`. + // The logs continue to be available after the run completes. + // + // The response won’t include this field if the identifier is not + // available yet. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The canonical identifier for the Spark context used by a run. This field + // is filled in once the run begins execution. This value can be used to + // view the Spark UI by browsing to + // `/#setting/sparkui/$cluster_id/$spark_context_id`. The Spark UI continues + // to be available after the run has completed. + // + // The response won’t include this field if the identifier is not + // available yet. + SparkContextId types.String `tfsdk:"spark_context_id" tf:"optional"` +} + +func (newState *ClusterInstance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterInstance_SdkV2) { +} + +func (newState *ClusterInstance_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterInstance_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterInstance. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterInstance_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, ClusterInstance_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterInstance_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "spark_context_id": o.SparkContextId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterInstance_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "spark_context_id": types.StringType, + }, + } +} + +type ClusterSpec_SdkV2 struct { + // If existing_cluster_id, the ID of an existing cluster that is used for + // all runs. When running jobs or tasks on an existing cluster, you may need + // to manually restart the cluster if it stops responding. We suggest + // running jobs and tasks on new clusters for greater reliability + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + // If job_cluster_key, this task is executed reusing the cluster specified + // in `job.settings.job_clusters`. + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + // An optional list of libraries to be installed on the cluster. The default + // value is an empty list. + Libraries types.List `tfsdk:"library" tf:"optional"` + // If new_cluster, a description of a new cluster that is created for each + // run. + NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` +} + +func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec_SdkV2) { +} + +func (newState *ClusterSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_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, ClusterSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "existing_cluster_id": o.ExistingClusterId, + "job_cluster_key": o.JobClusterKey, + "library": o.Libraries, + "new_cluster": o.NewCluster, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "existing_cluster_id": types.StringType, + "job_cluster_key": types.StringType, + "library": basetypes.ListType{ + ElemType: compute_tf.Library{}.Type(ctx), + }, + "new_cluster": basetypes.ListType{ + ElemType: compute_tf.ClusterSpec{}.Type(ctx), + }, + }, + } +} + +// GetLibraries returns the value of the Libraries field in ClusterSpec_SdkV2 as +// a slice of compute_tf.Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetLibraries(ctx context.Context) ([]compute_tf.Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []compute_tf.Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetLibraries(ctx context.Context, v []compute_tf.Library_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["library"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNewCluster returns the value of the NewCluster field in ClusterSpec_SdkV2 as +// a compute_tf.ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterSpec_SdkV2) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec_SdkV2, bool) { + var e compute_tf.ClusterSpec_SdkV2 + if o.NewCluster.IsNull() || o.NewCluster.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterSpec_SdkV2 + d := o.NewCluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewCluster sets the value of the NewCluster field in ClusterSpec_SdkV2. +func (o *ClusterSpec_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] + o.NewCluster = types.ListValueMust(t, vs) +} + +type ConditionTask_SdkV2 struct { + // The left operand of the condition task. Can be either a string value or a + // job state or parameter reference. + Left types.String `tfsdk:"left" tf:""` + // * `EQUAL_TO`, `NOT_EQUAL` operators perform string comparison of their + // operands. This means that `“12.0” == “12”` will evaluate to + // `false`. * `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, + // `LESS_THAN_OR_EQUAL` operators perform numeric comparison of their + // operands. `“12.0” >= “12”` will evaluate to `true`, `“10.0” + // >= “12”` will evaluate to `false`. + // + // The boolean comparison to task values can be implemented with operators + // `EQUAL_TO`, `NOT_EQUAL`. If a task value was set to a boolean value, it + // will be serialized to `“true”` or `“false”` for the comparison. + Op types.String `tfsdk:"op" tf:""` + // The right operand of the condition task. Can be either a string value or + // a job state or parameter reference. + Right types.String `tfsdk:"right" tf:""` +} + +func (newState *ConditionTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConditionTask_SdkV2) { +} + +func (newState *ConditionTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConditionTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ConditionTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ConditionTask_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, ConditionTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ConditionTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "left": o.Left, + "op": o.Op, + "right": o.Right, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ConditionTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "left": types.StringType, + "op": types.StringType, + "right": types.StringType, + }, + } +} + +type Continuous_SdkV2 struct { + // Indicate whether the continuous execution of the job is paused or not. + // Defaults to UNPAUSED. + PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` +} + +func (newState *Continuous_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Continuous_SdkV2) { +} + +func (newState *Continuous_SdkV2) SyncEffectiveFieldsDuringRead(existingState Continuous_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Continuous. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Continuous_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, Continuous_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Continuous_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pause_status": o.PauseStatus, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Continuous_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pause_status": types.StringType, + }, + } +} + +type CreateJob_SdkV2 struct { + // List of permissions to set on the job. + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The id of the user specified budget policy to use for this job. If not + // specified, a default budget policy may be applied when creating or + // modifying the job. See `effective_budget_policy_id` for the budget policy + // used by this workload. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // An optional continuous property for this job. The continuous property + // will ensure that there is always one run executing. Only one of + // `schedule` and `continuous` can be used. + Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + // Deployment information for jobs managed by external sources. + Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + // An optional description for the job. The maximum length is 27700 + // characters in UTF-8 encoding. + Description types.String `tfsdk:"description" tf:"optional"` + // Edit mode of the job. + // + // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * + // `EDITABLE`: The job is in an editable state and can be modified. + EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + // An optional set of email addresses that is notified when runs of this job + // begin or complete as well as when this job is deleted. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // A list of task execution environment specifications that can be + // referenced by serverless tasks of this job. An environment is required to + // be present for serverless tasks. For serverless notebook tasks, the + // environment is accessible in the notebook environment panel. For other + // serverless tasks, the task environment is required to be specified using + // environment_key in the task settings. + Environments types.List `tfsdk:"environment" tf:"optional"` + // Used to tell what is the format of the job. This field is ignored in + // Create/Update/Reset calls. When using the Jobs API 2.1 this value is + // always set to `"MULTI_TASK"`. + Format types.String `tfsdk:"format" tf:"optional"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. + // + // If `git_source` is set, these tasks retrieve the file from the remote + // repository by default. However, this behavior can be overridden by + // setting `source` to `WORKSPACE` on the task. + // + // Note: dbt and SQL File tasks support only version-controlled sources. If + // dbt or SQL File tasks are used, `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health" tf:"optional,object"` + // A list of job cluster specifications that can be shared and reused by + // tasks of this job. Libraries cannot be declared in a shared job cluster. + // You must declare dependent libraries in task settings. + JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // An optional maximum allowed number of concurrent runs of the job. Set + // this value if you want to be able to execute multiple runs of the same + // job concurrently. This is useful for example if you trigger your job on a + // frequent schedule and want to allow consecutive runs to overlap with each + // other, or if you want to trigger multiple runs which differ by their + // input parameters. This setting affects only new runs. For example, + // suppose the job’s concurrency is 4 and there are 4 concurrent active + // runs. Then setting the concurrency to 3 won’t kill any of the active + // runs. However, from then on, new runs are skipped unless there are fewer + // than 3 active runs. This value cannot exceed 1000. Setting this value to + // `0` causes all new runs to be skipped. + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + // An optional name for the job. The maximum length is 4096 bytes in UTF-8 + // encoding. + Name types.String `tfsdk:"name" tf:"optional"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // job. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // Job-level parameter definitions + Parameters types.List `tfsdk:"parameter" tf:"optional"` + // The queue settings of the job. + Queue types.List `tfsdk:"queue" tf:"optional,object"` + // Write-only setting. Specifies the user or service principal that the job + // runs as. If not specified, the job runs as the user who created the job. + // + // Either `user_name` or `service_principal_name` should be specified. If + // not, an error is thrown. + RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + // An optional periodic schedule for this job. The default behavior is that + // the job only runs when triggered by clicking “Run Now” in the Jobs UI + // or sending an API request to `runNow`. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // A map of tags associated with the job. These are forwarded to the cluster + // as cluster tags for jobs clusters, and are subject to the same + // limitations as cluster tags. A maximum of 25 tags can be added to the + // job. + Tags types.Map `tfsdk:"tags" tf:"optional"` + // A list of task specifications to be executed by this job. + Tasks types.List `tfsdk:"task" tf:"optional"` + // An optional timeout applied to each run of this job. A value of `0` means + // no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A configuration to trigger a run when certain conditions are met. The + // default behavior is that the job runs only when triggered by clicking + // “Run Now” in the Jobs UI or sending an API request to `runNow`. + Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + // A collection of system notification IDs to notify when runs of this job + // begin or complete. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob_SdkV2) { +} + +func (newState *CreateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateJob_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateJob_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(JobAccessControlRequest_SdkV2{}), + "continuous": reflect.TypeOf(Continuous_SdkV2{}), + "deployment": reflect.TypeOf(JobDeployment_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "environment": reflect.TypeOf(JobEnvironment_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "job_cluster": reflect.TypeOf(JobCluster_SdkV2{}), + "notification_settings": reflect.TypeOf(JobNotificationSettings_SdkV2{}), + "parameter": reflect.TypeOf(JobParameterDefinition_SdkV2{}), + "queue": reflect.TypeOf(QueueSettings_SdkV2{}), + "run_as": reflect.TypeOf(JobRunAs_SdkV2{}), + "schedule": reflect.TypeOf(CronSchedule_SdkV2{}), + "tags": reflect.TypeOf(types.String{}), + "task": reflect.TypeOf(Task_SdkV2{}), + "trigger": reflect.TypeOf(TriggerSettings_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, CreateJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "budget_policy_id": o.BudgetPolicyId, + "continuous": o.Continuous, + "deployment": o.Deployment, + "description": o.Description, + "edit_mode": o.EditMode, + "email_notifications": o.EmailNotifications, + "environment": o.Environments, + "format": o.Format, + "git_source": o.GitSource, + "health": o.Health, + "job_cluster": o.JobClusters, + "max_concurrent_runs": o.MaxConcurrentRuns, + "name": o.Name, + "notification_settings": o.NotificationSettings, + "parameter": o.Parameters, + "queue": o.Queue, + "run_as": o.RunAs, + "schedule": o.Schedule, + "tags": o.Tags, + "task": o.Tasks, + "timeout_seconds": o.TimeoutSeconds, + "trigger": o.Trigger, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: JobAccessControlRequest{}.Type(ctx), + }, + "budget_policy_id": types.StringType, + "continuous": basetypes.ListType{ + ElemType: Continuous{}.Type(ctx), + }, + "deployment": basetypes.ListType{ + ElemType: JobDeployment{}.Type(ctx), + }, + "description": types.StringType, + "edit_mode": types.StringType, + "email_notifications": basetypes.ListType{ + ElemType: JobEmailNotifications{}.Type(ctx), + }, + "environment": basetypes.ListType{ + ElemType: JobEnvironment{}.Type(ctx), + }, + "format": types.StringType, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "health": basetypes.ListType{ + ElemType: JobsHealthRules{}.Type(ctx), + }, + "job_cluster": basetypes.ListType{ + ElemType: JobCluster{}.Type(ctx), + }, + "max_concurrent_runs": types.Int64Type, + "name": types.StringType, + "notification_settings": basetypes.ListType{ + ElemType: JobNotificationSettings{}.Type(ctx), + }, + "parameter": basetypes.ListType{ + ElemType: JobParameterDefinition{}.Type(ctx), + }, + "queue": basetypes.ListType{ + ElemType: QueueSettings{}.Type(ctx), + }, + "run_as": basetypes.ListType{ + ElemType: JobRunAs{}.Type(ctx), + }, + "schedule": basetypes.ListType{ + ElemType: CronSchedule{}.Type(ctx), + }, + "tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "task": basetypes.ListType{ + ElemType: Task{}.Type(ctx), + }, + "timeout_seconds": types.Int64Type, + "trigger": basetypes.ListType{ + ElemType: TriggerSettings{}.Type(ctx), + }, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in CreateJob_SdkV2 as +// a slice of JobAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetAccessControlList(ctx context.Context) ([]JobAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []JobAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetAccessControlList(ctx context.Context, v []JobAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// GetContinuous returns the value of the Continuous field in CreateJob_SdkV2 as +// a Continuous_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetContinuous(ctx context.Context) (Continuous_SdkV2, bool) { + var e Continuous_SdkV2 + if o.Continuous.IsNull() || o.Continuous.IsUnknown() { + return e, false + } + var v []Continuous_SdkV2 + d := o.Continuous.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetContinuous sets the value of the Continuous field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetContinuous(ctx context.Context, v Continuous_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous"] + o.Continuous = types.ListValueMust(t, vs) +} + +// GetDeployment returns the value of the Deployment field in CreateJob_SdkV2 as +// a JobDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetDeployment(ctx context.Context) (JobDeployment_SdkV2, bool) { + var e JobDeployment_SdkV2 + if o.Deployment.IsNull() || o.Deployment.IsUnknown() { + return e, false + } + var v []JobDeployment_SdkV2 + d := o.Deployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeployment sets the value of the Deployment field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetDeployment(ctx context.Context, v JobDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] + o.Deployment = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in CreateJob_SdkV2 as +// a JobEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetEmailNotifications(ctx context.Context) (JobEmailNotifications_SdkV2, bool) { + var e JobEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []JobEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetEmailNotifications(ctx context.Context, v JobEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetEnvironments returns the value of the Environments field in CreateJob_SdkV2 as +// a slice of JobEnvironment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetEnvironments(ctx context.Context) ([]JobEnvironment_SdkV2, bool) { + if o.Environments.IsNull() || o.Environments.IsUnknown() { + return nil, false + } + var v []JobEnvironment_SdkV2 + d := o.Environments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironments sets the value of the Environments field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetEnvironments(ctx context.Context, v []JobEnvironment_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["environment"] + t = t.(attr.TypeWithElementType).ElementType() + o.Environments = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in CreateJob_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in CreateJob_SdkV2 as +// a JobsHealthRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetHealth(ctx context.Context) (JobsHealthRules_SdkV2, bool) { + var e JobsHealthRules_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []JobsHealthRules_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetHealth(ctx context.Context, v JobsHealthRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetJobClusters returns the value of the JobClusters field in CreateJob_SdkV2 as +// a slice of JobCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetJobClusters(ctx context.Context) ([]JobCluster_SdkV2, bool) { + if o.JobClusters.IsNull() || o.JobClusters.IsUnknown() { + return nil, false + } + var v []JobCluster_SdkV2 + d := o.JobClusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobClusters sets the value of the JobClusters field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetJobClusters(ctx context.Context, v []JobCluster_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["job_cluster"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobClusters = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in CreateJob_SdkV2 as +// a JobNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetNotificationSettings(ctx context.Context) (JobNotificationSettings_SdkV2, bool) { + var e JobNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []JobNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetNotificationSettings(ctx context.Context, v JobNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in CreateJob_SdkV2 as +// a slice of JobParameterDefinition_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetParameters(ctx context.Context) ([]JobParameterDefinition_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []JobParameterDefinition_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetParameters(ctx context.Context, v []JobParameterDefinition_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["parameter"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetQueue returns the value of the Queue field in CreateJob_SdkV2 as +// a QueueSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetQueue(ctx context.Context) (QueueSettings_SdkV2, bool) { + var e QueueSettings_SdkV2 + if o.Queue.IsNull() || o.Queue.IsUnknown() { + return e, false + } + var v []QueueSettings_SdkV2 + d := o.Queue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueue sets the value of the Queue field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetQueue(ctx context.Context, v QueueSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] + o.Queue = types.ListValueMust(t, vs) +} + +// GetRunAs returns the value of the RunAs field in CreateJob_SdkV2 as +// a JobRunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetRunAs(ctx context.Context) (JobRunAs_SdkV2, bool) { + var e JobRunAs_SdkV2 + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []JobRunAs_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 CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetRunAs(ctx context.Context, v JobRunAs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] + o.RunAs = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in CreateJob_SdkV2 as +// a CronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetSchedule(ctx context.Context) (CronSchedule_SdkV2, bool) { + var e CronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []CronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetSchedule(ctx context.Context, v CronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in CreateJob_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 *CreateJob_SdkV2) GetTags(ctx context.Context) (map[string]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.MapValueMust(t, vs) +} + +// GetTasks returns the value of the Tasks field in CreateJob_SdkV2 as +// a slice of Task_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetTasks(ctx context.Context) ([]Task_SdkV2, bool) { + if o.Tasks.IsNull() || o.Tasks.IsUnknown() { + return nil, false + } + var v []Task_SdkV2 + d := o.Tasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTasks sets the value of the Tasks field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetTasks(ctx context.Context, v []Task_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["task"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tasks = types.ListValueMust(t, vs) +} + +// GetTrigger returns the value of the Trigger field in CreateJob_SdkV2 as +// a TriggerSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetTrigger(ctx context.Context) (TriggerSettings_SdkV2, bool) { + var e TriggerSettings_SdkV2 + if o.Trigger.IsNull() || o.Trigger.IsUnknown() { + return e, false + } + var v []TriggerSettings_SdkV2 + d := o.Trigger.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrigger sets the value of the Trigger field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetTrigger(ctx context.Context, v TriggerSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] + o.Trigger = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in CreateJob_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateJob_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in CreateJob_SdkV2. +func (o *CreateJob_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +// Job was created successfully +type CreateResponse_SdkV2 struct { + // The canonical identifier for the newly created job. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateResponse_SdkV2) { +} + +func (newState *CreateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateResponse_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, CreateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + }, + } +} + +type CronSchedule_SdkV2 struct { + // Indicate whether this schedule is paused or not. + PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + // A Cron expression using Quartz syntax that describes the schedule for a + // job. See [Cron Trigger] for details. This field is required. + // + // [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html + QuartzCronExpression types.String `tfsdk:"quartz_cron_expression" tf:""` + // A Java timezone ID. The schedule for a job is resolved with respect to + // this timezone. See [Java TimeZone] for details. This field is required. + // + // [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html + TimezoneId types.String `tfsdk:"timezone_id" tf:""` +} + +func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronSchedule_SdkV2) { +} + +func (newState *CronSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronSchedule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CronSchedule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CronSchedule_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, CronSchedule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CronSchedule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pause_status": o.PauseStatus, + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CronSchedule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pause_status": types.StringType, + "quartz_cron_expression": types.StringType, + "timezone_id": types.StringType, + }, + } +} + +type DbtOutput_SdkV2 struct { + // An optional map of headers to send when retrieving the artifact from the + // `artifacts_link`. + ArtifactsHeaders types.Map `tfsdk:"artifacts_headers" tf:"optional"` + // A pre-signed URL to download the (compressed) dbt artifacts. This link is + // valid for a limited time (30 minutes). This information is only available + // after the run has finished. + ArtifactsLink types.String `tfsdk:"artifacts_link" tf:"optional"` +} + +func (newState *DbtOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtOutput_SdkV2) { +} + +func (newState *DbtOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbtOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DbtOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "artifacts_headers": 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, DbtOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DbtOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifacts_headers": o.ArtifactsHeaders, + "artifacts_link": o.ArtifactsLink, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DbtOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifacts_headers": basetypes.MapType{ + ElemType: types.StringType, + }, + "artifacts_link": types.StringType, + }, + } +} + +// GetArtifactsHeaders returns the value of the ArtifactsHeaders field in DbtOutput_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 *DbtOutput_SdkV2) GetArtifactsHeaders(ctx context.Context) (map[string]types.String, bool) { + if o.ArtifactsHeaders.IsNull() || o.ArtifactsHeaders.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.ArtifactsHeaders.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetArtifactsHeaders sets the value of the ArtifactsHeaders field in DbtOutput_SdkV2. +func (o *DbtOutput_SdkV2) SetArtifactsHeaders(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["artifacts_headers"] + t = t.(attr.TypeWithElementType).ElementType() + o.ArtifactsHeaders = types.MapValueMust(t, vs) +} + +type DbtTask_SdkV2 struct { + // Optional name of the catalog to use. The value is the top level in the + // 3-level namespace of Unity Catalog (catalog / schema / relation). The + // catalog value can only be specified if a warehouse_id is specified. + // Requires dbt-databricks >= 1.1.1. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // A list of dbt commands to execute. All commands must start with `dbt`. + // This parameter must not be empty. A maximum of up to 10 commands can be + // provided. + Commands types.List `tfsdk:"commands" tf:""` + // Optional (relative) path to the profiles directory. Can only be specified + // if no warehouse_id is specified. If no warehouse_id is specified and this + // folder is unset, the root directory is used. + ProfilesDirectory types.String `tfsdk:"profiles_directory" tf:"optional"` + // Path to the project directory. Optional for Git sourced tasks, in which + // case if no value is provided, the root of the Git repository is used. + ProjectDirectory types.String `tfsdk:"project_directory" tf:"optional"` + // Optional schema to write to. This parameter is only used when a + // warehouse_id is also provided. If not provided, the `default` schema is + // used. + Schema types.String `tfsdk:"schema" tf:"optional"` + // Optional location type of the project directory. When set to `WORKSPACE`, + // the project will be retrieved from the local Databricks workspace. When + // set to `GIT`, the project will be retrieved from a Git repository defined + // in `git_source`. If the value is empty, the task will use `GIT` if + // `git_source` is defined and `WORKSPACE` otherwise. + // + // * `WORKSPACE`: Project is located in Databricks workspace. * `GIT`: + // Project is located in cloud Git provider. + Source types.String `tfsdk:"source" tf:"optional"` + // ID of the SQL warehouse to connect to. If provided, we automatically + // generate and provide the profile and connection details to dbt. It can be + // overridden on a per-command basis by using the `--profiles-dir` command + // line argument. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *DbtTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DbtTask_SdkV2) { +} + +func (newState *DbtTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState DbtTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DbtTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DbtTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "commands": 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, DbtTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DbtTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog": o.Catalog, + "commands": o.Commands, + "profiles_directory": o.ProfilesDirectory, + "project_directory": o.ProjectDirectory, + "schema": o.Schema, + "source": o.Source, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DbtTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog": types.StringType, + "commands": basetypes.ListType{ + ElemType: types.StringType, + }, + "profiles_directory": types.StringType, + "project_directory": types.StringType, + "schema": types.StringType, + "source": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetCommands returns the value of the Commands field in DbtTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DbtTask_SdkV2) GetCommands(ctx context.Context) ([]types.String, bool) { + if o.Commands.IsNull() || o.Commands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Commands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCommands sets the value of the Commands field in DbtTask_SdkV2. +func (o *DbtTask_SdkV2) SetCommands(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["commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.Commands = types.ListValueMust(t, vs) +} + +type DeleteJob_SdkV2 struct { + // The canonical identifier of the job to delete. This field is required. + JobId types.Int64 `tfsdk:"job_id" tf:""` +} + +func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteJob_SdkV2) { +} + +func (newState *DeleteJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteJob_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteJob_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, DeleteJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 DeleteRun_SdkV2 struct { + // ID of the run to delete. + RunId types.Int64 `tfsdk:"run_id" tf:""` +} + +func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun_SdkV2) { +} + +func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { +} + +// 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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +type DeleteRunResponse_SdkV2 struct { +} + +func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunResponse_SdkV2) { +} + +func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRunResponse_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, DeleteRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRunResponse_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 DeleteRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Represents a change to the job cluster's settings that would be required for +// the job clusters to become compliant with their policies. +type EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2 struct { + // The field where this change would be made, prepended with the job cluster + // key. + Field types.String `tfsdk:"field" tf:"optional"` + // The new value of this field after enforcing policy compliance (either a + // number, a boolean, or a string) converted to a string. This is intended + // to be read by a human. The typed new value of this field can be retrieved + // by reading the settings field in the API response. + NewValue types.String `tfsdk:"new_value" tf:"optional"` + // The previous value of this field before enforcing policy compliance + // (either a number, a boolean, or a string) converted to a string. This is + // intended to be read by a human. The type of the field can be retrieved by + // reading the settings field in the API response. + PreviousValue types.String `tfsdk:"previous_value" tf:"optional"` +} + +func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) { +} + +func (newState *EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceForJobResponseJobClusterSettingsChange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_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, EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "field": o.Field, + "new_value": o.NewValue, + "previous_value": o.PreviousValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "field": types.StringType, + "new_value": types.StringType, + "previous_value": types.StringType, + }, + } +} + +type EnforcePolicyComplianceRequest_SdkV2 struct { + // The ID of the job you want to enforce policy compliance on. + JobId types.Int64 `tfsdk:"job_id" tf:""` + // If set, previews changes made to the job to comply with its policy, but + // does not update the job. + ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` +} + +func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceRequest_SdkV2) { +} + +func (newState *EnforcePolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnforcePolicyComplianceRequest_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, EnforcePolicyComplianceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + "validate_only": o.ValidateOnly, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnforcePolicyComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + "validate_only": types.BoolType, + }, + } +} + +type EnforcePolicyComplianceResponse_SdkV2 struct { + // Whether any changes have been made to the job cluster settings for the + // job to become compliant with its policies. + HasChanges types.Bool `tfsdk:"has_changes" tf:"optional"` + // A list of job cluster changes that have been made to the job’s cluster + // settings in order for all job clusters to become compliant with their + // policies. + JobClusterChanges types.List `tfsdk:"job_cluster_changes" tf:"optional"` + // Updated job settings after policy enforcement. Policy enforcement only + // applies to job clusters that are created when running the job (which are + // specified in new_cluster) and does not apply to existing all-purpose + // clusters. Updated job settings are derived by applying policy default + // values to the existing job clusters in order to satisfy policy + // requirements. + Settings types.List `tfsdk:"settings" tf:"optional,object"` +} + +func (newState *EnforcePolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceResponse_SdkV2) { +} + +func (newState *EnforcePolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnforcePolicyComplianceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnforcePolicyComplianceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnforcePolicyComplianceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "job_cluster_changes": reflect.TypeOf(EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2{}), + "settings": reflect.TypeOf(JobSettings_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, EnforcePolicyComplianceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "has_changes": o.HasChanges, + "job_cluster_changes": o.JobClusterChanges, + "settings": o.Settings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnforcePolicyComplianceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "has_changes": types.BoolType, + "job_cluster_changes": basetypes.ListType{ + ElemType: EnforcePolicyComplianceForJobResponseJobClusterSettingsChange{}.Type(ctx), + }, + "settings": basetypes.ListType{ + ElemType: JobSettings{}.Type(ctx), + }, + }, + } +} + +// GetJobClusterChanges returns the value of the JobClusterChanges field in EnforcePolicyComplianceResponse_SdkV2 as +// a slice of EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EnforcePolicyComplianceResponse_SdkV2) GetJobClusterChanges(ctx context.Context) ([]EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2, bool) { + if o.JobClusterChanges.IsNull() || o.JobClusterChanges.IsUnknown() { + return nil, false + } + var v []EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2 + d := o.JobClusterChanges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobClusterChanges sets the value of the JobClusterChanges field in EnforcePolicyComplianceResponse_SdkV2. +func (o *EnforcePolicyComplianceResponse_SdkV2) SetJobClusterChanges(ctx context.Context, v []EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_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["job_cluster_changes"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobClusterChanges = types.ListValueMust(t, vs) +} + +// GetSettings returns the value of the Settings field in EnforcePolicyComplianceResponse_SdkV2 as +// a JobSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EnforcePolicyComplianceResponse_SdkV2) GetSettings(ctx context.Context) (JobSettings_SdkV2, bool) { + var e JobSettings_SdkV2 + if o.Settings.IsNull() || o.Settings.IsUnknown() { + return e, false + } + var v []JobSettings_SdkV2 + d := o.Settings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSettings sets the value of the Settings field in EnforcePolicyComplianceResponse_SdkV2. +func (o *EnforcePolicyComplianceResponse_SdkV2) SetSettings(ctx context.Context, v JobSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] + o.Settings = types.ListValueMust(t, vs) +} + +// Run was exported successfully. +type ExportRunOutput_SdkV2 struct { + // The exported content in HTML format (one for every view item). To extract + // the HTML notebook from the JSON response, download and run this [Python + // script]. + // + // [Python script]: https://docs.databricks.com/en/_static/examples/extract.py + Views types.List `tfsdk:"views" tf:"optional"` +} + +func (newState *ExportRunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunOutput_SdkV2) { +} + +func (newState *ExportRunOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRunOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportRunOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "views": reflect.TypeOf(ViewItem_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, ExportRunOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportRunOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "views": o.Views, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExportRunOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "views": basetypes.ListType{ + ElemType: ViewItem{}.Type(ctx), + }, + }, + } +} + +// GetViews returns the value of the Views field in ExportRunOutput_SdkV2 as +// a slice of ViewItem_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExportRunOutput_SdkV2) GetViews(ctx context.Context) ([]ViewItem_SdkV2, bool) { + if o.Views.IsNull() || o.Views.IsUnknown() { + return nil, false + } + var v []ViewItem_SdkV2 + d := o.Views.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetViews sets the value of the Views field in ExportRunOutput_SdkV2. +func (o *ExportRunOutput_SdkV2) SetViews(ctx context.Context, v []ViewItem_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["views"] + t = t.(attr.TypeWithElementType).ElementType() + o.Views = types.ListValueMust(t, vs) +} + +// Export and retrieve a job run +type ExportRunRequest_SdkV2 struct { + // The canonical identifier for the run. This field is required. + RunId types.Int64 `tfsdk:"-"` + // Which views to export (CODE, DASHBOARDS, or ALL). Defaults to CODE. + ViewsToExport types.String `tfsdk:"-"` +} + +func (newState *ExportRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRunRequest_SdkV2) { +} + +func (newState *ExportRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRunRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRunRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportRunRequest_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, ExportRunRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportRunRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + "views_to_export": o.ViewsToExport, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExportRunRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + "views_to_export": types.StringType, + }, + } +} + +type FileArrivalTriggerConfiguration_SdkV2 struct { + // If set, the trigger starts a run only after the specified amount of time + // passed since the last time the trigger fired. The minimum allowed value + // is 60 seconds + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + // URL to be monitored for file arrivals. The path must point to the root or + // a subpath of the external location. + Url types.String `tfsdk:"url" tf:""` + // If set, the trigger starts a run only after no file activity has occurred + // for the specified amount of time. This makes it possible to wait for a + // batch of incoming files to arrive before triggering a run. The minimum + // allowed value is 60 seconds. + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` +} + +func (newState *FileArrivalTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileArrivalTriggerConfiguration_SdkV2) { +} + +func (newState *FileArrivalTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileArrivalTriggerConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FileArrivalTriggerConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FileArrivalTriggerConfiguration_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, FileArrivalTriggerConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FileArrivalTriggerConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "min_time_between_triggers_seconds": o.MinTimeBetweenTriggersSeconds, + "url": o.Url, + "wait_after_last_change_seconds": o.WaitAfterLastChangeSeconds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileArrivalTriggerConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "min_time_between_triggers_seconds": types.Int64Type, + "url": types.StringType, + "wait_after_last_change_seconds": types.Int64Type, + }, + } +} + +type ForEachStats_SdkV2 struct { + // Sample of 3 most common error messages occurred during the iteration. + ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:"optional"` + // Describes stats of the iteration. Only latest retries are considered. + TaskRunStats types.List `tfsdk:"task_run_stats" tf:"optional,object"` +} + +func (newState *ForEachStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachStats_SdkV2) { +} + +func (newState *ForEachStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachStats_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachStats. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ForEachStats_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "error_message_stats": reflect.TypeOf(ForEachTaskErrorMessageStats_SdkV2{}), + "task_run_stats": reflect.TypeOf(ForEachTaskTaskRunStats_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, ForEachStats_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ForEachStats_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error_message_stats": o.ErrorMessageStats, + "task_run_stats": o.TaskRunStats, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ForEachStats_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error_message_stats": basetypes.ListType{ + ElemType: ForEachTaskErrorMessageStats{}.Type(ctx), + }, + "task_run_stats": basetypes.ListType{ + ElemType: ForEachTaskTaskRunStats{}.Type(ctx), + }, + }, + } +} + +// GetErrorMessageStats returns the value of the ErrorMessageStats field in ForEachStats_SdkV2 as +// a slice of ForEachTaskErrorMessageStats_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ForEachStats_SdkV2) GetErrorMessageStats(ctx context.Context) ([]ForEachTaskErrorMessageStats_SdkV2, bool) { + if o.ErrorMessageStats.IsNull() || o.ErrorMessageStats.IsUnknown() { + return nil, false + } + var v []ForEachTaskErrorMessageStats_SdkV2 + d := o.ErrorMessageStats.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetErrorMessageStats sets the value of the ErrorMessageStats field in ForEachStats_SdkV2. +func (o *ForEachStats_SdkV2) SetErrorMessageStats(ctx context.Context, v []ForEachTaskErrorMessageStats_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["error_message_stats"] + t = t.(attr.TypeWithElementType).ElementType() + o.ErrorMessageStats = types.ListValueMust(t, vs) +} + +// GetTaskRunStats returns the value of the TaskRunStats field in ForEachStats_SdkV2 as +// a ForEachTaskTaskRunStats_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ForEachStats_SdkV2) GetTaskRunStats(ctx context.Context) (ForEachTaskTaskRunStats_SdkV2, bool) { + var e ForEachTaskTaskRunStats_SdkV2 + if o.TaskRunStats.IsNull() || o.TaskRunStats.IsUnknown() { + return e, false + } + var v []ForEachTaskTaskRunStats_SdkV2 + d := o.TaskRunStats.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTaskRunStats sets the value of the TaskRunStats field in ForEachStats_SdkV2. +func (o *ForEachStats_SdkV2) SetTaskRunStats(ctx context.Context, v ForEachTaskTaskRunStats_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task_run_stats"] + o.TaskRunStats = types.ListValueMust(t, vs) +} + +type ForEachTask_SdkV2 struct { + // An optional maximum allowed number of concurrent runs of the task. Set + // this value if you want to be able to execute multiple runs of the task + // concurrently. + Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + // Array for task to iterate on. This can be a JSON string or a reference to + // an array parameter. + Inputs types.String `tfsdk:"inputs" tf:""` + // Configuration for the task that will be run for each element in the array + Task types.List `tfsdk:"task" tf:"object"` +} + +func (newState *ForEachTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTask_SdkV2) { +} + +func (newState *ForEachTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ForEachTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "task": reflect.TypeOf(Task_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, ForEachTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ForEachTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "concurrency": o.Concurrency, + "inputs": o.Inputs, + "task": o.Task, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ForEachTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "concurrency": types.Int64Type, + "inputs": types.StringType, + "task": basetypes.ListType{ + ElemType: Task{}.Type(ctx), + }, + }, + } +} + +// GetTask returns the value of the Task field in ForEachTask_SdkV2 as +// a Task_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ForEachTask_SdkV2) GetTask(ctx context.Context) (Task_SdkV2, bool) { + var e Task_SdkV2 + if o.Task.IsNull() || o.Task.IsUnknown() { + return e, false + } + var v []Task_SdkV2 + d := o.Task.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTask sets the value of the Task field in ForEachTask_SdkV2. +func (o *ForEachTask_SdkV2) SetTask(ctx context.Context, v Task_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task"] + o.Task = types.ListValueMust(t, vs) +} + +type ForEachTaskErrorMessageStats_SdkV2 struct { + // Describes the count of such error message encountered during the + // iterations. + Count types.Int64 `tfsdk:"count" tf:"optional"` + // Describes the error message occured during the iterations. + ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + // Describes the termination reason for the error message. + TerminationCategory types.String `tfsdk:"termination_category" tf:"optional"` +} + +func (newState *ForEachTaskErrorMessageStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskErrorMessageStats_SdkV2) { +} + +func (newState *ForEachTaskErrorMessageStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTaskErrorMessageStats_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskErrorMessageStats. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ForEachTaskErrorMessageStats_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, ForEachTaskErrorMessageStats_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ForEachTaskErrorMessageStats_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "count": o.Count, + "error_message": o.ErrorMessage, + "termination_category": o.TerminationCategory, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ForEachTaskErrorMessageStats_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "count": types.Int64Type, + "error_message": types.StringType, + "termination_category": types.StringType, + }, + } +} + +type ForEachTaskTaskRunStats_SdkV2 struct { + // Describes the iteration runs having an active lifecycle state or an + // active run sub state. + ActiveIterations types.Int64 `tfsdk:"active_iterations" tf:"optional"` + // Describes the number of failed and succeeded iteration runs. + CompletedIterations types.Int64 `tfsdk:"completed_iterations" tf:"optional"` + // Describes the number of failed iteration runs. + FailedIterations types.Int64 `tfsdk:"failed_iterations" tf:"optional"` + // Describes the number of iteration runs that have been scheduled. + ScheduledIterations types.Int64 `tfsdk:"scheduled_iterations" tf:"optional"` + // Describes the number of succeeded iteration runs. + SucceededIterations types.Int64 `tfsdk:"succeeded_iterations" tf:"optional"` + // Describes the length of the list of items to iterate over. + TotalIterations types.Int64 `tfsdk:"total_iterations" tf:"optional"` +} + +func (newState *ForEachTaskTaskRunStats_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTaskTaskRunStats_SdkV2) { +} + +func (newState *ForEachTaskTaskRunStats_SdkV2) SyncEffectiveFieldsDuringRead(existingState ForEachTaskTaskRunStats_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ForEachTaskTaskRunStats. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ForEachTaskTaskRunStats_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, ForEachTaskTaskRunStats_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ForEachTaskTaskRunStats_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "active_iterations": o.ActiveIterations, + "completed_iterations": o.CompletedIterations, + "failed_iterations": o.FailedIterations, + "scheduled_iterations": o.ScheduledIterations, + "succeeded_iterations": o.SucceededIterations, + "total_iterations": o.TotalIterations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ForEachTaskTaskRunStats_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "active_iterations": types.Int64Type, + "completed_iterations": types.Int64Type, + "failed_iterations": types.Int64Type, + "scheduled_iterations": types.Int64Type, + "succeeded_iterations": types.Int64Type, + "total_iterations": types.Int64Type, + }, + } +} + +// Get job permission levels +type GetJobPermissionLevelsRequest_SdkV2 struct { + // The job for which to get or manage permissions. + JobId types.String `tfsdk:"-"` +} + +func (newState *GetJobPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetJobPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetJobPermissionLevelsRequest_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, GetJobPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetJobPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.StringType, + }, + } +} + +type GetJobPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetJobPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetJobPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetJobPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(JobPermissionsDescription_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, GetJobPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetJobPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: JobPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetJobPermissionLevelsResponse_SdkV2 as +// a slice of JobPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetJobPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]JobPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []JobPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetJobPermissionLevelsResponse_SdkV2. +func (o *GetJobPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []JobPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get job permissions +type GetJobPermissionsRequest_SdkV2 struct { + // The job for which to get or manage permissions. + JobId types.String `tfsdk:"-"` +} + +func (newState *GetJobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobPermissionsRequest_SdkV2) { +} + +func (newState *GetJobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetJobPermissionsRequest_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, GetJobPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetJobPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.StringType, + }, + } +} + +// Get a single job +type GetJobRequest_SdkV2 struct { + // The canonical identifier of the job to retrieve information about. This + // field is required. + JobId types.Int64 `tfsdk:"-"` +} + +func (newState *GetJobRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetJobRequest_SdkV2) { +} + +func (newState *GetJobRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetJobRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetJobRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetJobRequest_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, GetJobRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetJobRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetJobRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + }, + } +} + +// Get job policy compliance +type GetPolicyComplianceRequest_SdkV2 struct { + // The ID of the job whose compliance status you are requesting. + JobId types.Int64 `tfsdk:"-"` +} + +func (newState *GetPolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceRequest_SdkV2) { +} + +func (newState *GetPolicyComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPolicyComplianceRequest_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, GetPolicyComplianceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPolicyComplianceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPolicyComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + }, + } +} + +type GetPolicyComplianceResponse_SdkV2 struct { + // Whether the job is compliant with its policies or not. Jobs could be out + // of compliance if a policy they are using was updated after the job was + // last edited and some of its job clusters no longer comply with their + // updated policies. + IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + // An object containing key-value mappings representing the first 200 policy + // validation errors. The keys indicate the path where the policy validation + // error is occurring. An identifier for the job cluster is prepended to the + // path. The values indicate an error message describing the policy + // validation error. + Violations types.Map `tfsdk:"violations" tf:"optional"` +} + +func (newState *GetPolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPolicyComplianceResponse_SdkV2) { +} + +func (newState *GetPolicyComplianceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPolicyComplianceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPolicyComplianceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPolicyComplianceResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "violations": 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, GetPolicyComplianceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPolicyComplianceResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPolicyComplianceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_compliant": types.BoolType, + "violations": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetViolations returns the value of the Violations field in GetPolicyComplianceResponse_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 *GetPolicyComplianceResponse_SdkV2) GetViolations(ctx context.Context) (map[string]types.String, bool) { + if o.Violations.IsNull() || o.Violations.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Violations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetViolations sets the value of the Violations field in GetPolicyComplianceResponse_SdkV2. +func (o *GetPolicyComplianceResponse_SdkV2) SetViolations(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["violations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Violations = types.MapValueMust(t, vs) +} + +// Get the output for a single run +type GetRunOutputRequest_SdkV2 struct { + // The canonical identifier for the run. + RunId types.Int64 `tfsdk:"-"` +} + +func (newState *GetRunOutputRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunOutputRequest_SdkV2) { +} + +func (newState *GetRunOutputRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunOutputRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunOutputRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRunOutputRequest_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, GetRunOutputRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRunOutputRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRunOutputRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +// Get a single job run +type GetRunRequest_SdkV2 struct { + // Whether to include the repair history in the response. + IncludeHistory types.Bool `tfsdk:"-"` + // Whether to include resolved parameter values in the response. + IncludeResolvedValues types.Bool `tfsdk:"-"` + // To list the next page of job tasks, set this field to the value of the + // `next_page_token` returned in the GetJob response. + PageToken types.String `tfsdk:"-"` + // The canonical identifier of the run for which to retrieve the metadata. + // This field is required. + RunId types.Int64 `tfsdk:"-"` +} + +func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest_SdkV2) { +} + +func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRunRequest_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, GetRunRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRunRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "include_history": o.IncludeHistory, + "include_resolved_values": o.IncludeResolvedValues, + "page_token": o.PageToken, + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRunRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_history": types.BoolType, + "include_resolved_values": types.BoolType, + "page_token": types.StringType, + "run_id": types.Int64Type, + }, + } +} + +// Read-only state of the remote repository at the time the job was run. This +// field is only included on job runs. +type GitSnapshot_SdkV2 struct { + // Commit that was used to execute the run. If git_branch was specified, + // this points to the HEAD of the branch at the time of the run; if git_tag + // was specified, this points to the commit the tag points to. + UsedCommit types.String `tfsdk:"used_commit" tf:"optional"` +} + +func (newState *GitSnapshot_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSnapshot_SdkV2) { +} + +func (newState *GitSnapshot_SdkV2) SyncEffectiveFieldsDuringRead(existingState GitSnapshot_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSnapshot. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GitSnapshot_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, GitSnapshot_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GitSnapshot_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "used_commit": o.UsedCommit, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GitSnapshot_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "used_commit": types.StringType, + }, + } +} + +// An optional specification for a remote Git repository containing the source +// code used by tasks. Version-controlled source code is supported by notebook, +// dbt, Python script, and SQL File tasks. +// +// If `git_source` is set, these tasks retrieve the file from the remote +// repository by default. However, this behavior can be overridden by setting +// `source` to `WORKSPACE` on the task. +// +// Note: dbt and SQL File tasks support only version-controlled sources. If dbt +// or SQL File tasks are used, `git_source` must be defined on the job. +type GitSource_SdkV2 struct { + // Name of the branch to be checked out and used by this job. This field + // cannot be specified in conjunction with git_tag or git_commit. + GitBranch types.String `tfsdk:"branch" tf:"optional"` + // Commit to be checked out and used by this job. This field cannot be + // specified in conjunction with git_branch or git_tag. + GitCommit types.String `tfsdk:"commit" tf:"optional"` + // Unique identifier of the service used to host the Git repository. The + // value is case insensitive. + GitProvider types.String `tfsdk:"git_provider" tf:""` + // Read-only state of the remote repository at the time the job was run. + // This field is only included on job runs. + GitSnapshot types.List `tfsdk:"git_snapshot" tf:"optional,object"` + // Name of the tag to be checked out and used by this job. This field cannot + // be specified in conjunction with git_branch or git_commit. + GitTag types.String `tfsdk:"tag" tf:"optional"` + // URL of the repository to be cloned by this job. + GitUrl types.String `tfsdk:"url" tf:""` + // The source of the job specification in the remote repository when the job + // is source controlled. + JobSource types.List `tfsdk:"job_source" tf:"optional,object"` +} + +func (newState *GitSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSource_SdkV2) { +} + +func (newState *GitSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState GitSource_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GitSource. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GitSource_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "git_snapshot": reflect.TypeOf(GitSnapshot_SdkV2{}), + "job_source": reflect.TypeOf(JobSource_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, GitSource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GitSource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch": o.GitBranch, + "commit": o.GitCommit, + "git_provider": o.GitProvider, + "git_snapshot": o.GitSnapshot, + "tag": o.GitTag, + "url": o.GitUrl, + "job_source": o.JobSource, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GitSource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch": types.StringType, + "commit": types.StringType, + "git_provider": types.StringType, + "git_snapshot": basetypes.ListType{ + ElemType: GitSnapshot{}.Type(ctx), + }, + "tag": types.StringType, + "url": types.StringType, + "job_source": basetypes.ListType{ + ElemType: JobSource{}.Type(ctx), + }, + }, + } +} + +// GetGitSnapshot returns the value of the GitSnapshot field in GitSource_SdkV2 as +// a GitSnapshot_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GitSource_SdkV2) GetGitSnapshot(ctx context.Context) (GitSnapshot_SdkV2, bool) { + var e GitSnapshot_SdkV2 + if o.GitSnapshot.IsNull() || o.GitSnapshot.IsUnknown() { + return e, false + } + var v []GitSnapshot_SdkV2 + d := o.GitSnapshot.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSnapshot sets the value of the GitSnapshot field in GitSource_SdkV2. +func (o *GitSource_SdkV2) SetGitSnapshot(ctx context.Context, v GitSnapshot_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_snapshot"] + o.GitSnapshot = types.ListValueMust(t, vs) +} + +// GetJobSource returns the value of the JobSource field in GitSource_SdkV2 as +// a JobSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GitSource_SdkV2) GetJobSource(ctx context.Context) (JobSource_SdkV2, bool) { + var e JobSource_SdkV2 + if o.JobSource.IsNull() || o.JobSource.IsUnknown() { + return e, false + } + var v []JobSource_SdkV2 + d := o.JobSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetJobSource sets the value of the JobSource field in GitSource_SdkV2. +func (o *GitSource_SdkV2) SetJobSource(ctx context.Context, v JobSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_source"] + o.JobSource = types.ListValueMust(t, vs) +} + +// Job was retrieved successfully. +type Job_SdkV2 struct { + // The time at which this job was created in epoch milliseconds + // (milliseconds since 1/1/1970 UTC). + CreatedTime types.Int64 `tfsdk:"created_time" tf:"optional"` + // The creator user name. This field won’t be included in the response if + // the user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // The id of the budget policy used by this job for cost attribution + // purposes. This may be set through (in order of precedence): 1. Budget + // admins through the account or workspace console 2. Jobs UI in the job + // details page and Jobs API using `budget_policy_id` 3. Inferred default + // based on accessible budget policies of the run_as identity on job + // creation or modification. + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"computed"` + // The canonical identifier for this job. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + // The email of an active workspace user or the application ID of a service + // principal that the job runs as. This value can be changed by setting the + // `run_as` field when creating or updating a job. + // + // By default, `run_as_user_name` is based on the current job settings and + // is set to the creator of the job if job access control is disabled or to + // the user with the `is_owner` permission if job access control is enabled. + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + // Settings for this job and all of its runs. These settings can be updated + // using the `resetJob` method. + Settings types.List `tfsdk:"settings" tf:"optional,object"` +} + +func (newState *Job_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job_SdkV2) { +} + +func (newState *Job_SdkV2) SyncEffectiveFieldsDuringRead(existingState Job_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Job. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Job_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "settings": reflect.TypeOf(JobSettings_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, Job_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Job_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_time": o.CreatedTime, + "creator_user_name": o.CreatorUserName, + "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "job_id": o.JobId, + "run_as_user_name": o.RunAsUserName, + "settings": o.Settings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Job_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_time": types.Int64Type, + "creator_user_name": types.StringType, + "effective_budget_policy_id": types.StringType, + "job_id": types.Int64Type, + "run_as_user_name": types.StringType, + "settings": basetypes.ListType{ + ElemType: JobSettings{}.Type(ctx), + }, + }, + } +} + +// GetSettings returns the value of the Settings field in Job_SdkV2 as +// a JobSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Job_SdkV2) GetSettings(ctx context.Context) (JobSettings_SdkV2, bool) { + var e JobSettings_SdkV2 + if o.Settings.IsNull() || o.Settings.IsUnknown() { + return e, false + } + var v []JobSettings_SdkV2 + d := o.Settings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSettings sets the value of the Settings field in Job_SdkV2. +func (o *Job_SdkV2) SetSettings(ctx context.Context, v JobSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] + o.Settings = types.ListValueMust(t, vs) +} + +type JobAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *JobAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlRequest_SdkV2) { +} + +func (newState *JobAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobAccessControlRequest_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, JobAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type JobAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *JobAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobAccessControlResponse_SdkV2) { +} + +func (newState *JobAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(JobPermission_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, JobAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: JobPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in JobAccessControlResponse_SdkV2 as +// a slice of JobPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]JobPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []JobPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in JobAccessControlResponse_SdkV2. +func (o *JobAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []JobPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type JobCluster_SdkV2 struct { + // A unique name for the job cluster. This field is required and must be + // unique within the job. `JobTaskSettings` may refer to this field to + // determine which cluster to launch for the task execution. + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` + // If new_cluster, a description of a cluster that is created for each task. + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` +} + +func (newState *JobCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCluster_SdkV2) { +} + +func (newState *JobCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_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, JobCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_cluster_key": o.JobClusterKey, + "new_cluster": o.NewCluster, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_cluster_key": types.StringType, + "new_cluster": basetypes.ListType{ + ElemType: compute_tf.ClusterSpec{}.Type(ctx), + }, + }, + } +} + +// GetNewCluster returns the value of the NewCluster field in JobCluster_SdkV2 as +// a compute_tf.ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobCluster_SdkV2) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec_SdkV2, bool) { + var e compute_tf.ClusterSpec_SdkV2 + if o.NewCluster.IsNull() || o.NewCluster.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterSpec_SdkV2 + d := o.NewCluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewCluster sets the value of the NewCluster field in JobCluster_SdkV2. +func (o *JobCluster_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] + o.NewCluster = types.ListValueMust(t, vs) +} + +type JobCompliance_SdkV2 struct { + // Whether this job is in compliance with the latest version of its policy. + IsCompliant types.Bool `tfsdk:"is_compliant" tf:"optional"` + // Canonical unique identifier for a job. + JobId types.Int64 `tfsdk:"job_id" tf:""` + // An object containing key-value mappings representing the first 200 policy + // validation errors. The keys indicate the path where the policy validation + // error is occurring. An identifier for the job cluster is prepended to the + // path. The values indicate an error message describing the policy + // validation error. + Violations types.Map `tfsdk:"violations" tf:"optional"` +} + +func (newState *JobCompliance_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCompliance_SdkV2) { +} + +func (newState *JobCompliance_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobCompliance_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobCompliance. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobCompliance_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "violations": 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, JobCompliance_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobCompliance_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "job_id": o.JobId, + "violations": o.Violations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobCompliance_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_compliant": types.BoolType, + "job_id": types.Int64Type, + "violations": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetViolations returns the value of the Violations field in JobCompliance_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 *JobCompliance_SdkV2) GetViolations(ctx context.Context) (map[string]types.String, bool) { + if o.Violations.IsNull() || o.Violations.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Violations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetViolations sets the value of the Violations field in JobCompliance_SdkV2. +func (o *JobCompliance_SdkV2) SetViolations(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["violations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Violations = types.MapValueMust(t, vs) +} + +type JobDeployment_SdkV2 struct { + // The kind of deployment that manages the job. + // + // * `BUNDLE`: The job is managed by Databricks Asset Bundle. + Kind types.String `tfsdk:"kind" tf:""` + // Path of the file that contains deployment metadata. + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` +} + +func (newState *JobDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobDeployment_SdkV2) { +} + +func (newState *JobDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobDeployment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobDeployment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobDeployment_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, JobDeployment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobDeployment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "kind": o.Kind, + "metadata_file_path": o.MetadataFilePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobDeployment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "kind": types.StringType, + "metadata_file_path": types.StringType, + }, + } +} + +type JobEmailNotifications_SdkV2 struct { + // If true, do not send email to recipients specified in `on_failure` if the + // run is skipped. This field is `deprecated`. Please use the + // `notification_settings.no_alert_for_skipped_runs` field. + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + // A list of email addresses to be notified when the duration of a run + // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in + // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is + // specified in the `health` field for the job, notifications are not sent. + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + // A list of email addresses to be notified when a run unsuccessfully + // completes. A run is considered to have completed unsuccessfully if it + // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or + // `TIMED_OUT` result_state. If this is not specified on job creation, + // reset, or update the list is empty, and notifications are not sent. + OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + // A list of email addresses to be notified when a run begins. If not + // specified on job creation, reset, or update, the list is empty, and + // notifications are not sent. + OnStart types.List `tfsdk:"on_start" tf:"optional"` + // A list of email addresses to notify when any streaming backlog thresholds + // are exceeded for any stream. Streaming backlog thresholds can be set in + // the `health` field using the following metrics: + // `STREAMING_BACKLOG_BYTES`, `STREAMING_BACKLOG_RECORDS`, + // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is + // based on the 10-minute average of these metrics. If the issue persists, + // notifications are resent every 30 minutes. + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + // A list of email addresses to be notified when a run successfully + // completes. A run is considered to have completed successfully if it ends + // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If + // not specified on job creation, reset, or update, the list is empty, and + // notifications are not sent. + OnSuccess types.List `tfsdk:"on_success" tf:"optional"` +} + +func (newState *JobEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEmailNotifications_SdkV2) { +} + +func (newState *JobEmailNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobEmailNotifications_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEmailNotifications. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobEmailNotifications_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "on_duration_warning_threshold_exceeded": reflect.TypeOf(types.String{}), + "on_failure": reflect.TypeOf(types.String{}), + "on_start": reflect.TypeOf(types.String{}), + "on_streaming_backlog_exceeded": reflect.TypeOf(types.String{}), + "on_success": 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, JobEmailNotifications_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobEmailNotifications_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "no_alert_for_skipped_runs": o.NoAlertForSkippedRuns, + "on_duration_warning_threshold_exceeded": o.OnDurationWarningThresholdExceeded, + "on_failure": o.OnFailure, + "on_start": o.OnStart, + "on_streaming_backlog_exceeded": o.OnStreamingBacklogExceeded, + "on_success": o.OnSuccess, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobEmailNotifications_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "no_alert_for_skipped_runs": types.BoolType, + "on_duration_warning_threshold_exceeded": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_failure": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_start": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_streaming_backlog_exceeded": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_success": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetOnDurationWarningThresholdExceeded returns the value of the OnDurationWarningThresholdExceeded field in JobEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEmailNotifications_SdkV2) GetOnDurationWarningThresholdExceeded(ctx context.Context) ([]types.String, bool) { + if o.OnDurationWarningThresholdExceeded.IsNull() || o.OnDurationWarningThresholdExceeded.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnDurationWarningThresholdExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnDurationWarningThresholdExceeded sets the value of the OnDurationWarningThresholdExceeded field in JobEmailNotifications_SdkV2. +func (o *JobEmailNotifications_SdkV2) SetOnDurationWarningThresholdExceeded(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["on_duration_warning_threshold_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnDurationWarningThresholdExceeded = types.ListValueMust(t, vs) +} + +// GetOnFailure returns the value of the OnFailure field in JobEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEmailNotifications_SdkV2) GetOnFailure(ctx context.Context) ([]types.String, bool) { + if o.OnFailure.IsNull() || o.OnFailure.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnFailure.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnFailure sets the value of the OnFailure field in JobEmailNotifications_SdkV2. +func (o *JobEmailNotifications_SdkV2) SetOnFailure(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["on_failure"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnFailure = types.ListValueMust(t, vs) +} + +// GetOnStart returns the value of the OnStart field in JobEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEmailNotifications_SdkV2) GetOnStart(ctx context.Context) ([]types.String, bool) { + if o.OnStart.IsNull() || o.OnStart.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnStart.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStart sets the value of the OnStart field in JobEmailNotifications_SdkV2. +func (o *JobEmailNotifications_SdkV2) SetOnStart(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["on_start"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStart = types.ListValueMust(t, vs) +} + +// GetOnStreamingBacklogExceeded returns the value of the OnStreamingBacklogExceeded field in JobEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEmailNotifications_SdkV2) GetOnStreamingBacklogExceeded(ctx context.Context) ([]types.String, bool) { + if o.OnStreamingBacklogExceeded.IsNull() || o.OnStreamingBacklogExceeded.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnStreamingBacklogExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStreamingBacklogExceeded sets the value of the OnStreamingBacklogExceeded field in JobEmailNotifications_SdkV2. +func (o *JobEmailNotifications_SdkV2) SetOnStreamingBacklogExceeded(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["on_streaming_backlog_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStreamingBacklogExceeded = types.ListValueMust(t, vs) +} + +// GetOnSuccess returns the value of the OnSuccess field in JobEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEmailNotifications_SdkV2) GetOnSuccess(ctx context.Context) ([]types.String, bool) { + if o.OnSuccess.IsNull() || o.OnSuccess.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnSuccess.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnSuccess sets the value of the OnSuccess field in JobEmailNotifications_SdkV2. +func (o *JobEmailNotifications_SdkV2) SetOnSuccess(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["on_success"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnSuccess = types.ListValueMust(t, vs) +} + +type JobEnvironment_SdkV2 struct { + // The key of an environment. It has to be unique within a job. + EnvironmentKey types.String `tfsdk:"environment_key" tf:""` + // The environment entity used to preserve serverless environment side panel + // and jobs' environment for non-notebook task. In this minimal environment + // spec, only pip dependencies are supported. + Spec types.List `tfsdk:"spec" tf:"optional,object"` +} + +func (newState *JobEnvironment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEnvironment_SdkV2) { +} + +func (newState *JobEnvironment_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobEnvironment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobEnvironment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobEnvironment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "spec": reflect.TypeOf(compute_tf.Environment_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, JobEnvironment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobEnvironment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "environment_key": o.EnvironmentKey, + "spec": o.Spec, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobEnvironment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "environment_key": types.StringType, + "spec": basetypes.ListType{ + ElemType: compute_tf.Environment{}.Type(ctx), + }, + }, + } +} + +// GetSpec returns the value of the Spec field in JobEnvironment_SdkV2 as +// a compute_tf.Environment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobEnvironment_SdkV2) GetSpec(ctx context.Context) (compute_tf.Environment_SdkV2, bool) { + var e compute_tf.Environment_SdkV2 + if o.Spec.IsNull() || o.Spec.IsUnknown() { + return e, false + } + var v []compute_tf.Environment_SdkV2 + d := o.Spec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSpec sets the value of the Spec field in JobEnvironment_SdkV2. +func (o *JobEnvironment_SdkV2) SetSpec(ctx context.Context, v compute_tf.Environment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] + o.Spec = types.ListValueMust(t, vs) +} + +type JobNotificationSettings_SdkV2 struct { + // If true, do not send notifications to recipients specified in + // `on_failure` if the run is canceled. + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + // If true, do not send notifications to recipients specified in + // `on_failure` if the run is skipped. + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` +} + +func (newState *JobNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobNotificationSettings_SdkV2) { +} + +func (newState *JobNotificationSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobNotificationSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobNotificationSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobNotificationSettings_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, JobNotificationSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobNotificationSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "no_alert_for_canceled_runs": o.NoAlertForCanceledRuns, + "no_alert_for_skipped_runs": o.NoAlertForSkippedRuns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobNotificationSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "no_alert_for_canceled_runs": types.BoolType, + "no_alert_for_skipped_runs": types.BoolType, + }, + } +} + +type JobParameter_SdkV2 struct { + // The optional default value of the parameter + Default types.String `tfsdk:"default" tf:"optional"` + // The name of the parameter + Name types.String `tfsdk:"name" tf:"optional"` + // The value used in the run + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *JobParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobParameter_SdkV2) { +} + +func (newState *JobParameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobParameter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobParameter_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, JobParameter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobParameter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default": o.Default, + "name": o.Name, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobParameter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default": types.StringType, + "name": types.StringType, + "value": types.StringType, + }, + } +} + +type JobParameterDefinition_SdkV2 struct { + // Default value of the parameter. + Default types.String `tfsdk:"default" tf:""` + // The name of the defined parameter. May only contain alphanumeric + // characters, `_`, `-`, and `.` + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *JobParameterDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobParameterDefinition_SdkV2) { +} + +func (newState *JobParameterDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobParameterDefinition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobParameterDefinition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobParameterDefinition_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, JobParameterDefinition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobParameterDefinition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default": o.Default, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobParameterDefinition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default": types.StringType, + "name": types.StringType, + }, + } +} + +type JobPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *JobPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermission_SdkV2) { +} + +func (newState *JobPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, JobPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in JobPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in JobPermission_SdkV2. +func (o *JobPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type JobPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *JobPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissions_SdkV2) { +} + +func (newState *JobPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(JobAccessControlResponse_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, JobPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: JobAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in JobPermissions_SdkV2 as +// a slice of JobAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]JobAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []JobAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in JobPermissions_SdkV2. +func (o *JobPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []JobAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type JobPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *JobPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsDescription_SdkV2) { +} + +func (newState *JobPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobPermissionsDescription_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, JobPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type JobPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The job for which to get or manage permissions. + JobId types.String `tfsdk:"-"` +} + +func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobPermissionsRequest_SdkV2) { +} + +func (newState *JobPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(JobAccessControlRequest_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, JobPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "job_id": o.JobId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: JobAccessControlRequest{}.Type(ctx), + }, + "job_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in JobPermissionsRequest_SdkV2 as +// a slice of JobAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]JobAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []JobAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in JobPermissionsRequest_SdkV2. +func (o *JobPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []JobAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// 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. +type JobRunAs_SdkV2 struct { + // Application ID of an active service principal. Setting this field + // requires the `servicePrincipal/user` role. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // The email of an active workspace user. Non-admin users can only set this + // field to their own email. + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *JobRunAs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobRunAs_SdkV2) { +} + +func (newState *JobRunAs_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobRunAs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobRunAs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobRunAs_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, JobRunAs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobRunAs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobRunAs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type JobSettings_SdkV2 struct { + // The id of the user specified budget policy to use for this job. If not + // specified, a default budget policy may be applied when creating or + // modifying the job. See `effective_budget_policy_id` for the budget policy + // used by this workload. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // An optional continuous property for this job. The continuous property + // will ensure that there is always one run executing. Only one of + // `schedule` and `continuous` can be used. + Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + // Deployment information for jobs managed by external sources. + Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + // An optional description for the job. The maximum length is 27700 + // characters in UTF-8 encoding. + Description types.String `tfsdk:"description" tf:"optional"` + // Edit mode of the job. + // + // * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * + // `EDITABLE`: The job is in an editable state and can be modified. + EditMode types.String `tfsdk:"edit_mode" tf:"optional"` + // An optional set of email addresses that is notified when runs of this job + // begin or complete as well as when this job is deleted. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // A list of task execution environment specifications that can be + // referenced by serverless tasks of this job. An environment is required to + // be present for serverless tasks. For serverless notebook tasks, the + // environment is accessible in the notebook environment panel. For other + // serverless tasks, the task environment is required to be specified using + // environment_key in the task settings. + Environments types.List `tfsdk:"environment" tf:"optional"` + // Used to tell what is the format of the job. This field is ignored in + // Create/Update/Reset calls. When using the Jobs API 2.1 this value is + // always set to `"MULTI_TASK"`. + Format types.String `tfsdk:"format" tf:"optional"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. + // + // If `git_source` is set, these tasks retrieve the file from the remote + // repository by default. However, this behavior can be overridden by + // setting `source` to `WORKSPACE` on the task. + // + // Note: dbt and SQL File tasks support only version-controlled sources. If + // dbt or SQL File tasks are used, `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health" tf:"optional,object"` + // A list of job cluster specifications that can be shared and reused by + // tasks of this job. Libraries cannot be declared in a shared job cluster. + // You must declare dependent libraries in task settings. + JobClusters types.List `tfsdk:"job_cluster" tf:"optional"` + // An optional maximum allowed number of concurrent runs of the job. Set + // this value if you want to be able to execute multiple runs of the same + // job concurrently. This is useful for example if you trigger your job on a + // frequent schedule and want to allow consecutive runs to overlap with each + // other, or if you want to trigger multiple runs which differ by their + // input parameters. This setting affects only new runs. For example, + // suppose the job’s concurrency is 4 and there are 4 concurrent active + // runs. Then setting the concurrency to 3 won’t kill any of the active + // runs. However, from then on, new runs are skipped unless there are fewer + // than 3 active runs. This value cannot exceed 1000. Setting this value to + // `0` causes all new runs to be skipped. + MaxConcurrentRuns types.Int64 `tfsdk:"max_concurrent_runs" tf:"optional"` + // An optional name for the job. The maximum length is 4096 bytes in UTF-8 + // encoding. + Name types.String `tfsdk:"name" tf:"optional"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // job. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // Job-level parameter definitions + Parameters types.List `tfsdk:"parameter" tf:"optional"` + // The queue settings of the job. + Queue types.List `tfsdk:"queue" tf:"optional,object"` + // Write-only setting. Specifies the user or service principal that the job + // runs as. If not specified, the job runs as the user who created the job. + // + // Either `user_name` or `service_principal_name` should be specified. If + // not, an error is thrown. + RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + // An optional periodic schedule for this job. The default behavior is that + // the job only runs when triggered by clicking “Run Now” in the Jobs UI + // or sending an API request to `runNow`. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // A map of tags associated with the job. These are forwarded to the cluster + // as cluster tags for jobs clusters, and are subject to the same + // limitations as cluster tags. A maximum of 25 tags can be added to the + // job. + Tags types.Map `tfsdk:"tags" tf:"optional"` + // A list of task specifications to be executed by this job. + Tasks types.List `tfsdk:"task" tf:"optional"` + // An optional timeout applied to each run of this job. A value of `0` means + // no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A configuration to trigger a run when certain conditions are met. The + // default behavior is that the job runs only when triggered by clicking + // “Run Now” in the Jobs UI or sending an API request to `runNow`. + Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + // A collection of system notification IDs to notify when runs of this job + // begin or complete. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *JobSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSettings_SdkV2) { +} + +func (newState *JobSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobSettings_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "continuous": reflect.TypeOf(Continuous_SdkV2{}), + "deployment": reflect.TypeOf(JobDeployment_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "environment": reflect.TypeOf(JobEnvironment_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "job_cluster": reflect.TypeOf(JobCluster_SdkV2{}), + "notification_settings": reflect.TypeOf(JobNotificationSettings_SdkV2{}), + "parameter": reflect.TypeOf(JobParameterDefinition_SdkV2{}), + "queue": reflect.TypeOf(QueueSettings_SdkV2{}), + "run_as": reflect.TypeOf(JobRunAs_SdkV2{}), + "schedule": reflect.TypeOf(CronSchedule_SdkV2{}), + "tags": reflect.TypeOf(types.String{}), + "task": reflect.TypeOf(Task_SdkV2{}), + "trigger": reflect.TypeOf(TriggerSettings_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, JobSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget_policy_id": o.BudgetPolicyId, + "continuous": o.Continuous, + "deployment": o.Deployment, + "description": o.Description, + "edit_mode": o.EditMode, + "email_notifications": o.EmailNotifications, + "environment": o.Environments, + "format": o.Format, + "git_source": o.GitSource, + "health": o.Health, + "job_cluster": o.JobClusters, + "max_concurrent_runs": o.MaxConcurrentRuns, + "name": o.Name, + "notification_settings": o.NotificationSettings, + "parameter": o.Parameters, + "queue": o.Queue, + "run_as": o.RunAs, + "schedule": o.Schedule, + "tags": o.Tags, + "task": o.Tasks, + "timeout_seconds": o.TimeoutSeconds, + "trigger": o.Trigger, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget_policy_id": types.StringType, + "continuous": basetypes.ListType{ + ElemType: Continuous{}.Type(ctx), + }, + "deployment": basetypes.ListType{ + ElemType: JobDeployment{}.Type(ctx), + }, + "description": types.StringType, + "edit_mode": types.StringType, + "email_notifications": basetypes.ListType{ + ElemType: JobEmailNotifications{}.Type(ctx), + }, + "environment": basetypes.ListType{ + ElemType: JobEnvironment{}.Type(ctx), + }, + "format": types.StringType, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "health": basetypes.ListType{ + ElemType: JobsHealthRules{}.Type(ctx), + }, + "job_cluster": basetypes.ListType{ + ElemType: JobCluster{}.Type(ctx), + }, + "max_concurrent_runs": types.Int64Type, + "name": types.StringType, + "notification_settings": basetypes.ListType{ + ElemType: JobNotificationSettings{}.Type(ctx), + }, + "parameter": basetypes.ListType{ + ElemType: JobParameterDefinition{}.Type(ctx), + }, + "queue": basetypes.ListType{ + ElemType: QueueSettings{}.Type(ctx), + }, + "run_as": basetypes.ListType{ + ElemType: JobRunAs{}.Type(ctx), + }, + "schedule": basetypes.ListType{ + ElemType: CronSchedule{}.Type(ctx), + }, + "tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "task": basetypes.ListType{ + ElemType: Task{}.Type(ctx), + }, + "timeout_seconds": types.Int64Type, + "trigger": basetypes.ListType{ + ElemType: TriggerSettings{}.Type(ctx), + }, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetContinuous returns the value of the Continuous field in JobSettings_SdkV2 as +// a Continuous_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetContinuous(ctx context.Context) (Continuous_SdkV2, bool) { + var e Continuous_SdkV2 + if o.Continuous.IsNull() || o.Continuous.IsUnknown() { + return e, false + } + var v []Continuous_SdkV2 + d := o.Continuous.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetContinuous sets the value of the Continuous field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetContinuous(ctx context.Context, v Continuous_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous"] + o.Continuous = types.ListValueMust(t, vs) +} + +// GetDeployment returns the value of the Deployment field in JobSettings_SdkV2 as +// a JobDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetDeployment(ctx context.Context) (JobDeployment_SdkV2, bool) { + var e JobDeployment_SdkV2 + if o.Deployment.IsNull() || o.Deployment.IsUnknown() { + return e, false + } + var v []JobDeployment_SdkV2 + d := o.Deployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeployment sets the value of the Deployment field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetDeployment(ctx context.Context, v JobDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] + o.Deployment = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in JobSettings_SdkV2 as +// a JobEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetEmailNotifications(ctx context.Context) (JobEmailNotifications_SdkV2, bool) { + var e JobEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []JobEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetEmailNotifications(ctx context.Context, v JobEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetEnvironments returns the value of the Environments field in JobSettings_SdkV2 as +// a slice of JobEnvironment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetEnvironments(ctx context.Context) ([]JobEnvironment_SdkV2, bool) { + if o.Environments.IsNull() || o.Environments.IsUnknown() { + return nil, false + } + var v []JobEnvironment_SdkV2 + d := o.Environments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironments sets the value of the Environments field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetEnvironments(ctx context.Context, v []JobEnvironment_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["environment"] + t = t.(attr.TypeWithElementType).ElementType() + o.Environments = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in JobSettings_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in JobSettings_SdkV2 as +// a JobsHealthRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetHealth(ctx context.Context) (JobsHealthRules_SdkV2, bool) { + var e JobsHealthRules_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []JobsHealthRules_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetHealth(ctx context.Context, v JobsHealthRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetJobClusters returns the value of the JobClusters field in JobSettings_SdkV2 as +// a slice of JobCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetJobClusters(ctx context.Context) ([]JobCluster_SdkV2, bool) { + if o.JobClusters.IsNull() || o.JobClusters.IsUnknown() { + return nil, false + } + var v []JobCluster_SdkV2 + d := o.JobClusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobClusters sets the value of the JobClusters field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetJobClusters(ctx context.Context, v []JobCluster_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["job_cluster"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobClusters = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in JobSettings_SdkV2 as +// a JobNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetNotificationSettings(ctx context.Context) (JobNotificationSettings_SdkV2, bool) { + var e JobNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []JobNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetNotificationSettings(ctx context.Context, v JobNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in JobSettings_SdkV2 as +// a slice of JobParameterDefinition_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetParameters(ctx context.Context) ([]JobParameterDefinition_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []JobParameterDefinition_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetParameters(ctx context.Context, v []JobParameterDefinition_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["parameter"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetQueue returns the value of the Queue field in JobSettings_SdkV2 as +// a QueueSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetQueue(ctx context.Context) (QueueSettings_SdkV2, bool) { + var e QueueSettings_SdkV2 + if o.Queue.IsNull() || o.Queue.IsUnknown() { + return e, false + } + var v []QueueSettings_SdkV2 + d := o.Queue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueue sets the value of the Queue field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetQueue(ctx context.Context, v QueueSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] + o.Queue = types.ListValueMust(t, vs) +} + +// GetRunAs returns the value of the RunAs field in JobSettings_SdkV2 as +// a JobRunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetRunAs(ctx context.Context) (JobRunAs_SdkV2, bool) { + var e JobRunAs_SdkV2 + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []JobRunAs_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 JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetRunAs(ctx context.Context, v JobRunAs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] + o.RunAs = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in JobSettings_SdkV2 as +// a CronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetSchedule(ctx context.Context) (CronSchedule_SdkV2, bool) { + var e CronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []CronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetSchedule(ctx context.Context, v CronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in JobSettings_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 *JobSettings_SdkV2) GetTags(ctx context.Context) (map[string]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.MapValueMust(t, vs) +} + +// GetTasks returns the value of the Tasks field in JobSettings_SdkV2 as +// a slice of Task_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetTasks(ctx context.Context) ([]Task_SdkV2, bool) { + if o.Tasks.IsNull() || o.Tasks.IsUnknown() { + return nil, false + } + var v []Task_SdkV2 + d := o.Tasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTasks sets the value of the Tasks field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetTasks(ctx context.Context, v []Task_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["task"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tasks = types.ListValueMust(t, vs) +} + +// GetTrigger returns the value of the Trigger field in JobSettings_SdkV2 as +// a TriggerSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetTrigger(ctx context.Context) (TriggerSettings_SdkV2, bool) { + var e TriggerSettings_SdkV2 + if o.Trigger.IsNull() || o.Trigger.IsUnknown() { + return e, false + } + var v []TriggerSettings_SdkV2 + d := o.Trigger.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrigger sets the value of the Trigger field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetTrigger(ctx context.Context, v TriggerSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] + o.Trigger = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in JobSettings_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *JobSettings_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in JobSettings_SdkV2. +func (o *JobSettings_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +// The source of the job specification in the remote repository when the job is +// source controlled. +type JobSource_SdkV2 struct { + // Dirty state indicates the job is not fully synced with the job + // specification in the remote repository. + // + // Possible values are: * `NOT_SYNCED`: The job is not yet synced with the + // remote job specification. Import the remote job specification from UI to + // make the job fully synced. * `DISCONNECTED`: The job is temporary + // disconnected from the remote job specification and is allowed for live + // edit. Import the remote job specification again from UI to make the job + // fully synced. + DirtyState types.String `tfsdk:"dirty_state" tf:"optional"` + // Name of the branch which the job is imported from. + ImportFromGitBranch types.String `tfsdk:"import_from_git_branch" tf:""` + // Path of the job YAML file that contains the job specification. + JobConfigPath types.String `tfsdk:"job_config_path" tf:""` +} + +func (newState *JobSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSource_SdkV2) { +} + +func (newState *JobSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSource_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSource. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobSource_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, JobSource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobSource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dirty_state": o.DirtyState, + "import_from_git_branch": o.ImportFromGitBranch, + "job_config_path": o.JobConfigPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobSource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dirty_state": types.StringType, + "import_from_git_branch": types.StringType, + "job_config_path": types.StringType, + }, + } +} + +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 Private + // Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset + // lag across all streams. This metric is in Private Preview. * + // `STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay + // across all streams. This metric is in Private Preview. * + // `STREAMING_BACKLOG_FILES`: An estimate of the maximum number of + // outstanding files across all streams. This metric is in Private Preview. + Metric types.String `tfsdk:"metric" tf:""` + // Specifies the operator used to compare the health metric value with the + // specified threshold. + Op types.String `tfsdk:"op" tf:""` + // Specifies the threshold value that the health metric should obey to + // satisfy the health rule. + Value types.Int64 `tfsdk:"value" tf:""` +} + +func (newState *JobsHealthRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobsHealthRule_SdkV2) { +} + +func (newState *JobsHealthRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobsHealthRule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobsHealthRule_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, JobsHealthRule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobsHealthRule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metric": o.Metric, + "op": o.Op, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobsHealthRule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metric": types.StringType, + "op": types.StringType, + "value": types.Int64Type, + }, + } +} + +// An optional set of health rules that can be defined for this job. +type JobsHealthRules_SdkV2 struct { + Rules types.List `tfsdk:"rules" tf:"optional"` +} + +func (newState *JobsHealthRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobsHealthRules_SdkV2) { +} + +func (newState *JobsHealthRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobsHealthRules_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobsHealthRules. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobsHealthRules_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "rules": reflect.TypeOf(JobsHealthRule_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, JobsHealthRules_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobsHealthRules_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "rules": o.Rules, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobsHealthRules_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "rules": basetypes.ListType{ + ElemType: JobsHealthRule{}.Type(ctx), + }, + }, + } +} + +// GetRules returns the value of the Rules field in JobsHealthRules_SdkV2 as +// a slice of JobsHealthRule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *JobsHealthRules_SdkV2) GetRules(ctx context.Context) ([]JobsHealthRule_SdkV2, bool) { + if o.Rules.IsNull() || o.Rules.IsUnknown() { + return nil, false + } + var v []JobsHealthRule_SdkV2 + d := o.Rules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRules sets the value of the Rules field in JobsHealthRules_SdkV2. +func (o *JobsHealthRules_SdkV2) SetRules(ctx context.Context, v []JobsHealthRule_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["rules"] + t = t.(attr.TypeWithElementType).ElementType() + o.Rules = types.ListValueMust(t, vs) +} + +type ListJobComplianceForPolicyResponse_SdkV2 struct { + // A list of jobs and their policy compliance statuses. + Jobs types.List `tfsdk:"jobs" tf:"optional"` + // This field represents the pagination token to retrieve the next page of + // results. If this field is not in the response, it means no further + // results for the request. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // This field represents the pagination token to retrieve the previous page + // of results. If this field is not in the response, it means no further + // results for the request. + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` +} + +func (newState *ListJobComplianceForPolicyResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceForPolicyResponse_SdkV2) { +} + +func (newState *ListJobComplianceForPolicyResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceForPolicyResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceForPolicyResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListJobComplianceForPolicyResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "jobs": reflect.TypeOf(JobCompliance_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, ListJobComplianceForPolicyResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListJobComplianceForPolicyResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "jobs": o.Jobs, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListJobComplianceForPolicyResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "jobs": basetypes.ListType{ + ElemType: JobCompliance{}.Type(ctx), + }, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + }, + } +} + +// GetJobs returns the value of the Jobs field in ListJobComplianceForPolicyResponse_SdkV2 as +// a slice of JobCompliance_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListJobComplianceForPolicyResponse_SdkV2) GetJobs(ctx context.Context) ([]JobCompliance_SdkV2, bool) { + if o.Jobs.IsNull() || o.Jobs.IsUnknown() { + return nil, false + } + var v []JobCompliance_SdkV2 + d := o.Jobs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobs sets the value of the Jobs field in ListJobComplianceForPolicyResponse_SdkV2. +func (o *ListJobComplianceForPolicyResponse_SdkV2) SetJobs(ctx context.Context, v []JobCompliance_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["jobs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Jobs = types.ListValueMust(t, vs) +} + +// List job policy compliance +type ListJobComplianceRequest_SdkV2 struct { + // Use this field to specify the maximum number of results to be returned by + // the server. The server may further constrain the maximum number of + // results returned in a single page. + PageSize types.Int64 `tfsdk:"-"` + // A page token that can be used to navigate to the next page or previous + // page as returned by `next_page_token` or `prev_page_token`. + PageToken types.String `tfsdk:"-"` + // Canonical unique identifier for the cluster policy. + PolicyId types.String `tfsdk:"-"` +} + +func (newState *ListJobComplianceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobComplianceRequest_SdkV2) { +} + +func (newState *ListJobComplianceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobComplianceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobComplianceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListJobComplianceRequest_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, ListJobComplianceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListJobComplianceRequest_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, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListJobComplianceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "policy_id": types.StringType, + }, + } +} + +// List jobs +type ListJobsRequest_SdkV2 struct { + // Whether to include task and cluster details in the response. + ExpandTasks types.Bool `tfsdk:"-"` + // The number of jobs to return. This value must be greater than 0 and less + // or equal to 100. The default value is 20. + Limit types.Int64 `tfsdk:"-"` + // A filter on the list based on the exact (case insensitive) job name. + Name types.String `tfsdk:"-"` + // The offset of the first job to return, relative to the most recently + // created job. Deprecated since June 2023. Use `page_token` to iterate + // through the pages instead. + Offset types.Int64 `tfsdk:"-"` + // Use `next_page_token` or `prev_page_token` returned from the previous + // request to list the next or previous page of jobs respectively. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListJobsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsRequest_SdkV2) { +} + +func (newState *ListJobsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListJobsRequest_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, ListJobsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListJobsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "expand_tasks": o.ExpandTasks, + "limit": o.Limit, + "name": o.Name, + "offset": o.Offset, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListJobsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "expand_tasks": types.BoolType, + "limit": types.Int64Type, + "name": types.StringType, + "offset": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// List of jobs was retrieved successfully. +type ListJobsResponse_SdkV2 struct { + // If true, additional jobs matching the provided filter are available for + // listing. + HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + // The list of jobs. Only included in the response if there are jobs to + // list. + Jobs types.List `tfsdk:"jobs" tf:"optional"` + // A token that can be used to list the next page of jobs (if applicable). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // A token that can be used to list the previous page of jobs (if + // applicable). + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` +} + +func (newState *ListJobsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListJobsResponse_SdkV2) { +} + +func (newState *ListJobsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListJobsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListJobsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListJobsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "jobs": reflect.TypeOf(BaseJob_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, ListJobsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListJobsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "has_more": o.HasMore, + "jobs": o.Jobs, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListJobsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "has_more": types.BoolType, + "jobs": basetypes.ListType{ + ElemType: BaseJob{}.Type(ctx), + }, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + }, + } +} + +// GetJobs returns the value of the Jobs field in ListJobsResponse_SdkV2 as +// a slice of BaseJob_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListJobsResponse_SdkV2) GetJobs(ctx context.Context) ([]BaseJob_SdkV2, bool) { + if o.Jobs.IsNull() || o.Jobs.IsUnknown() { + return nil, false + } + var v []BaseJob_SdkV2 + d := o.Jobs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobs sets the value of the Jobs field in ListJobsResponse_SdkV2. +func (o *ListJobsResponse_SdkV2) SetJobs(ctx context.Context, v []BaseJob_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["jobs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Jobs = types.ListValueMust(t, vs) +} + +// List job runs +type ListRunsRequest_SdkV2 struct { + // If active_only is `true`, only active runs are included in the results; + // otherwise, lists both active and completed runs. An active run is a run + // in the `QUEUED`, `PENDING`, `RUNNING`, or `TERMINATING`. This field + // cannot be `true` when completed_only is `true`. + ActiveOnly types.Bool `tfsdk:"-"` + // If completed_only is `true`, only completed runs are included in the + // results; otherwise, lists both active and completed runs. This field + // cannot be `true` when active_only is `true`. + CompletedOnly types.Bool `tfsdk:"-"` + // Whether to include task and cluster details in the response. + ExpandTasks types.Bool `tfsdk:"-"` + // The job for which to list runs. If omitted, the Jobs service lists runs + // from all jobs. + JobId types.Int64 `tfsdk:"-"` + // The number of runs to return. This value must be greater than 0 and less + // than 25. The default value is 20. If a request specifies a limit of 0, + // the service instead uses the maximum limit. + Limit types.Int64 `tfsdk:"-"` + // The offset of the first run to return, relative to the most recent run. + // Deprecated since June 2023. Use `page_token` to iterate through the pages + // instead. + Offset types.Int64 `tfsdk:"-"` + // Use `next_page_token` or `prev_page_token` returned from the previous + // request to list the next or previous page of runs respectively. + PageToken types.String `tfsdk:"-"` + // The type of runs to return. For a description of run types, see + // :method:jobs/getRun. + RunType types.String `tfsdk:"-"` + // Show runs that started _at or after_ this value. The value must be a UTC + // timestamp in milliseconds. Can be combined with _start_time_to_ to filter + // by a time range. + StartTimeFrom types.Int64 `tfsdk:"-"` + // Show runs that started _at or before_ this value. The value must be a UTC + // timestamp in milliseconds. Can be combined with _start_time_from_ to + // filter by a time range. + StartTimeTo types.Int64 `tfsdk:"-"` +} + +func (newState *ListRunsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsRequest_SdkV2) { +} + +func (newState *ListRunsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRunsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRunsRequest_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, ListRunsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRunsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "active_only": o.ActiveOnly, + "completed_only": o.CompletedOnly, + "expand_tasks": o.ExpandTasks, + "job_id": o.JobId, + "limit": o.Limit, + "offset": o.Offset, + "page_token": o.PageToken, + "run_type": o.RunType, + "start_time_from": o.StartTimeFrom, + "start_time_to": o.StartTimeTo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRunsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "active_only": types.BoolType, + "completed_only": types.BoolType, + "expand_tasks": types.BoolType, + "job_id": types.Int64Type, + "limit": types.Int64Type, + "offset": types.Int64Type, + "page_token": types.StringType, + "run_type": types.StringType, + "start_time_from": types.Int64Type, + "start_time_to": types.Int64Type, + }, + } +} + +// List of runs was retrieved successfully. +type ListRunsResponse_SdkV2 struct { + // If true, additional runs matching the provided filter are available for + // listing. + HasMore types.Bool `tfsdk:"has_more" tf:"optional"` + // A token that can be used to list the next page of runs (if applicable). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // A token that can be used to list the previous page of runs (if + // applicable). + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + // A list of runs, from most recently started to least. Only included in the + // response if there are runs to list. + Runs types.List `tfsdk:"runs" tf:"optional"` +} + +func (newState *ListRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRunsResponse_SdkV2) { +} + +func (newState *ListRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRunsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "runs": reflect.TypeOf(BaseRun_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, ListRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRunsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "has_more": o.HasMore, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + "runs": o.Runs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "has_more": types.BoolType, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + "runs": basetypes.ListType{ + ElemType: BaseRun{}.Type(ctx), + }, + }, + } +} + +// GetRuns returns the value of the Runs field in ListRunsResponse_SdkV2 as +// a slice of BaseRun_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListRunsResponse_SdkV2) GetRuns(ctx context.Context) ([]BaseRun_SdkV2, bool) { + if o.Runs.IsNull() || o.Runs.IsUnknown() { + return nil, false + } + var v []BaseRun_SdkV2 + d := o.Runs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRuns sets the value of the Runs field in ListRunsResponse_SdkV2. +func (o *ListRunsResponse_SdkV2) SetRuns(ctx context.Context, v []BaseRun_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["runs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Runs = types.ListValueMust(t, vs) +} + +type NotebookOutput_SdkV2 struct { + // The value passed to + // [dbutils.notebook.exit()](/notebooks/notebook-workflows.html#notebook-workflows-exit). + // Databricks restricts this API to return the first 5 MB of the value. For + // a larger result, your job can store the results in a cloud storage + // service. This field is absent if `dbutils.notebook.exit()` was never + // called. + Result types.String `tfsdk:"result" tf:"optional"` + // Whether or not the result was truncated. + Truncated types.Bool `tfsdk:"truncated" tf:"optional"` +} + +func (newState *NotebookOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookOutput_SdkV2) { +} + +func (newState *NotebookOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NotebookOutput_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, NotebookOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NotebookOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "result": o.Result, + "truncated": o.Truncated, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NotebookOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "result": types.StringType, + "truncated": types.BoolType, + }, + } +} + +type NotebookTask_SdkV2 struct { + // Base parameters to be used for each run of this job. If the run is + // initiated by a call to :method:jobs/run Now with parameters specified, + // the two parameters maps are merged. If the same key is specified in + // `base_parameters` and in `run-now`, the value from `run-now` is used. Use + // [Task parameter variables] to set parameters containing information about + // job runs. + // + // If the notebook takes a parameter that is not specified in the job’s + // `base_parameters` or the `run-now` override parameters, the default value + // from the notebook is used. + // + // Retrieve these parameters in a notebook using [dbutils.widgets.get]. + // + // The JSON representation of this field cannot exceed 1MB. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets + BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` + // The path of the notebook to be run in the Databricks workspace or remote + // repository. For notebooks stored in the Databricks workspace, the path + // must be absolute and begin with a slash. For notebooks stored in a remote + // repository, the path must be relative. This field is required. + NotebookPath types.String `tfsdk:"notebook_path" tf:""` + // Optional location type of the notebook. When set to `WORKSPACE`, the + // notebook will be retrieved from the local Databricks workspace. When set + // to `GIT`, the notebook will be retrieved from a Git repository defined in + // `git_source`. If the value is empty, the task will use `GIT` if + // `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: + // Notebook is located in Databricks workspace. * `GIT`: Notebook is located + // in cloud Git provider. + Source types.String `tfsdk:"source" tf:"optional"` + // Optional `warehouse_id` to run the notebook on a SQL warehouse. Classic + // SQL warehouses are NOT supported, please use serverless or pro SQL + // warehouses. + // + // Note that SQL warehouses only support SQL cells; if the notebook contains + // non-SQL cells, the run will fail. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *NotebookTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookTask_SdkV2) { +} + +func (newState *NotebookTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NotebookTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "base_parameters": 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, NotebookTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NotebookTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "base_parameters": o.BaseParameters, + "notebook_path": o.NotebookPath, + "source": o.Source, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NotebookTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "base_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "notebook_path": types.StringType, + "source": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetBaseParameters returns the value of the BaseParameters field in NotebookTask_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 *NotebookTask_SdkV2) GetBaseParameters(ctx context.Context) (map[string]types.String, bool) { + if o.BaseParameters.IsNull() || o.BaseParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.BaseParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetBaseParameters sets the value of the BaseParameters field in NotebookTask_SdkV2. +func (o *NotebookTask_SdkV2) SetBaseParameters(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["base_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.BaseParameters = types.MapValueMust(t, vs) +} + +type PeriodicTriggerConfiguration_SdkV2 struct { + // The interval at which the trigger should run. + Interval types.Int64 `tfsdk:"interval" tf:""` + // The unit of time for the interval. + Unit types.String `tfsdk:"unit" tf:""` +} + +func (newState *PeriodicTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PeriodicTriggerConfiguration_SdkV2) { +} + +func (newState *PeriodicTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState PeriodicTriggerConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PeriodicTriggerConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PeriodicTriggerConfiguration_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, PeriodicTriggerConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PeriodicTriggerConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "interval": o.Interval, + "unit": o.Unit, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PeriodicTriggerConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "interval": types.Int64Type, + "unit": types.StringType, + }, + } +} + +type PipelineParams_SdkV2 struct { + // If true, triggers a full refresh on the delta live table. + FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` +} + +func (newState *PipelineParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineParams_SdkV2) { +} + +func (newState *PipelineParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineParams_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineParams. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineParams_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, PipelineParams_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineParams_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_refresh": o.FullRefresh, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineParams_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_refresh": types.BoolType, + }, + } +} + +type PipelineTask_SdkV2 struct { + // If true, triggers a full refresh on the delta live table. + FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + // The full name of the pipeline task to execute. + PipelineId types.String `tfsdk:"pipeline_id" tf:""` +} + +func (newState *PipelineTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineTask_SdkV2) { +} + +func (newState *PipelineTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineTask_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, PipelineTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "full_refresh": o.FullRefresh, + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "full_refresh": types.BoolType, + "pipeline_id": types.StringType, + }, + } +} + +type PythonWheelTask_SdkV2 struct { + // Named entry point to use, if it does not exist in the metadata of the + // package it executes the function from the package directly using + // `$packageName.$entryPoint()` + EntryPoint types.String `tfsdk:"entry_point" tf:""` + // Command-line parameters passed to Python wheel task in the form of + // `["--name=task", "--data=dbfs:/path/to/data.json"]`. Leave it empty if + // `parameters` is not null. + NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + // Name of the package to execute + PackageName types.String `tfsdk:"package_name" tf:""` + // Command-line parameters passed to Python wheel task. Leave it empty if + // `named_parameters` is not null. + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *PythonWheelTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PythonWheelTask_SdkV2) { +} + +func (newState *PythonWheelTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState PythonWheelTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PythonWheelTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PythonWheelTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "named_parameters": reflect.TypeOf(types.String{}), + "parameters": 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, PythonWheelTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PythonWheelTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "entry_point": o.EntryPoint, + "named_parameters": o.NamedParameters, + "package_name": o.PackageName, + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PythonWheelTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "entry_point": types.StringType, + "named_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "package_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetNamedParameters returns the value of the NamedParameters field in PythonWheelTask_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 *PythonWheelTask_SdkV2) GetNamedParameters(ctx context.Context) (map[string]types.String, bool) { + if o.NamedParameters.IsNull() || o.NamedParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NamedParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNamedParameters sets the value of the NamedParameters field in PythonWheelTask_SdkV2. +func (o *PythonWheelTask_SdkV2) SetNamedParameters(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["named_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.NamedParameters = types.MapValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in PythonWheelTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PythonWheelTask_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in PythonWheelTask_SdkV2. +func (o *PythonWheelTask_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +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" tf:"optional"` + // A descriptive message with the queuing details. This field is + // unstructured, and its exact format is subject to change. + Message types.String `tfsdk:"message" tf:"optional"` +} + +func (newState *QueueDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueueDetails_SdkV2) { +} + +func (newState *QueueDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueueDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueueDetails_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, QueueDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueueDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "code": o.Code, + "message": o.Message, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueueDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "code": types.StringType, + "message": types.StringType, + }, + } +} + +type QueueSettings_SdkV2 struct { + // If true, enable queueing for the job. This is a required field. + Enabled types.Bool `tfsdk:"enabled" tf:""` +} + +func (newState *QueueSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueueSettings_SdkV2) { +} + +func (newState *QueueSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueueSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueueSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueueSettings_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, QueueSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueueSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueueSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + }, + } +} + +type RepairHistoryItem_SdkV2 struct { + // The end time of the (repaired) run. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The ID of the repair. Only returned for the items that represent a repair + // in `repair_history`. + Id types.Int64 `tfsdk:"id" tf:"optional"` + // The start time of the (repaired) run. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Deprecated. Please use the `status` field instead. + State types.List `tfsdk:"state" tf:"optional,object"` + // The current status of the run + Status types.List `tfsdk:"status" tf:"optional,object"` + // The run IDs of the task runs that ran as part of this repair history + // item. + TaskRunIds types.List `tfsdk:"task_run_ids" tf:"optional"` + // The repair history item type. Indicates whether a run is the original run + // or a repair run. + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *RepairHistoryItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairHistoryItem_SdkV2) { +} + +func (newState *RepairHistoryItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairHistoryItem_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairHistoryItem. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepairHistoryItem_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "state": reflect.TypeOf(RunState_SdkV2{}), + "status": reflect.TypeOf(RunStatus_SdkV2{}), + "task_run_ids": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, RepairHistoryItem_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepairHistoryItem_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_time": o.EndTime, + "id": o.Id, + "start_time": o.StartTime, + "state": o.State, + "status": o.Status, + "task_run_ids": o.TaskRunIds, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepairHistoryItem_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_time": types.Int64Type, + "id": types.Int64Type, + "start_time": types.Int64Type, + "state": basetypes.ListType{ + ElemType: RunState{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: RunStatus{}.Type(ctx), + }, + "task_run_ids": basetypes.ListType{ + ElemType: types.Int64Type, + }, + "type": types.StringType, + }, + } +} + +// GetState returns the value of the State field in RepairHistoryItem_SdkV2 as +// a RunState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairHistoryItem_SdkV2) GetState(ctx context.Context) (RunState_SdkV2, bool) { + var e RunState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []RunState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in RepairHistoryItem_SdkV2. +func (o *RepairHistoryItem_SdkV2) SetState(ctx context.Context, v RunState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in RepairHistoryItem_SdkV2 as +// a RunStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairHistoryItem_SdkV2) GetStatus(ctx context.Context) (RunStatus_SdkV2, bool) { + var e RunStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []RunStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in RepairHistoryItem_SdkV2. +func (o *RepairHistoryItem_SdkV2) SetStatus(ctx context.Context, v RunStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// GetTaskRunIds returns the value of the TaskRunIds field in RepairHistoryItem_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairHistoryItem_SdkV2) GetTaskRunIds(ctx context.Context) ([]types.Int64, bool) { + if o.TaskRunIds.IsNull() || o.TaskRunIds.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.TaskRunIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTaskRunIds sets the value of the TaskRunIds field in RepairHistoryItem_SdkV2. +func (o *RepairHistoryItem_SdkV2) SetTaskRunIds(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task_run_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.TaskRunIds = types.ListValueMust(t, vs) +} + +type RepairRun_SdkV2 struct { + // An array of commands to execute for jobs with the dbt task, for example + // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt + // run"]` + DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + // A list of parameters for jobs with Spark JAR tasks, for example + // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the + // main function of the main class specified in the Spark JAR task. If not + // specified upon `run-now`, it defaults to an empty list. jar_params cannot + // be specified in conjunction with notebook_params. The JSON representation + // of this field (for example `{"jar_params":["john doe","35"]}`) cannot + // exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + JarParams types.List `tfsdk:"jar_params" tf:"optional"` + // Job-level parameters used in the run. for example `"param": + // "overriding_val"` + JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + // The ID of the latest repair. This parameter is not required when + // repairing a run for the first time, but must be provided on subsequent + // requests to repair the same run. + LatestRepairId types.Int64 `tfsdk:"latest_repair_id" tf:"optional"` + // A map from keys to values for jobs with notebook task, for example + // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed + // to the notebook and is accessible through the [dbutils.widgets.get] + // function. + // + // If not specified upon `run-now`, the triggered run uses the job’s base + // parameters. + // + // notebook_params cannot be specified in conjunction with jar_params. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // The JSON representation of this field (for example + // `{"notebook_params":{"name":"john doe","age":"35"}}`) cannot exceed + // 10,000 bytes. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html + NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + // Controls whether the pipeline should perform a full refresh + PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + // A list of parameters for jobs with Python tasks, for example + // `"python_params": ["john doe", "35"]`. The parameters are passed to + // Python file as command-line parameters. If specified upon `run-now`, it + // would overwrite the parameters specified in job setting. The JSON + // representation of this field (for example `{"python_params":["john + // doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + PythonParams types.List `tfsdk:"python_params" tf:"optional"` + // If true, repair all failed tasks. Only one of `rerun_tasks` or + // `rerun_all_failed_tasks` can be used. + RerunAllFailedTasks types.Bool `tfsdk:"rerun_all_failed_tasks" tf:"optional"` + // If true, repair all tasks that depend on the tasks in `rerun_tasks`, even + // if they were previously successful. Can be also used in combination with + // `rerun_all_failed_tasks`. + RerunDependentTasks types.Bool `tfsdk:"rerun_dependent_tasks" tf:"optional"` + // The task keys of the task runs to repair. + RerunTasks types.List `tfsdk:"rerun_tasks" tf:"optional"` + // The job run ID of the run to repair. The run must not be in progress. + RunId types.Int64 `tfsdk:"run_id" tf:""` + // A list of parameters for jobs with spark submit task, for example + // `"spark_submit_params": ["--class", + // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to + // spark-submit script as command-line parameters. If specified upon + // `run-now`, it would overwrite the parameters specified in job setting. + // The JSON representation of this field (for example + // `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + // A map from keys to values for jobs with SQL task, for example + // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task + // does not support custom parameters. + SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` +} + +func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRun_SdkV2) { +} + +func (newState *RepairRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepairRun_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbt_commands": reflect.TypeOf(types.String{}), + "jar_params": reflect.TypeOf(types.String{}), + "job_parameters": reflect.TypeOf(types.String{}), + "notebook_params": reflect.TypeOf(types.String{}), + "pipeline_params": reflect.TypeOf(PipelineParams_SdkV2{}), + "python_named_params": reflect.TypeOf(types.String{}), + "python_params": reflect.TypeOf(types.String{}), + "rerun_tasks": reflect.TypeOf(types.String{}), + "spark_submit_params": reflect.TypeOf(types.String{}), + "sql_params": 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, RepairRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepairRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbt_commands": o.DbtCommands, + "jar_params": o.JarParams, + "job_parameters": o.JobParameters, + "latest_repair_id": o.LatestRepairId, + "notebook_params": o.NotebookParams, + "pipeline_params": o.PipelineParams, + "python_named_params": o.PythonNamedParams, + "python_params": o.PythonParams, + "rerun_all_failed_tasks": o.RerunAllFailedTasks, + "rerun_dependent_tasks": o.RerunDependentTasks, + "rerun_tasks": o.RerunTasks, + "run_id": o.RunId, + "spark_submit_params": o.SparkSubmitParams, + "sql_params": o.SqlParams, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepairRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbt_commands": basetypes.ListType{ + ElemType: types.StringType, + }, + "jar_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "job_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "latest_repair_id": types.Int64Type, + "notebook_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "pipeline_params": basetypes.ListType{ + ElemType: PipelineParams{}.Type(ctx), + }, + "python_named_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "python_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "rerun_all_failed_tasks": types.BoolType, + "rerun_dependent_tasks": types.BoolType, + "rerun_tasks": basetypes.ListType{ + ElemType: types.StringType, + }, + "run_id": types.Int64Type, + "spark_submit_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "sql_params": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDbtCommands returns the value of the DbtCommands field in RepairRun_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetDbtCommands(ctx context.Context) ([]types.String, bool) { + if o.DbtCommands.IsNull() || o.DbtCommands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DbtCommands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDbtCommands sets the value of the DbtCommands field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetDbtCommands(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["dbt_commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.DbtCommands = types.ListValueMust(t, vs) +} + +// GetJarParams returns the value of the JarParams field in RepairRun_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetJarParams(ctx context.Context) ([]types.String, bool) { + if o.JarParams.IsNull() || o.JarParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.JarParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJarParams sets the value of the JarParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetJarParams(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["jar_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.JarParams = types.ListValueMust(t, vs) +} + +// GetJobParameters returns the value of the JobParameters field in RepairRun_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 *RepairRun_SdkV2) GetJobParameters(ctx context.Context) (map[string]types.String, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetJobParameters(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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.MapValueMust(t, vs) +} + +// GetNotebookParams returns the value of the NotebookParams field in RepairRun_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 *RepairRun_SdkV2) GetNotebookParams(ctx context.Context) (map[string]types.String, bool) { + if o.NotebookParams.IsNull() || o.NotebookParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NotebookParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotebookParams sets the value of the NotebookParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetNotebookParams(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["notebook_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.NotebookParams = types.MapValueMust(t, vs) +} + +// GetPipelineParams returns the value of the PipelineParams field in RepairRun_SdkV2 as +// a PipelineParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetPipelineParams(ctx context.Context) (PipelineParams_SdkV2, bool) { + var e PipelineParams_SdkV2 + if o.PipelineParams.IsNull() || o.PipelineParams.IsUnknown() { + return e, false + } + var v []PipelineParams_SdkV2 + d := o.PipelineParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineParams sets the value of the PipelineParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetPipelineParams(ctx context.Context, v PipelineParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] + o.PipelineParams = types.ListValueMust(t, vs) +} + +// GetPythonNamedParams returns the value of the PythonNamedParams field in RepairRun_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 *RepairRun_SdkV2) GetPythonNamedParams(ctx context.Context) (map[string]types.String, bool) { + if o.PythonNamedParams.IsNull() || o.PythonNamedParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.PythonNamedParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonNamedParams sets the value of the PythonNamedParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetPythonNamedParams(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["python_named_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonNamedParams = types.MapValueMust(t, vs) +} + +// GetPythonParams returns the value of the PythonParams field in RepairRun_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetPythonParams(ctx context.Context) ([]types.String, bool) { + if o.PythonParams.IsNull() || o.PythonParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PythonParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonParams sets the value of the PythonParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetPythonParams(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["python_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonParams = types.ListValueMust(t, vs) +} + +// GetRerunTasks returns the value of the RerunTasks field in RepairRun_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetRerunTasks(ctx context.Context) ([]types.String, bool) { + if o.RerunTasks.IsNull() || o.RerunTasks.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RerunTasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRerunTasks sets the value of the RerunTasks field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetRerunTasks(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["rerun_tasks"] + t = t.(attr.TypeWithElementType).ElementType() + o.RerunTasks = types.ListValueMust(t, vs) +} + +// GetSparkSubmitParams returns the value of the SparkSubmitParams field in RepairRun_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepairRun_SdkV2) GetSparkSubmitParams(ctx context.Context) ([]types.String, bool) { + if o.SparkSubmitParams.IsNull() || o.SparkSubmitParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SparkSubmitParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkSubmitParams sets the value of the SparkSubmitParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetSparkSubmitParams(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["spark_submit_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkSubmitParams = types.ListValueMust(t, vs) +} + +// GetSqlParams returns the value of the SqlParams field in RepairRun_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 *RepairRun_SdkV2) GetSqlParams(ctx context.Context) (map[string]types.String, bool) { + if o.SqlParams.IsNull() || o.SqlParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SqlParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlParams sets the value of the SqlParams field in RepairRun_SdkV2. +func (o *RepairRun_SdkV2) SetSqlParams(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["sql_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlParams = types.MapValueMust(t, vs) +} + +// Run repair was initiated. +type RepairRunResponse_SdkV2 struct { + // The ID of the repair. Must be provided in subsequent repairs using the + // `latest_repair_id` field to ensure sequential repairs. + RepairId types.Int64 `tfsdk:"repair_id" tf:"optional"` +} + +func (newState *RepairRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepairRunResponse_SdkV2) { +} + +func (newState *RepairRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepairRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepairRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepairRunResponse_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, RepairRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepairRunResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repair_id": o.RepairId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepairRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repair_id": types.Int64Type, + }, + } +} + +type ResetJob_SdkV2 struct { + // The canonical identifier of the job to reset. This field is required. + JobId types.Int64 `tfsdk:"job_id" tf:""` + // The new settings of the job. These settings completely replace the old + // settings. + // + // Changes to the field `JobBaseSettings.timeout_seconds` are applied to + // active runs. Changes to other fields are applied to future runs only. + NewSettings types.List `tfsdk:"new_settings" tf:"object"` +} + +func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetJob_SdkV2) { +} + +func (newState *ResetJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResetJob_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResetJob_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "new_settings": reflect.TypeOf(JobSettings_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, ResetJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResetJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + "new_settings": o.NewSettings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResetJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.Int64Type, + "new_settings": basetypes.ListType{ + ElemType: JobSettings{}.Type(ctx), + }, + }, + } +} + +// GetNewSettings returns the value of the NewSettings field in ResetJob_SdkV2 as +// a JobSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResetJob_SdkV2) GetNewSettings(ctx context.Context) (JobSettings_SdkV2, bool) { + var e JobSettings_SdkV2 + if o.NewSettings.IsNull() || o.NewSettings.IsUnknown() { + return e, false + } + var v []JobSettings_SdkV2 + d := o.NewSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewSettings sets the value of the NewSettings field in ResetJob_SdkV2. +func (o *ResetJob_SdkV2) SetNewSettings(ctx context.Context, v JobSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_settings"] + o.NewSettings = types.ListValueMust(t, vs) +} + +type ResetResponse_SdkV2 struct { +} + +func (newState *ResetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetResponse_SdkV2) { +} + +func (newState *ResetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResetResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResetResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResetResponse_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, ResetResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResetResponse_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 ResetResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ResolvedConditionTaskValues_SdkV2 struct { + Left types.String `tfsdk:"left" tf:"optional"` + + Right types.String `tfsdk:"right" tf:"optional"` +} + +func (newState *ResolvedConditionTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedConditionTaskValues_SdkV2) { +} + +func (newState *ResolvedConditionTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedConditionTaskValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedConditionTaskValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedConditionTaskValues_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, ResolvedConditionTaskValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedConditionTaskValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "left": o.Left, + "right": o.Right, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedConditionTaskValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "left": types.StringType, + "right": types.StringType, + }, + } +} + +type ResolvedDbtTaskValues_SdkV2 struct { + Commands types.List `tfsdk:"commands" tf:"optional"` +} + +func (newState *ResolvedDbtTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedDbtTaskValues_SdkV2) { +} + +func (newState *ResolvedDbtTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedDbtTaskValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedDbtTaskValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedDbtTaskValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "commands": 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, ResolvedDbtTaskValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedDbtTaskValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "commands": o.Commands, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedDbtTaskValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "commands": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetCommands returns the value of the Commands field in ResolvedDbtTaskValues_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedDbtTaskValues_SdkV2) GetCommands(ctx context.Context) ([]types.String, bool) { + if o.Commands.IsNull() || o.Commands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Commands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCommands sets the value of the Commands field in ResolvedDbtTaskValues_SdkV2. +func (o *ResolvedDbtTaskValues_SdkV2) SetCommands(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["commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.Commands = types.ListValueMust(t, vs) +} + +type ResolvedNotebookTaskValues_SdkV2 struct { + BaseParameters types.Map `tfsdk:"base_parameters" tf:"optional"` +} + +func (newState *ResolvedNotebookTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedNotebookTaskValues_SdkV2) { +} + +func (newState *ResolvedNotebookTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedNotebookTaskValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedNotebookTaskValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedNotebookTaskValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "base_parameters": 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, ResolvedNotebookTaskValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedNotebookTaskValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "base_parameters": o.BaseParameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedNotebookTaskValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "base_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetBaseParameters returns the value of the BaseParameters field in ResolvedNotebookTaskValues_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 *ResolvedNotebookTaskValues_SdkV2) GetBaseParameters(ctx context.Context) (map[string]types.String, bool) { + if o.BaseParameters.IsNull() || o.BaseParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.BaseParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetBaseParameters sets the value of the BaseParameters field in ResolvedNotebookTaskValues_SdkV2. +func (o *ResolvedNotebookTaskValues_SdkV2) SetBaseParameters(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["base_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.BaseParameters = types.MapValueMust(t, vs) +} + +type ResolvedParamPairValues_SdkV2 struct { + Parameters types.Map `tfsdk:"parameters" tf:"optional"` +} + +func (newState *ResolvedParamPairValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedParamPairValues_SdkV2) { +} + +func (newState *ResolvedParamPairValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedParamPairValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedParamPairValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedParamPairValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, ResolvedParamPairValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedParamPairValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedParamPairValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetParameters returns the value of the Parameters field in ResolvedParamPairValues_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 *ResolvedParamPairValues_SdkV2) GetParameters(ctx context.Context) (map[string]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ResolvedParamPairValues_SdkV2. +func (o *ResolvedParamPairValues_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.MapValueMust(t, vs) +} + +type ResolvedPythonWheelTaskValues_SdkV2 struct { + NamedParameters types.Map `tfsdk:"named_parameters" tf:"optional"` + + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *ResolvedPythonWheelTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedPythonWheelTaskValues_SdkV2) { +} + +func (newState *ResolvedPythonWheelTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedPythonWheelTaskValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedPythonWheelTaskValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedPythonWheelTaskValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "named_parameters": reflect.TypeOf(types.String{}), + "parameters": 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, ResolvedPythonWheelTaskValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedPythonWheelTaskValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "named_parameters": o.NamedParameters, + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedPythonWheelTaskValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "named_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetNamedParameters returns the value of the NamedParameters field in ResolvedPythonWheelTaskValues_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 *ResolvedPythonWheelTaskValues_SdkV2) GetNamedParameters(ctx context.Context) (map[string]types.String, bool) { + if o.NamedParameters.IsNull() || o.NamedParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NamedParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNamedParameters sets the value of the NamedParameters field in ResolvedPythonWheelTaskValues_SdkV2. +func (o *ResolvedPythonWheelTaskValues_SdkV2) SetNamedParameters(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["named_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.NamedParameters = types.MapValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in ResolvedPythonWheelTaskValues_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedPythonWheelTaskValues_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ResolvedPythonWheelTaskValues_SdkV2. +func (o *ResolvedPythonWheelTaskValues_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type ResolvedRunJobTaskValues_SdkV2 struct { + JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + + Parameters types.Map `tfsdk:"parameters" tf:"optional"` +} + +func (newState *ResolvedRunJobTaskValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedRunJobTaskValues_SdkV2) { +} + +func (newState *ResolvedRunJobTaskValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedRunJobTaskValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedRunJobTaskValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedRunJobTaskValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "job_parameters": reflect.TypeOf(types.String{}), + "parameters": 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, ResolvedRunJobTaskValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedRunJobTaskValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_parameters": o.JobParameters, + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedRunJobTaskValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetJobParameters returns the value of the JobParameters field in ResolvedRunJobTaskValues_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 *ResolvedRunJobTaskValues_SdkV2) GetJobParameters(ctx context.Context) (map[string]types.String, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in ResolvedRunJobTaskValues_SdkV2. +func (o *ResolvedRunJobTaskValues_SdkV2) SetJobParameters(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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.MapValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in ResolvedRunJobTaskValues_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 *ResolvedRunJobTaskValues_SdkV2) GetParameters(ctx context.Context) (map[string]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ResolvedRunJobTaskValues_SdkV2. +func (o *ResolvedRunJobTaskValues_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.MapValueMust(t, vs) +} + +type ResolvedStringParamsValues_SdkV2 struct { + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *ResolvedStringParamsValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedStringParamsValues_SdkV2) { +} + +func (newState *ResolvedStringParamsValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedStringParamsValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedStringParamsValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedStringParamsValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, ResolvedStringParamsValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedStringParamsValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedStringParamsValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetParameters returns the value of the Parameters field in ResolvedStringParamsValues_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedStringParamsValues_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ResolvedStringParamsValues_SdkV2. +func (o *ResolvedStringParamsValues_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type ResolvedValues_SdkV2 struct { + ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + + DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + + NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + + RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + + SimulationTask types.List `tfsdk:"simulation_task" tf:"optional,object"` + + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + + SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` +} + +func (newState *ResolvedValues_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedValues_SdkV2) { +} + +func (newState *ResolvedValues_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResolvedValues_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResolvedValues. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResolvedValues_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition_task": reflect.TypeOf(ResolvedConditionTaskValues_SdkV2{}), + "dbt_task": reflect.TypeOf(ResolvedDbtTaskValues_SdkV2{}), + "notebook_task": reflect.TypeOf(ResolvedNotebookTaskValues_SdkV2{}), + "python_wheel_task": reflect.TypeOf(ResolvedPythonWheelTaskValues_SdkV2{}), + "run_job_task": reflect.TypeOf(ResolvedRunJobTaskValues_SdkV2{}), + "simulation_task": reflect.TypeOf(ResolvedParamPairValues_SdkV2{}), + "spark_jar_task": reflect.TypeOf(ResolvedStringParamsValues_SdkV2{}), + "spark_python_task": reflect.TypeOf(ResolvedStringParamsValues_SdkV2{}), + "spark_submit_task": reflect.TypeOf(ResolvedStringParamsValues_SdkV2{}), + "sql_task": reflect.TypeOf(ResolvedParamPairValues_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, ResolvedValues_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResolvedValues_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "notebook_task": o.NotebookTask, + "python_wheel_task": o.PythonWheelTask, + "run_job_task": o.RunJobTask, + "simulation_task": o.SimulationTask, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResolvedValues_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition_task": basetypes.ListType{ + ElemType: ResolvedConditionTaskValues{}.Type(ctx), + }, + "dbt_task": basetypes.ListType{ + ElemType: ResolvedDbtTaskValues{}.Type(ctx), + }, + "notebook_task": basetypes.ListType{ + ElemType: ResolvedNotebookTaskValues{}.Type(ctx), + }, + "python_wheel_task": basetypes.ListType{ + ElemType: ResolvedPythonWheelTaskValues{}.Type(ctx), + }, + "run_job_task": basetypes.ListType{ + ElemType: ResolvedRunJobTaskValues{}.Type(ctx), + }, + "simulation_task": basetypes.ListType{ + ElemType: ResolvedParamPairValues{}.Type(ctx), + }, + "spark_jar_task": basetypes.ListType{ + ElemType: ResolvedStringParamsValues{}.Type(ctx), + }, + "spark_python_task": basetypes.ListType{ + ElemType: ResolvedStringParamsValues{}.Type(ctx), + }, + "spark_submit_task": basetypes.ListType{ + ElemType: ResolvedStringParamsValues{}.Type(ctx), + }, + "sql_task": basetypes.ListType{ + ElemType: ResolvedParamPairValues{}.Type(ctx), + }, + }, + } +} + +// GetConditionTask returns the value of the ConditionTask field in ResolvedValues_SdkV2 as +// a ResolvedConditionTaskValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetConditionTask(ctx context.Context) (ResolvedConditionTaskValues_SdkV2, bool) { + var e ResolvedConditionTaskValues_SdkV2 + if o.ConditionTask.IsNull() || o.ConditionTask.IsUnknown() { + return e, false + } + var v []ResolvedConditionTaskValues_SdkV2 + d := o.ConditionTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConditionTask sets the value of the ConditionTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetConditionTask(ctx context.Context, v ResolvedConditionTaskValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] + o.ConditionTask = types.ListValueMust(t, vs) +} + +// GetDbtTask returns the value of the DbtTask field in ResolvedValues_SdkV2 as +// a ResolvedDbtTaskValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetDbtTask(ctx context.Context) (ResolvedDbtTaskValues_SdkV2, bool) { + var e ResolvedDbtTaskValues_SdkV2 + if o.DbtTask.IsNull() || o.DbtTask.IsUnknown() { + return e, false + } + var v []ResolvedDbtTaskValues_SdkV2 + d := o.DbtTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbtTask sets the value of the DbtTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetDbtTask(ctx context.Context, v ResolvedDbtTaskValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] + o.DbtTask = types.ListValueMust(t, vs) +} + +// GetNotebookTask returns the value of the NotebookTask field in ResolvedValues_SdkV2 as +// a ResolvedNotebookTaskValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetNotebookTask(ctx context.Context) (ResolvedNotebookTaskValues_SdkV2, bool) { + var e ResolvedNotebookTaskValues_SdkV2 + if o.NotebookTask.IsNull() || o.NotebookTask.IsUnknown() { + return e, false + } + var v []ResolvedNotebookTaskValues_SdkV2 + d := o.NotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookTask sets the value of the NotebookTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetNotebookTask(ctx context.Context, v ResolvedNotebookTaskValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] + o.NotebookTask = types.ListValueMust(t, vs) +} + +// GetPythonWheelTask returns the value of the PythonWheelTask field in ResolvedValues_SdkV2 as +// a ResolvedPythonWheelTaskValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetPythonWheelTask(ctx context.Context) (ResolvedPythonWheelTaskValues_SdkV2, bool) { + var e ResolvedPythonWheelTaskValues_SdkV2 + if o.PythonWheelTask.IsNull() || o.PythonWheelTask.IsUnknown() { + return e, false + } + var v []ResolvedPythonWheelTaskValues_SdkV2 + d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPythonWheelTask sets the value of the PythonWheelTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetPythonWheelTask(ctx context.Context, v ResolvedPythonWheelTaskValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] + o.PythonWheelTask = types.ListValueMust(t, vs) +} + +// GetRunJobTask returns the value of the RunJobTask field in ResolvedValues_SdkV2 as +// a ResolvedRunJobTaskValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetRunJobTask(ctx context.Context) (ResolvedRunJobTaskValues_SdkV2, bool) { + var e ResolvedRunJobTaskValues_SdkV2 + if o.RunJobTask.IsNull() || o.RunJobTask.IsUnknown() { + return e, false + } + var v []ResolvedRunJobTaskValues_SdkV2 + d := o.RunJobTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunJobTask sets the value of the RunJobTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetRunJobTask(ctx context.Context, v ResolvedRunJobTaskValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] + o.RunJobTask = types.ListValueMust(t, vs) +} + +// GetSimulationTask returns the value of the SimulationTask field in ResolvedValues_SdkV2 as +// a ResolvedParamPairValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetSimulationTask(ctx context.Context) (ResolvedParamPairValues_SdkV2, bool) { + var e ResolvedParamPairValues_SdkV2 + if o.SimulationTask.IsNull() || o.SimulationTask.IsUnknown() { + return e, false + } + var v []ResolvedParamPairValues_SdkV2 + d := o.SimulationTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSimulationTask sets the value of the SimulationTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetSimulationTask(ctx context.Context, v ResolvedParamPairValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["simulation_task"] + o.SimulationTask = types.ListValueMust(t, vs) +} + +// GetSparkJarTask returns the value of the SparkJarTask field in ResolvedValues_SdkV2 as +// a ResolvedStringParamsValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetSparkJarTask(ctx context.Context) (ResolvedStringParamsValues_SdkV2, bool) { + var e ResolvedStringParamsValues_SdkV2 + if o.SparkJarTask.IsNull() || o.SparkJarTask.IsUnknown() { + return e, false + } + var v []ResolvedStringParamsValues_SdkV2 + d := o.SparkJarTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkJarTask sets the value of the SparkJarTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetSparkJarTask(ctx context.Context, v ResolvedStringParamsValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] + o.SparkJarTask = types.ListValueMust(t, vs) +} + +// GetSparkPythonTask returns the value of the SparkPythonTask field in ResolvedValues_SdkV2 as +// a ResolvedStringParamsValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetSparkPythonTask(ctx context.Context) (ResolvedStringParamsValues_SdkV2, bool) { + var e ResolvedStringParamsValues_SdkV2 + if o.SparkPythonTask.IsNull() || o.SparkPythonTask.IsUnknown() { + return e, false + } + var v []ResolvedStringParamsValues_SdkV2 + d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkPythonTask sets the value of the SparkPythonTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetSparkPythonTask(ctx context.Context, v ResolvedStringParamsValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] + o.SparkPythonTask = types.ListValueMust(t, vs) +} + +// GetSparkSubmitTask returns the value of the SparkSubmitTask field in ResolvedValues_SdkV2 as +// a ResolvedStringParamsValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetSparkSubmitTask(ctx context.Context) (ResolvedStringParamsValues_SdkV2, bool) { + var e ResolvedStringParamsValues_SdkV2 + if o.SparkSubmitTask.IsNull() || o.SparkSubmitTask.IsUnknown() { + return e, false + } + var v []ResolvedStringParamsValues_SdkV2 + d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkSubmitTask sets the value of the SparkSubmitTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetSparkSubmitTask(ctx context.Context, v ResolvedStringParamsValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] + o.SparkSubmitTask = types.ListValueMust(t, vs) +} + +// GetSqlTask returns the value of the SqlTask field in ResolvedValues_SdkV2 as +// a ResolvedParamPairValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResolvedValues_SdkV2) GetSqlTask(ctx context.Context) (ResolvedParamPairValues_SdkV2, bool) { + var e ResolvedParamPairValues_SdkV2 + if o.SqlTask.IsNull() || o.SqlTask.IsUnknown() { + return e, false + } + var v []ResolvedParamPairValues_SdkV2 + d := o.SqlTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlTask sets the value of the SqlTask field in ResolvedValues_SdkV2. +func (o *ResolvedValues_SdkV2) SetSqlTask(ctx context.Context, v ResolvedParamPairValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] + o.SqlTask = types.ListValueMust(t, vs) +} + +// Run was retrieved successfully +type Run_SdkV2 struct { + // The sequence number of this run attempt for a triggered job run. The + // initial attempt of a run has an attempt_number of 0. If the initial run + // attempt fails, and the job has a retry policy (`max_retries` > 0), + // subsequent runs are created with an `original_attempt_run_id` of the + // original attempt’s ID and an incrementing `attempt_number`. Runs are + // retried only until they succeed, and the maximum `attempt_number` is the + // same as the `max_retries` value for the job. + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + // The time in milliseconds it took to terminate the cluster and clean up + // any associated artifacts. The duration of a task run is the sum of the + // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The + // `cleanup_duration` field is set to 0 for multitask job runs. The total + // duration of a multitask job run is the value of the `run_duration` field. + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + // The cluster used for this run. If the run is specified to use a new + // cluster, this field is set once the Jobs service has requested a cluster + // for the run. + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + // A snapshot of the job’s cluster specification when this run was + // created. + ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + // The creator user name. This field won’t be included in the response if + // the user has already been deleted. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // Description of the run + Description types.String `tfsdk:"description" tf:"optional"` + // The time at which this run ended in epoch milliseconds (milliseconds + // since 1/1/1970 UTC). This field is set to 0 if the job is still running. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The time in milliseconds it took to execute the commands in the JAR or + // notebook until they completed, failed, timed out, were cancelled, or + // encountered an unexpected error. The duration of a task run is the sum of + // the `setup_duration`, `execution_duration`, and the `cleanup_duration`. + // The `execution_duration` field is set to 0 for multitask job runs. The + // total duration of a multitask job run is the value of the `run_duration` + // field. + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. + // + // If `git_source` is set, these tasks retrieve the file from the remote + // repository by default. However, this behavior can be overridden by + // setting `source` to `WORKSPACE` on the task. + // + // Note: dbt and SQL File tasks support only version-controlled sources. If + // dbt or SQL File tasks are used, `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // Only populated by for-each iterations. The parent for-each task is + // located in tasks array. + Iterations types.List `tfsdk:"iterations" tf:"optional"` + // A list of job cluster specifications that can be shared and reused by + // tasks of this job. Libraries cannot be declared in a shared job cluster. + // You must declare dependent libraries in task settings. + JobClusters types.List `tfsdk:"job_clusters" tf:"optional"` + // The canonical identifier of the job that contains this run. + JobId types.Int64 `tfsdk:"job_id" tf:"optional"` + // Job-level parameters used in the run + JobParameters types.List `tfsdk:"job_parameters" tf:"optional"` + // ID of the job run that this run belongs to. For legacy and single-task + // job runs the field is populated with the job run ID. For task runs, the + // field is populated with the ID of the job run that the task run belongs + // to. + JobRunId types.Int64 `tfsdk:"job_run_id" tf:"optional"` + // A token that can be used to list the next page of sub-resources. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // A unique identifier for this job run. This is set to the same value as + // `run_id`. + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + // If this run is a retry of a prior run attempt, this field contains the + // run_id of the original attempt; otherwise, it is the same as the run_id. + OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` + // The parameters used for this run. + OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + // The time in milliseconds that the run has spent in the queue. + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + // The repair history of the run. + RepairHistory types.List `tfsdk:"repair_history" tf:"optional"` + // The time in milliseconds it took the job run and all of its repairs to + // finish. + RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + // The canonical identifier of the run. This ID is unique across all runs of + // all jobs. + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + // An optional name for the run. The maximum length is 4096 bytes in UTF-8 + // encoding. + RunName types.String `tfsdk:"run_name" tf:"optional"` + // The URL to the detail page of the run. + RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + // The type of a run. * `JOB_RUN`: Normal job run. A run created with + // :method:jobs/runNow. * `WORKFLOW_RUN`: Workflow run. A run created with + // [dbutils.notebook.run]. * `SUBMIT_RUN`: Submit run. A run created with + // :method:jobs/submit. + // + // [dbutils.notebook.run]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-workflow + RunType types.String `tfsdk:"run_type" tf:"optional"` + // The cron schedule that triggered this run if it was triggered by the + // periodic scheduler. + Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + // The time in milliseconds it took to set up the cluster. For runs that run + // on new clusters this is the cluster creation time, for runs that run on + // existing clusters this time should be very short. The duration of a task + // run is the sum of the `setup_duration`, `execution_duration`, and the + // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask + // job runs. The total duration of a multitask job run is the value of the + // `run_duration` field. + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + // The time at which this run was started in epoch milliseconds + // (milliseconds since 1/1/1970 UTC). This may not be the time when the job + // task starts executing, for example, if the job is scheduled to run on a + // new cluster, this is the time the cluster creation call is issued. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Deprecated. Please use the `status` field instead. + State types.List `tfsdk:"state" tf:"optional,object"` + // The current status of the run + Status types.List `tfsdk:"status" tf:"optional,object"` + // The list of tasks performed by the run. Each task has its own `run_id` + // which you can use to call `JobsGetOutput` to retrieve the run resutls. + Tasks types.List `tfsdk:"tasks" tf:"optional"` + // 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. * `TABLE`: Indicates a run that is triggered by a table update. + Trigger types.String `tfsdk:"trigger" tf:"optional"` + // Additional details about what triggered the run + TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` +} + +func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV2) { +} + +func (newState *Run_SdkV2) SyncEffectiveFieldsDuringRead(existingState Run_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Run_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster_instance": reflect.TypeOf(ClusterInstance_SdkV2{}), + "cluster_spec": reflect.TypeOf(ClusterSpec_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "iterations": reflect.TypeOf(RunTask_SdkV2{}), + "job_clusters": reflect.TypeOf(JobCluster_SdkV2{}), + "job_parameters": reflect.TypeOf(JobParameter_SdkV2{}), + "overriding_parameters": reflect.TypeOf(RunParameters_SdkV2{}), + "repair_history": reflect.TypeOf(RepairHistoryItem_SdkV2{}), + "schedule": reflect.TypeOf(CronSchedule_SdkV2{}), + "state": reflect.TypeOf(RunState_SdkV2{}), + "status": reflect.TypeOf(RunStatus_SdkV2{}), + "tasks": reflect.TypeOf(RunTask_SdkV2{}), + "trigger_info": reflect.TypeOf(TriggerInfo_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, Run_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Run_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attempt_number": o.AttemptNumber, + "cleanup_duration": o.CleanupDuration, + "cluster_instance": o.ClusterInstance, + "cluster_spec": o.ClusterSpec, + "creator_user_name": o.CreatorUserName, + "description": o.Description, + "end_time": o.EndTime, + "execution_duration": o.ExecutionDuration, + "git_source": o.GitSource, + "iterations": o.Iterations, + "job_clusters": o.JobClusters, + "job_id": o.JobId, + "job_parameters": o.JobParameters, + "job_run_id": o.JobRunId, + "next_page_token": o.NextPageToken, + "number_in_job": o.NumberInJob, + "original_attempt_run_id": o.OriginalAttemptRunId, + "overriding_parameters": o.OverridingParameters, + "queue_duration": o.QueueDuration, + "repair_history": o.RepairHistory, + "run_duration": o.RunDuration, + "run_id": o.RunId, + "run_name": o.RunName, + "run_page_url": o.RunPageUrl, + "run_type": o.RunType, + "schedule": o.Schedule, + "setup_duration": o.SetupDuration, + "start_time": o.StartTime, + "state": o.State, + "status": o.Status, + "tasks": o.Tasks, + "trigger": o.Trigger, + "trigger_info": o.TriggerInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Run_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attempt_number": types.Int64Type, + "cleanup_duration": types.Int64Type, + "cluster_instance": basetypes.ListType{ + ElemType: ClusterInstance{}.Type(ctx), + }, + "cluster_spec": basetypes.ListType{ + ElemType: ClusterSpec{}.Type(ctx), + }, + "creator_user_name": types.StringType, + "description": types.StringType, + "end_time": types.Int64Type, + "execution_duration": types.Int64Type, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "iterations": basetypes.ListType{ + ElemType: RunTask{}.Type(ctx), + }, + "job_clusters": basetypes.ListType{ + ElemType: JobCluster{}.Type(ctx), + }, + "job_id": types.Int64Type, + "job_parameters": basetypes.ListType{ + ElemType: JobParameter{}.Type(ctx), + }, + "job_run_id": types.Int64Type, + "next_page_token": types.StringType, + "number_in_job": types.Int64Type, + "original_attempt_run_id": types.Int64Type, + "overriding_parameters": basetypes.ListType{ + ElemType: RunParameters{}.Type(ctx), + }, + "queue_duration": types.Int64Type, + "repair_history": basetypes.ListType{ + ElemType: RepairHistoryItem{}.Type(ctx), + }, + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_name": types.StringType, + "run_page_url": types.StringType, + "run_type": types.StringType, + "schedule": basetypes.ListType{ + ElemType: CronSchedule{}.Type(ctx), + }, + "setup_duration": types.Int64Type, + "start_time": types.Int64Type, + "state": basetypes.ListType{ + ElemType: RunState{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: RunStatus{}.Type(ctx), + }, + "tasks": basetypes.ListType{ + ElemType: RunTask{}.Type(ctx), + }, + "trigger": types.StringType, + "trigger_info": basetypes.ListType{ + ElemType: TriggerInfo{}.Type(ctx), + }, + }, + } +} + +// GetClusterInstance returns the value of the ClusterInstance field in Run_SdkV2 as +// a ClusterInstance_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetClusterInstance(ctx context.Context) (ClusterInstance_SdkV2, bool) { + var e ClusterInstance_SdkV2 + if o.ClusterInstance.IsNull() || o.ClusterInstance.IsUnknown() { + return e, false + } + var v []ClusterInstance_SdkV2 + d := o.ClusterInstance.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterInstance sets the value of the ClusterInstance field in Run_SdkV2. +func (o *Run_SdkV2) SetClusterInstance(ctx context.Context, v ClusterInstance_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] + o.ClusterInstance = types.ListValueMust(t, vs) +} + +// GetClusterSpec returns the value of the ClusterSpec field in Run_SdkV2 as +// a ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetClusterSpec(ctx context.Context) (ClusterSpec_SdkV2, bool) { + var e ClusterSpec_SdkV2 + if o.ClusterSpec.IsNull() || o.ClusterSpec.IsUnknown() { + return e, false + } + var v []ClusterSpec_SdkV2 + d := o.ClusterSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterSpec sets the value of the ClusterSpec field in Run_SdkV2. +func (o *Run_SdkV2) SetClusterSpec(ctx context.Context, v ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_spec"] + o.ClusterSpec = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in Run_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in Run_SdkV2. +func (o *Run_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetIterations returns the value of the Iterations field in Run_SdkV2 as +// a slice of RunTask_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetIterations(ctx context.Context) ([]RunTask_SdkV2, bool) { + if o.Iterations.IsNull() || o.Iterations.IsUnknown() { + return nil, false + } + var v []RunTask_SdkV2 + d := o.Iterations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIterations sets the value of the Iterations field in Run_SdkV2. +func (o *Run_SdkV2) SetIterations(ctx context.Context, v []RunTask_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["iterations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Iterations = types.ListValueMust(t, vs) +} + +// GetJobClusters returns the value of the JobClusters field in Run_SdkV2 as +// a slice of JobCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetJobClusters(ctx context.Context) ([]JobCluster_SdkV2, bool) { + if o.JobClusters.IsNull() || o.JobClusters.IsUnknown() { + return nil, false + } + var v []JobCluster_SdkV2 + d := o.JobClusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobClusters sets the value of the JobClusters field in Run_SdkV2. +func (o *Run_SdkV2) SetJobClusters(ctx context.Context, v []JobCluster_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["job_clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobClusters = types.ListValueMust(t, vs) +} + +// GetJobParameters returns the value of the JobParameters field in Run_SdkV2 as +// a slice of JobParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetJobParameters(ctx context.Context) ([]JobParameter_SdkV2, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v []JobParameter_SdkV2 + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in Run_SdkV2. +func (o *Run_SdkV2) SetJobParameters(ctx context.Context, v []JobParameter_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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.ListValueMust(t, vs) +} + +// GetOverridingParameters returns the value of the OverridingParameters field in Run_SdkV2 as +// a RunParameters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetOverridingParameters(ctx context.Context) (RunParameters_SdkV2, bool) { + var e RunParameters_SdkV2 + if o.OverridingParameters.IsNull() || o.OverridingParameters.IsUnknown() { + return e, false + } + var v []RunParameters_SdkV2 + d := o.OverridingParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOverridingParameters sets the value of the OverridingParameters field in Run_SdkV2. +func (o *Run_SdkV2) SetOverridingParameters(ctx context.Context, v RunParameters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["overriding_parameters"] + o.OverridingParameters = types.ListValueMust(t, vs) +} + +// GetRepairHistory returns the value of the RepairHistory field in Run_SdkV2 as +// a slice of RepairHistoryItem_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetRepairHistory(ctx context.Context) ([]RepairHistoryItem_SdkV2, bool) { + if o.RepairHistory.IsNull() || o.RepairHistory.IsUnknown() { + return nil, false + } + var v []RepairHistoryItem_SdkV2 + d := o.RepairHistory.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRepairHistory sets the value of the RepairHistory field in Run_SdkV2. +func (o *Run_SdkV2) SetRepairHistory(ctx context.Context, v []RepairHistoryItem_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["repair_history"] + t = t.(attr.TypeWithElementType).ElementType() + o.RepairHistory = types.ListValueMust(t, vs) +} + +// GetSchedule returns the value of the Schedule field in Run_SdkV2 as +// a CronSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetSchedule(ctx context.Context) (CronSchedule_SdkV2, bool) { + var e CronSchedule_SdkV2 + if o.Schedule.IsNull() || o.Schedule.IsUnknown() { + return e, false + } + var v []CronSchedule_SdkV2 + d := o.Schedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchedule sets the value of the Schedule field in Run_SdkV2. +func (o *Run_SdkV2) SetSchedule(ctx context.Context, v CronSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] + o.Schedule = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in Run_SdkV2 as +// a RunState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetState(ctx context.Context) (RunState_SdkV2, bool) { + var e RunState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []RunState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in Run_SdkV2. +func (o *Run_SdkV2) SetState(ctx context.Context, v RunState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in Run_SdkV2 as +// a RunStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetStatus(ctx context.Context) (RunStatus_SdkV2, bool) { + var e RunStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []RunStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in Run_SdkV2. +func (o *Run_SdkV2) SetStatus(ctx context.Context, v RunStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// GetTasks returns the value of the Tasks field in Run_SdkV2 as +// a slice of RunTask_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetTasks(ctx context.Context) ([]RunTask_SdkV2, bool) { + if o.Tasks.IsNull() || o.Tasks.IsUnknown() { + return nil, false + } + var v []RunTask_SdkV2 + d := o.Tasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTasks sets the value of the Tasks field in Run_SdkV2. +func (o *Run_SdkV2) SetTasks(ctx context.Context, v []RunTask_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["tasks"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tasks = types.ListValueMust(t, vs) +} + +// GetTriggerInfo returns the value of the TriggerInfo field in Run_SdkV2 as +// a TriggerInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetTriggerInfo(ctx context.Context) (TriggerInfo_SdkV2, bool) { + var e TriggerInfo_SdkV2 + if o.TriggerInfo.IsNull() || o.TriggerInfo.IsUnknown() { + return e, false + } + var v []TriggerInfo_SdkV2 + d := o.TriggerInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTriggerInfo sets the value of the TriggerInfo field in Run_SdkV2. +func (o *Run_SdkV2) SetTriggerInfo(ctx context.Context, v TriggerInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger_info"] + o.TriggerInfo = types.ListValueMust(t, vs) +} + +type RunConditionTask_SdkV2 struct { + // The left operand of the condition task. Can be either a string value or a + // job state or parameter reference. + Left types.String `tfsdk:"left" tf:""` + // * `EQUAL_TO`, `NOT_EQUAL` operators perform string comparison of their + // operands. This means that `“12.0” == “12”` will evaluate to + // `false`. * `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, + // `LESS_THAN_OR_EQUAL` operators perform numeric comparison of their + // operands. `“12.0” >= “12”` will evaluate to `true`, `“10.0” + // >= “12”` will evaluate to `false`. + // + // The boolean comparison to task values can be implemented with operators + // `EQUAL_TO`, `NOT_EQUAL`. If a task value was set to a boolean value, it + // will be serialized to `“true”` or `“false”` for the comparison. + Op types.String `tfsdk:"op" tf:""` + // The condition expression evaluation result. Filled in if the task was + // successfully completed. Can be `"true"` or `"false"` + Outcome types.String `tfsdk:"outcome" tf:"optional"` + // The right operand of the condition task. Can be either a string value or + // a job state or parameter reference. + Right types.String `tfsdk:"right" tf:""` +} + +func (newState *RunConditionTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunConditionTask_SdkV2) { +} + +func (newState *RunConditionTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunConditionTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunConditionTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunConditionTask_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, RunConditionTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunConditionTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "left": o.Left, + "op": o.Op, + "outcome": o.Outcome, + "right": o.Right, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunConditionTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "left": types.StringType, + "op": types.StringType, + "outcome": types.StringType, + "right": types.StringType, + }, + } +} + +type RunForEachTask_SdkV2 struct { + // An optional maximum allowed number of concurrent runs of the task. Set + // this value if you want to be able to execute multiple runs of the task + // concurrently. + Concurrency types.Int64 `tfsdk:"concurrency" tf:"optional"` + // Array for task to iterate on. This can be a JSON string or a reference to + // an array parameter. + Inputs types.String `tfsdk:"inputs" tf:""` + // Read only field. Populated for GetRun and ListRuns RPC calls and stores + // the execution stats of an For each task + Stats types.List `tfsdk:"stats" tf:"optional,object"` + // Configuration for the task that will be run for each element in the array + Task types.List `tfsdk:"task" tf:"object"` +} + +func (newState *RunForEachTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunForEachTask_SdkV2) { +} + +func (newState *RunForEachTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunForEachTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunForEachTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunForEachTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "stats": reflect.TypeOf(ForEachStats_SdkV2{}), + "task": reflect.TypeOf(Task_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, RunForEachTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunForEachTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "concurrency": o.Concurrency, + "inputs": o.Inputs, + "stats": o.Stats, + "task": o.Task, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunForEachTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "concurrency": types.Int64Type, + "inputs": types.StringType, + "stats": basetypes.ListType{ + ElemType: ForEachStats{}.Type(ctx), + }, + "task": basetypes.ListType{ + ElemType: Task{}.Type(ctx), + }, + }, + } +} + +// GetStats returns the value of the Stats field in RunForEachTask_SdkV2 as +// a ForEachStats_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunForEachTask_SdkV2) GetStats(ctx context.Context) (ForEachStats_SdkV2, bool) { + var e ForEachStats_SdkV2 + if o.Stats.IsNull() || o.Stats.IsUnknown() { + return e, false + } + var v []ForEachStats_SdkV2 + d := o.Stats.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStats sets the value of the Stats field in RunForEachTask_SdkV2. +func (o *RunForEachTask_SdkV2) SetStats(ctx context.Context, v ForEachStats_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] + o.Stats = types.ListValueMust(t, vs) +} + +// GetTask returns the value of the Task field in RunForEachTask_SdkV2 as +// a Task_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunForEachTask_SdkV2) GetTask(ctx context.Context) (Task_SdkV2, bool) { + var e Task_SdkV2 + if o.Task.IsNull() || o.Task.IsUnknown() { + return e, false + } + var v []Task_SdkV2 + d := o.Task.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTask sets the value of the Task field in RunForEachTask_SdkV2. +func (o *RunForEachTask_SdkV2) SetTask(ctx context.Context, v Task_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task"] + o.Task = types.ListValueMust(t, vs) +} + +type RunJobOutput_SdkV2 struct { + // The run id of the triggered job run + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` +} + +func (newState *RunJobOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobOutput_SdkV2) { +} + +func (newState *RunJobOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunJobOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunJobOutput_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, RunJobOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunJobOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunJobOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +type RunJobTask_SdkV2 struct { + // An array of commands to execute for jobs with the dbt task, for example + // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt + // run"]` + DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + // A list of parameters for jobs with Spark JAR tasks, for example + // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the + // main function of the main class specified in the Spark JAR task. If not + // specified upon `run-now`, it defaults to an empty list. jar_params cannot + // be specified in conjunction with notebook_params. The JSON representation + // of this field (for example `{"jar_params":["john doe","35"]}`) cannot + // exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + JarParams types.List `tfsdk:"jar_params" tf:"optional"` + // ID of the job to trigger. + JobId types.Int64 `tfsdk:"job_id" tf:""` + // Job-level parameters used to trigger the job. + JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + // A map from keys to values for jobs with notebook task, for example + // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed + // to the notebook and is accessible through the [dbutils.widgets.get] + // function. + // + // If not specified upon `run-now`, the triggered run uses the job’s base + // parameters. + // + // notebook_params cannot be specified in conjunction with jar_params. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // The JSON representation of this field (for example + // `{"notebook_params":{"name":"john doe","age":"35"}}`) cannot exceed + // 10,000 bytes. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html + NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + // Controls whether the pipeline should perform a full refresh + PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + // A list of parameters for jobs with Python tasks, for example + // `"python_params": ["john doe", "35"]`. The parameters are passed to + // Python file as command-line parameters. If specified upon `run-now`, it + // would overwrite the parameters specified in job setting. The JSON + // representation of this field (for example `{"python_params":["john + // doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + PythonParams types.List `tfsdk:"python_params" tf:"optional"` + // A list of parameters for jobs with spark submit task, for example + // `"spark_submit_params": ["--class", + // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to + // spark-submit script as command-line parameters. If specified upon + // `run-now`, it would overwrite the parameters specified in job setting. + // The JSON representation of this field (for example + // `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + // A map from keys to values for jobs with SQL task, for example + // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task + // does not support custom parameters. + SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` +} + +func (newState *RunJobTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunJobTask_SdkV2) { +} + +func (newState *RunJobTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunJobTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunJobTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunJobTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbt_commands": reflect.TypeOf(types.String{}), + "jar_params": reflect.TypeOf(types.String{}), + "job_parameters": reflect.TypeOf(types.String{}), + "notebook_params": reflect.TypeOf(types.String{}), + "pipeline_params": reflect.TypeOf(PipelineParams_SdkV2{}), + "python_named_params": reflect.TypeOf(types.String{}), + "python_params": reflect.TypeOf(types.String{}), + "spark_submit_params": reflect.TypeOf(types.String{}), + "sql_params": 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, RunJobTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunJobTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbt_commands": o.DbtCommands, + "jar_params": o.JarParams, + "job_id": o.JobId, + "job_parameters": o.JobParameters, + "notebook_params": o.NotebookParams, + "pipeline_params": o.PipelineParams, + "python_named_params": o.PythonNamedParams, + "python_params": o.PythonParams, + "spark_submit_params": o.SparkSubmitParams, + "sql_params": o.SqlParams, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunJobTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbt_commands": basetypes.ListType{ + ElemType: types.StringType, + }, + "jar_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "job_id": types.Int64Type, + "job_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "notebook_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "pipeline_params": basetypes.ListType{ + ElemType: PipelineParams{}.Type(ctx), + }, + "python_named_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "python_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "spark_submit_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "sql_params": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDbtCommands returns the value of the DbtCommands field in RunJobTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunJobTask_SdkV2) GetDbtCommands(ctx context.Context) ([]types.String, bool) { + if o.DbtCommands.IsNull() || o.DbtCommands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DbtCommands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDbtCommands sets the value of the DbtCommands field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetDbtCommands(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["dbt_commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.DbtCommands = types.ListValueMust(t, vs) +} + +// GetJarParams returns the value of the JarParams field in RunJobTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunJobTask_SdkV2) GetJarParams(ctx context.Context) ([]types.String, bool) { + if o.JarParams.IsNull() || o.JarParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.JarParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJarParams sets the value of the JarParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetJarParams(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["jar_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.JarParams = types.ListValueMust(t, vs) +} + +// GetJobParameters returns the value of the JobParameters field in RunJobTask_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 *RunJobTask_SdkV2) GetJobParameters(ctx context.Context) (map[string]types.String, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetJobParameters(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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.MapValueMust(t, vs) +} + +// GetNotebookParams returns the value of the NotebookParams field in RunJobTask_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 *RunJobTask_SdkV2) GetNotebookParams(ctx context.Context) (map[string]types.String, bool) { + if o.NotebookParams.IsNull() || o.NotebookParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NotebookParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotebookParams sets the value of the NotebookParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetNotebookParams(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["notebook_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.NotebookParams = types.MapValueMust(t, vs) +} + +// GetPipelineParams returns the value of the PipelineParams field in RunJobTask_SdkV2 as +// a PipelineParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunJobTask_SdkV2) GetPipelineParams(ctx context.Context) (PipelineParams_SdkV2, bool) { + var e PipelineParams_SdkV2 + if o.PipelineParams.IsNull() || o.PipelineParams.IsUnknown() { + return e, false + } + var v []PipelineParams_SdkV2 + d := o.PipelineParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineParams sets the value of the PipelineParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetPipelineParams(ctx context.Context, v PipelineParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] + o.PipelineParams = types.ListValueMust(t, vs) +} + +// GetPythonNamedParams returns the value of the PythonNamedParams field in RunJobTask_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 *RunJobTask_SdkV2) GetPythonNamedParams(ctx context.Context) (map[string]types.String, bool) { + if o.PythonNamedParams.IsNull() || o.PythonNamedParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.PythonNamedParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonNamedParams sets the value of the PythonNamedParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetPythonNamedParams(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["python_named_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonNamedParams = types.MapValueMust(t, vs) +} + +// GetPythonParams returns the value of the PythonParams field in RunJobTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunJobTask_SdkV2) GetPythonParams(ctx context.Context) ([]types.String, bool) { + if o.PythonParams.IsNull() || o.PythonParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PythonParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonParams sets the value of the PythonParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetPythonParams(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["python_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonParams = types.ListValueMust(t, vs) +} + +// GetSparkSubmitParams returns the value of the SparkSubmitParams field in RunJobTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunJobTask_SdkV2) GetSparkSubmitParams(ctx context.Context) ([]types.String, bool) { + if o.SparkSubmitParams.IsNull() || o.SparkSubmitParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SparkSubmitParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkSubmitParams sets the value of the SparkSubmitParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetSparkSubmitParams(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["spark_submit_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkSubmitParams = types.ListValueMust(t, vs) +} + +// GetSqlParams returns the value of the SqlParams field in RunJobTask_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 *RunJobTask_SdkV2) GetSqlParams(ctx context.Context) (map[string]types.String, bool) { + if o.SqlParams.IsNull() || o.SqlParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SqlParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlParams sets the value of the SqlParams field in RunJobTask_SdkV2. +func (o *RunJobTask_SdkV2) SetSqlParams(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["sql_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlParams = types.MapValueMust(t, vs) +} + +type RunNow_SdkV2 struct { + // An array of commands to execute for jobs with the dbt task, for example + // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt + // run"]` + DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + // An optional token to guarantee the idempotency of job run requests. If a + // run with the provided token already exists, the request does not create a + // new run but returns the ID of the existing run instead. If a run with the + // provided token is deleted, an error is returned. + // + // If you specify the idempotency token, upon failure you can retry until + // the request succeeds. Databricks guarantees that exactly one run is + // launched with that idempotency token. + // + // This token must have at most 64 characters. + // + // For more information, see [How to ensure idempotency for jobs]. + // + // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + // A list of parameters for jobs with Spark JAR tasks, for example + // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the + // main function of the main class specified in the Spark JAR task. If not + // specified upon `run-now`, it defaults to an empty list. jar_params cannot + // be specified in conjunction with notebook_params. The JSON representation + // of this field (for example `{"jar_params":["john doe","35"]}`) cannot + // exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + JarParams types.List `tfsdk:"jar_params" tf:"optional"` + // The ID of the job to be executed + JobId types.Int64 `tfsdk:"job_id" tf:""` + // Job-level parameters used in the run. for example `"param": + // "overriding_val"` + JobParameters types.Map `tfsdk:"job_parameters" tf:"optional"` + // A map from keys to values for jobs with notebook task, for example + // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed + // to the notebook and is accessible through the [dbutils.widgets.get] + // function. + // + // If not specified upon `run-now`, the triggered run uses the job’s base + // parameters. + // + // notebook_params cannot be specified in conjunction with jar_params. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // The JSON representation of this field (for example + // `{"notebook_params":{"name":"john doe","age":"35"}}`) cannot exceed + // 10,000 bytes. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html + NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + // A list of task keys to run inside of the job. If this field is not + // provided, all tasks in the job will be run. + Only types.List `tfsdk:"only" tf:"optional"` + // Controls whether the pipeline should perform a full refresh + PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + // A list of parameters for jobs with Python tasks, for example + // `"python_params": ["john doe", "35"]`. The parameters are passed to + // Python file as command-line parameters. If specified upon `run-now`, it + // would overwrite the parameters specified in job setting. The JSON + // representation of this field (for example `{"python_params":["john + // doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + PythonParams types.List `tfsdk:"python_params" tf:"optional"` + // The queue settings of the run. + Queue types.List `tfsdk:"queue" tf:"optional,object"` + // A list of parameters for jobs with spark submit task, for example + // `"spark_submit_params": ["--class", + // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to + // spark-submit script as command-line parameters. If specified upon + // `run-now`, it would overwrite the parameters specified in job setting. + // The JSON representation of this field (for example + // `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + // A map from keys to values for jobs with SQL task, for example + // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task + // does not support custom parameters. + SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` +} + +func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNow_SdkV2) { +} + +func (newState *RunNow_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunNow_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunNow_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbt_commands": reflect.TypeOf(types.String{}), + "jar_params": reflect.TypeOf(types.String{}), + "job_parameters": reflect.TypeOf(types.String{}), + "notebook_params": reflect.TypeOf(types.String{}), + "only": reflect.TypeOf(types.String{}), + "pipeline_params": reflect.TypeOf(PipelineParams_SdkV2{}), + "python_named_params": reflect.TypeOf(types.String{}), + "python_params": reflect.TypeOf(types.String{}), + "queue": reflect.TypeOf(QueueSettings_SdkV2{}), + "spark_submit_params": reflect.TypeOf(types.String{}), + "sql_params": 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, RunNow_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunNow_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbt_commands": o.DbtCommands, + "idempotency_token": o.IdempotencyToken, + "jar_params": o.JarParams, + "job_id": o.JobId, + "job_parameters": o.JobParameters, + "notebook_params": o.NotebookParams, + "only": o.Only, + "pipeline_params": o.PipelineParams, + "python_named_params": o.PythonNamedParams, + "python_params": o.PythonParams, + "queue": o.Queue, + "spark_submit_params": o.SparkSubmitParams, + "sql_params": o.SqlParams, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunNow_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbt_commands": basetypes.ListType{ + ElemType: types.StringType, + }, + "idempotency_token": types.StringType, + "jar_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "job_id": types.Int64Type, + "job_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "notebook_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "only": basetypes.ListType{ + ElemType: types.StringType, + }, + "pipeline_params": basetypes.ListType{ + ElemType: PipelineParams{}.Type(ctx), + }, + "python_named_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "python_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "queue": basetypes.ListType{ + ElemType: QueueSettings{}.Type(ctx), + }, + "spark_submit_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "sql_params": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDbtCommands returns the value of the DbtCommands field in RunNow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetDbtCommands(ctx context.Context) ([]types.String, bool) { + if o.DbtCommands.IsNull() || o.DbtCommands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DbtCommands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDbtCommands sets the value of the DbtCommands field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetDbtCommands(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["dbt_commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.DbtCommands = types.ListValueMust(t, vs) +} + +// GetJarParams returns the value of the JarParams field in RunNow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetJarParams(ctx context.Context) ([]types.String, bool) { + if o.JarParams.IsNull() || o.JarParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.JarParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJarParams sets the value of the JarParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetJarParams(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["jar_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.JarParams = types.ListValueMust(t, vs) +} + +// GetJobParameters returns the value of the JobParameters field in RunNow_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 *RunNow_SdkV2) GetJobParameters(ctx context.Context) (map[string]types.String, bool) { + if o.JobParameters.IsNull() || o.JobParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.JobParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJobParameters sets the value of the JobParameters field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetJobParameters(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["job_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.JobParameters = types.MapValueMust(t, vs) +} + +// GetNotebookParams returns the value of the NotebookParams field in RunNow_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 *RunNow_SdkV2) GetNotebookParams(ctx context.Context) (map[string]types.String, bool) { + if o.NotebookParams.IsNull() || o.NotebookParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NotebookParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotebookParams sets the value of the NotebookParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetNotebookParams(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["notebook_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.NotebookParams = types.MapValueMust(t, vs) +} + +// GetOnly returns the value of the Only field in RunNow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetOnly(ctx context.Context) ([]types.String, bool) { + if o.Only.IsNull() || o.Only.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Only.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnly sets the value of the Only field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetOnly(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["only"] + t = t.(attr.TypeWithElementType).ElementType() + o.Only = types.ListValueMust(t, vs) +} + +// GetPipelineParams returns the value of the PipelineParams field in RunNow_SdkV2 as +// a PipelineParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetPipelineParams(ctx context.Context) (PipelineParams_SdkV2, bool) { + var e PipelineParams_SdkV2 + if o.PipelineParams.IsNull() || o.PipelineParams.IsUnknown() { + return e, false + } + var v []PipelineParams_SdkV2 + d := o.PipelineParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineParams sets the value of the PipelineParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetPipelineParams(ctx context.Context, v PipelineParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] + o.PipelineParams = types.ListValueMust(t, vs) +} + +// GetPythonNamedParams returns the value of the PythonNamedParams field in RunNow_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 *RunNow_SdkV2) GetPythonNamedParams(ctx context.Context) (map[string]types.String, bool) { + if o.PythonNamedParams.IsNull() || o.PythonNamedParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.PythonNamedParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonNamedParams sets the value of the PythonNamedParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetPythonNamedParams(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["python_named_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonNamedParams = types.MapValueMust(t, vs) +} + +// GetPythonParams returns the value of the PythonParams field in RunNow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetPythonParams(ctx context.Context) ([]types.String, bool) { + if o.PythonParams.IsNull() || o.PythonParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PythonParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonParams sets the value of the PythonParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetPythonParams(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["python_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonParams = types.ListValueMust(t, vs) +} + +// GetQueue returns the value of the Queue field in RunNow_SdkV2 as +// a QueueSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetQueue(ctx context.Context) (QueueSettings_SdkV2, bool) { + var e QueueSettings_SdkV2 + if o.Queue.IsNull() || o.Queue.IsUnknown() { + return e, false + } + var v []QueueSettings_SdkV2 + d := o.Queue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueue sets the value of the Queue field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetQueue(ctx context.Context, v QueueSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] + o.Queue = types.ListValueMust(t, vs) +} + +// GetSparkSubmitParams returns the value of the SparkSubmitParams field in RunNow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunNow_SdkV2) GetSparkSubmitParams(ctx context.Context) ([]types.String, bool) { + if o.SparkSubmitParams.IsNull() || o.SparkSubmitParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SparkSubmitParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkSubmitParams sets the value of the SparkSubmitParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetSparkSubmitParams(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["spark_submit_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkSubmitParams = types.ListValueMust(t, vs) +} + +// GetSqlParams returns the value of the SqlParams field in RunNow_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 *RunNow_SdkV2) GetSqlParams(ctx context.Context) (map[string]types.String, bool) { + if o.SqlParams.IsNull() || o.SqlParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SqlParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlParams sets the value of the SqlParams field in RunNow_SdkV2. +func (o *RunNow_SdkV2) SetSqlParams(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["sql_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlParams = types.MapValueMust(t, vs) +} + +// Run was started successfully. +type RunNowResponse_SdkV2 struct { + // A unique identifier for this job run. This is set to the same value as + // `run_id`. + NumberInJob types.Int64 `tfsdk:"number_in_job" tf:"optional"` + // The globally unique ID of the newly triggered run. + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` +} + +func (newState *RunNowResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunNowResponse_SdkV2) { +} + +func (newState *RunNowResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunNowResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunNowResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunNowResponse_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, RunNowResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunNowResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "number_in_job": o.NumberInJob, + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunNowResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "number_in_job": types.Int64Type, + "run_id": types.Int64Type, + }, + } +} + +// Run output was retrieved successfully. +type RunOutput_SdkV2 struct { + // The output of a dbt task, if available. + DbtOutput types.List `tfsdk:"dbt_output" tf:"optional,object"` + // An error message indicating why a task failed or why output is not + // available. The message is unstructured, and its exact format is subject + // to change. + Error types.String `tfsdk:"error" tf:"optional"` + // If there was an error executing the run, this field contains any + // available stack traces. + ErrorTrace types.String `tfsdk:"error_trace" tf:"optional"` + + Info types.String `tfsdk:"info" tf:"optional"` + // The output from tasks that write to standard streams (stdout/stderr) such + // as spark_jar_task, spark_python_task, python_wheel_task. + // + // It's not supported for the notebook_task, pipeline_task or + // spark_submit_task. + // + // Databricks restricts this API to return the last 5 MB of these logs. + Logs types.String `tfsdk:"logs" tf:"optional"` + // Whether the logs are truncated. + LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:"optional"` + // All details of the run except for its output. + Metadata types.List `tfsdk:"metadata" tf:"optional,object"` + // The output of a notebook task, if available. A notebook task that + // terminates (either successfully or with a failure) without calling + // `dbutils.notebook.exit()` is considered to have an empty output. This + // field is set but its result value is empty. Databricks restricts this API + // to return the first 5 MB of the output. To return a larger result, use + // the [ClusterLogConf] field to configure log storage for the job cluster. + // + // [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf + NotebookOutput types.List `tfsdk:"notebook_output" tf:"optional,object"` + // The output of a run job task, if available + RunJobOutput types.List `tfsdk:"run_job_output" tf:"optional,object"` + // The output of a SQL task, if available. + SqlOutput types.List `tfsdk:"sql_output" tf:"optional,object"` +} + +func (newState *RunOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunOutput_SdkV2) { +} + +func (newState *RunOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbt_output": reflect.TypeOf(DbtOutput_SdkV2{}), + "metadata": reflect.TypeOf(Run_SdkV2{}), + "notebook_output": reflect.TypeOf(NotebookOutput_SdkV2{}), + "run_job_output": reflect.TypeOf(RunJobOutput_SdkV2{}), + "sql_output": reflect.TypeOf(SqlOutput_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, RunOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbt_output": o.DbtOutput, + "error": o.Error, + "error_trace": o.ErrorTrace, + "info": o.Info, + "logs": o.Logs, + "logs_truncated": o.LogsTruncated, + "metadata": o.Metadata, + "notebook_output": o.NotebookOutput, + "run_job_output": o.RunJobOutput, + "sql_output": o.SqlOutput, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbt_output": basetypes.ListType{ + ElemType: DbtOutput{}.Type(ctx), + }, + "error": types.StringType, + "error_trace": types.StringType, + "info": types.StringType, + "logs": types.StringType, + "logs_truncated": types.BoolType, + "metadata": basetypes.ListType{ + ElemType: Run{}.Type(ctx), + }, + "notebook_output": basetypes.ListType{ + ElemType: NotebookOutput{}.Type(ctx), + }, + "run_job_output": basetypes.ListType{ + ElemType: RunJobOutput{}.Type(ctx), + }, + "sql_output": basetypes.ListType{ + ElemType: SqlOutput{}.Type(ctx), + }, + }, + } +} + +// GetDbtOutput returns the value of the DbtOutput field in RunOutput_SdkV2 as +// a DbtOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunOutput_SdkV2) GetDbtOutput(ctx context.Context) (DbtOutput_SdkV2, bool) { + var e DbtOutput_SdkV2 + if o.DbtOutput.IsNull() || o.DbtOutput.IsUnknown() { + return e, false + } + var v []DbtOutput_SdkV2 + d := o.DbtOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbtOutput sets the value of the DbtOutput field in RunOutput_SdkV2. +func (o *RunOutput_SdkV2) SetDbtOutput(ctx context.Context, v DbtOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_output"] + o.DbtOutput = types.ListValueMust(t, vs) +} + +// GetMetadata returns the value of the Metadata field in RunOutput_SdkV2 as +// a Run_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunOutput_SdkV2) GetMetadata(ctx context.Context) (Run_SdkV2, bool) { + var e Run_SdkV2 + if o.Metadata.IsNull() || o.Metadata.IsUnknown() { + return e, false + } + var v []Run_SdkV2 + d := o.Metadata.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetadata sets the value of the Metadata field in RunOutput_SdkV2. +func (o *RunOutput_SdkV2) SetMetadata(ctx context.Context, v Run_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metadata"] + o.Metadata = types.ListValueMust(t, vs) +} + +// GetNotebookOutput returns the value of the NotebookOutput field in RunOutput_SdkV2 as +// a NotebookOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunOutput_SdkV2) GetNotebookOutput(ctx context.Context) (NotebookOutput_SdkV2, bool) { + var e NotebookOutput_SdkV2 + if o.NotebookOutput.IsNull() || o.NotebookOutput.IsUnknown() { + return e, false + } + var v []NotebookOutput_SdkV2 + d := o.NotebookOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookOutput sets the value of the NotebookOutput field in RunOutput_SdkV2. +func (o *RunOutput_SdkV2) SetNotebookOutput(ctx context.Context, v NotebookOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_output"] + o.NotebookOutput = types.ListValueMust(t, vs) +} + +// GetRunJobOutput returns the value of the RunJobOutput field in RunOutput_SdkV2 as +// a RunJobOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunOutput_SdkV2) GetRunJobOutput(ctx context.Context) (RunJobOutput_SdkV2, bool) { + var e RunJobOutput_SdkV2 + if o.RunJobOutput.IsNull() || o.RunJobOutput.IsUnknown() { + return e, false + } + var v []RunJobOutput_SdkV2 + d := o.RunJobOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunJobOutput sets the value of the RunJobOutput field in RunOutput_SdkV2. +func (o *RunOutput_SdkV2) SetRunJobOutput(ctx context.Context, v RunJobOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_output"] + o.RunJobOutput = types.ListValueMust(t, vs) +} + +// GetSqlOutput returns the value of the SqlOutput field in RunOutput_SdkV2 as +// a SqlOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunOutput_SdkV2) GetSqlOutput(ctx context.Context) (SqlOutput_SdkV2, bool) { + var e SqlOutput_SdkV2 + if o.SqlOutput.IsNull() || o.SqlOutput.IsUnknown() { + return e, false + } + var v []SqlOutput_SdkV2 + d := o.SqlOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlOutput sets the value of the SqlOutput field in RunOutput_SdkV2. +func (o *RunOutput_SdkV2) SetSqlOutput(ctx context.Context, v SqlOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_output"] + o.SqlOutput = types.ListValueMust(t, vs) +} + +type RunParameters_SdkV2 struct { + // An array of commands to execute for jobs with the dbt task, for example + // `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt + // run"]` + DbtCommands types.List `tfsdk:"dbt_commands" tf:"optional"` + // A list of parameters for jobs with Spark JAR tasks, for example + // `"jar_params": ["john doe", "35"]`. The parameters are used to invoke the + // main function of the main class specified in the Spark JAR task. If not + // specified upon `run-now`, it defaults to an empty list. jar_params cannot + // be specified in conjunction with notebook_params. The JSON representation + // of this field (for example `{"jar_params":["john doe","35"]}`) cannot + // exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + JarParams types.List `tfsdk:"jar_params" tf:"optional"` + // A map from keys to values for jobs with notebook task, for example + // `"notebook_params": {"name": "john doe", "age": "35"}`. The map is passed + // to the notebook and is accessible through the [dbutils.widgets.get] + // function. + // + // If not specified upon `run-now`, the triggered run uses the job’s base + // parameters. + // + // notebook_params cannot be specified in conjunction with jar_params. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // The JSON representation of this field (for example + // `{"notebook_params":{"name":"john doe","age":"35"}}`) cannot exceed + // 10,000 bytes. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html + NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` + // Controls whether the pipeline should perform a full refresh + PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + + PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` + // A list of parameters for jobs with Python tasks, for example + // `"python_params": ["john doe", "35"]`. The parameters are passed to + // Python file as command-line parameters. If specified upon `run-now`, it + // would overwrite the parameters specified in job setting. The JSON + // representation of this field (for example `{"python_params":["john + // doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + PythonParams types.List `tfsdk:"python_params" tf:"optional"` + // A list of parameters for jobs with spark submit task, for example + // `"spark_submit_params": ["--class", + // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to + // spark-submit script as command-line parameters. If specified upon + // `run-now`, it would overwrite the parameters specified in job setting. + // The JSON representation of this field (for example + // `{"python_params":["john doe","35"]}`) cannot exceed 10,000 bytes. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs + // + // Important + // + // These parameters accept only Latin characters (ASCII character set). + // Using non-ASCII characters returns an error. Examples of invalid, + // non-ASCII characters are Chinese, Japanese kanjis, and emojis. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + SparkSubmitParams types.List `tfsdk:"spark_submit_params" tf:"optional"` + // A map from keys to values for jobs with SQL task, for example + // `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task + // does not support custom parameters. + SqlParams types.Map `tfsdk:"sql_params" tf:"optional"` +} + +func (newState *RunParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunParameters_SdkV2) { +} + +func (newState *RunParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunParameters_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunParameters. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunParameters_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dbt_commands": reflect.TypeOf(types.String{}), + "jar_params": reflect.TypeOf(types.String{}), + "notebook_params": reflect.TypeOf(types.String{}), + "pipeline_params": reflect.TypeOf(PipelineParams_SdkV2{}), + "python_named_params": reflect.TypeOf(types.String{}), + "python_params": reflect.TypeOf(types.String{}), + "spark_submit_params": reflect.TypeOf(types.String{}), + "sql_params": 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, RunParameters_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunParameters_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbt_commands": o.DbtCommands, + "jar_params": o.JarParams, + "notebook_params": o.NotebookParams, + "pipeline_params": o.PipelineParams, + "python_named_params": o.PythonNamedParams, + "python_params": o.PythonParams, + "spark_submit_params": o.SparkSubmitParams, + "sql_params": o.SqlParams, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunParameters_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbt_commands": basetypes.ListType{ + ElemType: types.StringType, + }, + "jar_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "notebook_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "pipeline_params": basetypes.ListType{ + ElemType: PipelineParams{}.Type(ctx), + }, + "python_named_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "python_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "spark_submit_params": basetypes.ListType{ + ElemType: types.StringType, + }, + "sql_params": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDbtCommands returns the value of the DbtCommands field in RunParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunParameters_SdkV2) GetDbtCommands(ctx context.Context) ([]types.String, bool) { + if o.DbtCommands.IsNull() || o.DbtCommands.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DbtCommands.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDbtCommands sets the value of the DbtCommands field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetDbtCommands(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["dbt_commands"] + t = t.(attr.TypeWithElementType).ElementType() + o.DbtCommands = types.ListValueMust(t, vs) +} + +// GetJarParams returns the value of the JarParams field in RunParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunParameters_SdkV2) GetJarParams(ctx context.Context) ([]types.String, bool) { + if o.JarParams.IsNull() || o.JarParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.JarParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetJarParams sets the value of the JarParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetJarParams(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["jar_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.JarParams = types.ListValueMust(t, vs) +} + +// GetNotebookParams returns the value of the NotebookParams field in RunParameters_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 *RunParameters_SdkV2) GetNotebookParams(ctx context.Context) (map[string]types.String, bool) { + if o.NotebookParams.IsNull() || o.NotebookParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NotebookParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotebookParams sets the value of the NotebookParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetNotebookParams(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["notebook_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.NotebookParams = types.MapValueMust(t, vs) +} + +// GetPipelineParams returns the value of the PipelineParams field in RunParameters_SdkV2 as +// a PipelineParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunParameters_SdkV2) GetPipelineParams(ctx context.Context) (PipelineParams_SdkV2, bool) { + var e PipelineParams_SdkV2 + if o.PipelineParams.IsNull() || o.PipelineParams.IsUnknown() { + return e, false + } + var v []PipelineParams_SdkV2 + d := o.PipelineParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineParams sets the value of the PipelineParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetPipelineParams(ctx context.Context, v PipelineParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] + o.PipelineParams = types.ListValueMust(t, vs) +} + +// GetPythonNamedParams returns the value of the PythonNamedParams field in RunParameters_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 *RunParameters_SdkV2) GetPythonNamedParams(ctx context.Context) (map[string]types.String, bool) { + if o.PythonNamedParams.IsNull() || o.PythonNamedParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.PythonNamedParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonNamedParams sets the value of the PythonNamedParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetPythonNamedParams(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["python_named_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonNamedParams = types.MapValueMust(t, vs) +} + +// GetPythonParams returns the value of the PythonParams field in RunParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunParameters_SdkV2) GetPythonParams(ctx context.Context) ([]types.String, bool) { + if o.PythonParams.IsNull() || o.PythonParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PythonParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPythonParams sets the value of the PythonParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetPythonParams(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["python_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.PythonParams = types.ListValueMust(t, vs) +} + +// GetSparkSubmitParams returns the value of the SparkSubmitParams field in RunParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunParameters_SdkV2) GetSparkSubmitParams(ctx context.Context) ([]types.String, bool) { + if o.SparkSubmitParams.IsNull() || o.SparkSubmitParams.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SparkSubmitParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkSubmitParams sets the value of the SparkSubmitParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetSparkSubmitParams(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["spark_submit_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkSubmitParams = types.ListValueMust(t, vs) +} + +// GetSqlParams returns the value of the SqlParams field in RunParameters_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 *RunParameters_SdkV2) GetSqlParams(ctx context.Context) (map[string]types.String, bool) { + if o.SqlParams.IsNull() || o.SqlParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SqlParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlParams sets the value of the SqlParams field in RunParameters_SdkV2. +func (o *RunParameters_SdkV2) SetSqlParams(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["sql_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlParams = types.MapValueMust(t, vs) +} + +// The current state of the run. +type RunState_SdkV2 struct { + // A value indicating the run's current lifecycle state. This field is + // always available in the response. + LifeCycleState types.String `tfsdk:"life_cycle_state" tf:"optional"` + // The reason indicating why the run was queued. + QueueReason types.String `tfsdk:"queue_reason" tf:"optional"` + // A value indicating the run's result. This field is only available for + // terminal lifecycle states. + ResultState types.String `tfsdk:"result_state" tf:"optional"` + // A descriptive message for the current state. This field is unstructured, + // and its exact format is subject to change. + StateMessage types.String `tfsdk:"state_message" tf:"optional"` + // A value indicating whether a run was canceled manually by a user or by + // the scheduler because the run timed out. + UserCancelledOrTimedout types.Bool `tfsdk:"user_cancelled_or_timedout" tf:"optional"` +} + +func (newState *RunState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunState_SdkV2) { +} + +func (newState *RunState_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunState_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunState. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunState_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, RunState_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunState_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "life_cycle_state": o.LifeCycleState, + "queue_reason": o.QueueReason, + "result_state": o.ResultState, + "state_message": o.StateMessage, + "user_cancelled_or_timedout": o.UserCancelledOrTimedout, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunState_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "life_cycle_state": types.StringType, + "queue_reason": types.StringType, + "result_state": types.StringType, + "state_message": types.StringType, + "user_cancelled_or_timedout": types.BoolType, + }, + } +} + +// The current status of the run +type RunStatus_SdkV2 struct { + // If the run was queued, details about the reason for queuing the run. + QueueDetails types.List `tfsdk:"queue_details" tf:"optional,object"` + // The current state of the run. + State types.String `tfsdk:"state" tf:"optional"` + // If the run is in a TERMINATING or TERMINATED state, details about the + // reason for terminating the run. + TerminationDetails types.List `tfsdk:"termination_details" tf:"optional,object"` +} + +func (newState *RunStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunStatus_SdkV2) { +} + +func (newState *RunStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "queue_details": reflect.TypeOf(QueueDetails_SdkV2{}), + "termination_details": reflect.TypeOf(TerminationDetails_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, RunStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "queue_details": o.QueueDetails, + "state": o.State, + "termination_details": o.TerminationDetails, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "queue_details": basetypes.ListType{ + ElemType: QueueDetails{}.Type(ctx), + }, + "state": types.StringType, + "termination_details": basetypes.ListType{ + ElemType: TerminationDetails{}.Type(ctx), + }, + }, + } +} + +// GetQueueDetails returns the value of the QueueDetails field in RunStatus_SdkV2 as +// a QueueDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunStatus_SdkV2) GetQueueDetails(ctx context.Context) (QueueDetails_SdkV2, bool) { + var e QueueDetails_SdkV2 + if o.QueueDetails.IsNull() || o.QueueDetails.IsUnknown() { + return e, false + } + var v []QueueDetails_SdkV2 + d := o.QueueDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueueDetails sets the value of the QueueDetails field in RunStatus_SdkV2. +func (o *RunStatus_SdkV2) SetQueueDetails(ctx context.Context, v QueueDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue_details"] + o.QueueDetails = types.ListValueMust(t, vs) +} + +// GetTerminationDetails returns the value of the TerminationDetails field in RunStatus_SdkV2 as +// a TerminationDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunStatus_SdkV2) GetTerminationDetails(ctx context.Context) (TerminationDetails_SdkV2, bool) { + var e TerminationDetails_SdkV2 + if o.TerminationDetails.IsNull() || o.TerminationDetails.IsUnknown() { + return e, false + } + var v []TerminationDetails_SdkV2 + d := o.TerminationDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTerminationDetails sets the value of the TerminationDetails field in RunStatus_SdkV2. +func (o *RunStatus_SdkV2) SetTerminationDetails(ctx context.Context, v TerminationDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["termination_details"] + o.TerminationDetails = types.ListValueMust(t, vs) +} + +// Used when outputting a child run, in GetRun or ListRuns. +type RunTask_SdkV2 struct { + // The sequence number of this run attempt for a triggered job run. The + // initial attempt of a run has an attempt_number of 0. If the initial run + // attempt fails, and the job has a retry policy (`max_retries` > 0), + // subsequent runs are created with an `original_attempt_run_id` of the + // original attempt’s ID and an incrementing `attempt_number`. Runs are + // retried only until they succeed, and the maximum `attempt_number` is the + // same as the `max_retries` value for the job. + AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + // The time in milliseconds it took to terminate the cluster and clean up + // any associated artifacts. The duration of a task run is the sum of the + // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The + // `cleanup_duration` field is set to 0 for multitask job runs. The total + // duration of a multitask job run is the value of the `run_duration` field. + CleanupDuration types.Int64 `tfsdk:"cleanup_duration" tf:"optional"` + // The cluster used for this run. If the run is specified to use a new + // cluster, this field is set once the Jobs service has requested a cluster + // for the run. + ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + // The task evaluates a condition that can be used to control the execution + // of other tasks when the `condition_task` field is present. The condition + // task does not require a cluster to execute and does not support retries + // or notifications. + ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + // The task runs one or more dbt commands when the `dbt_task` field is + // present. The dbt task requires both Databricks SQL and the ability to use + // a serverless or a pro SQL warehouse. + DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + // An optional array of objects specifying the dependency graph of the task. + // All tasks specified in this field must complete successfully before + // executing this task. The key is `task_key`, and the value is the name + // assigned to the dependent task. + DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + // An optional description for this task. + Description types.String `tfsdk:"description" tf:"optional"` + // An optional set of email addresses notified when the task run begins or + // completes. The default behavior is to not send any emails. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // The time at which this run ended in epoch milliseconds (milliseconds + // since 1/1/1970 UTC). This field is set to 0 if the job is still running. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The key that references an environment spec in a job. This field is + // required for Python script, Python wheel and dbt tasks when using + // serverless compute. + EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + // The time in milliseconds it took to execute the commands in the JAR or + // notebook until they completed, failed, timed out, were cancelled, or + // encountered an unexpected error. The duration of a task run is the sum of + // the `setup_duration`, `execution_duration`, and the `cleanup_duration`. + // The `execution_duration` field is set to 0 for multitask job runs. The + // total duration of a multitask job run is the value of the `run_duration` + // field. + ExecutionDuration types.Int64 `tfsdk:"execution_duration" tf:"optional"` + // If existing_cluster_id, the ID of an existing cluster that is used for + // all runs. When running jobs or tasks on an existing cluster, you may need + // to manually restart the cluster if it stops responding. We suggest + // running jobs and tasks on new clusters for greater reliability + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + // The task executes a nested task for every input provided when the + // `for_each_task` field is present. + ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, + // these tasks retrieve the file from the remote repository by default. + // However, this behavior can be overridden by setting `source` to + // `WORKSPACE` on the task. Note: dbt and SQL File tasks support only + // version-controlled sources. If dbt or SQL File tasks are used, + // `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // If job_cluster_key, this task is executed reusing the cluster specified + // in `job.settings.job_clusters`. + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + // An optional list of libraries to be installed on the cluster. The default + // value is an empty list. + Libraries types.List `tfsdk:"library" tf:"optional"` + // If new_cluster, a description of a new cluster that is created for each + // run. + NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + // The task runs a notebook when the `notebook_task` field is present. + NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // task run. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // The task triggers a pipeline update when the `pipeline_task` field is + // present. Only pipelines configured to use triggered more are supported. + PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + // The task runs a Python wheel when the `python_wheel_task` field is + // present. + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + // The time in milliseconds that the run has spent in the queue. + QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` + // Parameter values including resolved references + ResolvedValues types.List `tfsdk:"resolved_values" tf:"optional,object"` + // The time in milliseconds it took the job run and all of its repairs to + // finish. + RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` + // The ID of the task run. + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` + // An optional value indicating the condition that determines whether the + // task should be run once its dependencies have been completed. When + // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of + // possible values. + RunIf types.String `tfsdk:"run_if" tf:"optional"` + // The task triggers another job when the `run_job_task` field is present. + RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + + RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` + // The time in milliseconds it took to set up the cluster. For runs that run + // on new clusters this is the cluster creation time, for runs that run on + // existing clusters this time should be very short. The duration of a task + // run is the sum of the `setup_duration`, `execution_duration`, and the + // `cleanup_duration`. The `setup_duration` field is set to 0 for multitask + // job runs. The total duration of a multitask job run is the value of the + // `run_duration` field. + SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` + // The task runs a JAR when the `spark_jar_task` field is present. + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + // The task runs a Python file when the `spark_python_task` field is + // present. + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + // (Legacy) The task runs the spark-submit script when the + // `spark_submit_task` field is present. This task can run only on new + // clusters and is not compatible with serverless compute. + // + // In the `new_cluster` specification, `libraries` and `spark_conf` are not + // supported. Instead, use `--jars` and `--py-files` to add Java and Python + // libraries and `--conf` to set the Spark configurations. + // + // `master`, `deploy-mode`, and `executor-cores` are automatically + // configured by Databricks; you _cannot_ specify them in parameters. + // + // By default, the Spark submit job uses all available memory (excluding + // reserved memory for Databricks services). You can set `--driver-memory`, + // and `--executor-memory` to a smaller value to leave some room for + // off-heap usage. + // + // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 + // paths. + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + // The task runs a SQL query or file, or it refreshes a SQL alert or a + // legacy SQL dashboard when the `sql_task` field is present. + SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + // The time at which this run was started in epoch milliseconds + // (milliseconds since 1/1/1970 UTC). This may not be the time when the job + // task starts executing, for example, if the job is scheduled to run on a + // new cluster, this is the time the cluster creation call is issued. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Deprecated. Please use the `status` field instead. + State types.List `tfsdk:"state" tf:"optional,object"` + // The current status of the run + Status types.List `tfsdk:"status" tf:"optional,object"` + // A unique name for the task. This field is used to refer to this task from + // other tasks. This field is required and must be unique within its parent + // job. On Update or Reset, this field is used to reference the tasks to be + // updated or reset. + TaskKey types.String `tfsdk:"task_key" tf:""` + // An optional timeout applied to each run of this job task. A value of `0` + // means no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A collection of system notification IDs to notify when the run begins or + // completes. The default behavior is to not send any system notifications. + // Task webhooks respect the task notification settings. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTask_SdkV2) { +} + +func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cluster_instance": reflect.TypeOf(ClusterInstance_SdkV2{}), + "condition_task": reflect.TypeOf(RunConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(RunForEachTask_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "resolved_values": reflect.TypeOf(ResolvedValues_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "state": reflect.TypeOf(RunState_SdkV2{}), + "status": reflect.TypeOf(RunStatus_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, RunTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "attempt_number": o.AttemptNumber, + "cleanup_duration": o.CleanupDuration, + "cluster_instance": o.ClusterInstance, + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "depends_on": o.DependsOn, + "description": o.Description, + "email_notifications": o.EmailNotifications, + "end_time": o.EndTime, + "environment_key": o.EnvironmentKey, + "execution_duration": o.ExecutionDuration, + "existing_cluster_id": o.ExistingClusterId, + "for_each_task": o.ForEachTask, + "git_source": o.GitSource, + "job_cluster_key": o.JobClusterKey, + "library": o.Libraries, + "new_cluster": o.NewCluster, + "notebook_task": o.NotebookTask, + "notification_settings": o.NotificationSettings, + "pipeline_task": o.PipelineTask, + "python_wheel_task": o.PythonWheelTask, + "queue_duration": o.QueueDuration, + "resolved_values": o.ResolvedValues, + "run_duration": o.RunDuration, + "run_id": o.RunId, + "run_if": o.RunIf, + "run_job_task": o.RunJobTask, + "run_page_url": o.RunPageUrl, + "setup_duration": o.SetupDuration, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + "start_time": o.StartTime, + "state": o.State, + "status": o.Status, + "task_key": o.TaskKey, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "attempt_number": types.Int64Type, + "cleanup_duration": types.Int64Type, + "cluster_instance": basetypes.ListType{ + ElemType: ClusterInstance{}.Type(ctx), + }, + "condition_task": basetypes.ListType{ + ElemType: RunConditionTask{}.Type(ctx), + }, + "dbt_task": basetypes.ListType{ + ElemType: DbtTask{}.Type(ctx), + }, + "depends_on": basetypes.ListType{ + ElemType: TaskDependency{}.Type(ctx), + }, + "description": types.StringType, + "email_notifications": basetypes.ListType{ + ElemType: JobEmailNotifications{}.Type(ctx), + }, + "end_time": types.Int64Type, + "environment_key": types.StringType, + "execution_duration": types.Int64Type, + "existing_cluster_id": types.StringType, + "for_each_task": basetypes.ListType{ + ElemType: RunForEachTask{}.Type(ctx), + }, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "job_cluster_key": types.StringType, + "library": basetypes.ListType{ + ElemType: compute_tf.Library{}.Type(ctx), + }, + "new_cluster": basetypes.ListType{ + ElemType: compute_tf.ClusterSpec{}.Type(ctx), + }, + "notebook_task": basetypes.ListType{ + ElemType: NotebookTask{}.Type(ctx), + }, + "notification_settings": basetypes.ListType{ + ElemType: TaskNotificationSettings{}.Type(ctx), + }, + "pipeline_task": basetypes.ListType{ + ElemType: PipelineTask{}.Type(ctx), + }, + "python_wheel_task": basetypes.ListType{ + ElemType: PythonWheelTask{}.Type(ctx), + }, + "queue_duration": types.Int64Type, + "resolved_values": basetypes.ListType{ + ElemType: ResolvedValues{}.Type(ctx), + }, + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_if": types.StringType, + "run_job_task": basetypes.ListType{ + ElemType: RunJobTask{}.Type(ctx), + }, + "run_page_url": types.StringType, + "setup_duration": types.Int64Type, + "spark_jar_task": basetypes.ListType{ + ElemType: SparkJarTask{}.Type(ctx), + }, + "spark_python_task": basetypes.ListType{ + ElemType: SparkPythonTask{}.Type(ctx), + }, + "spark_submit_task": basetypes.ListType{ + ElemType: SparkSubmitTask{}.Type(ctx), + }, + "sql_task": basetypes.ListType{ + ElemType: SqlTask{}.Type(ctx), + }, + "start_time": types.Int64Type, + "state": basetypes.ListType{ + ElemType: RunState{}.Type(ctx), + }, + "status": basetypes.ListType{ + ElemType: RunStatus{}.Type(ctx), + }, + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetClusterInstance returns the value of the ClusterInstance field in RunTask_SdkV2 as +// a ClusterInstance_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetClusterInstance(ctx context.Context) (ClusterInstance_SdkV2, bool) { + var e ClusterInstance_SdkV2 + if o.ClusterInstance.IsNull() || o.ClusterInstance.IsUnknown() { + return e, false + } + var v []ClusterInstance_SdkV2 + d := o.ClusterInstance.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterInstance sets the value of the ClusterInstance field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetClusterInstance(ctx context.Context, v ClusterInstance_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] + o.ClusterInstance = types.ListValueMust(t, vs) +} + +// GetConditionTask returns the value of the ConditionTask field in RunTask_SdkV2 as +// a RunConditionTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetConditionTask(ctx context.Context) (RunConditionTask_SdkV2, bool) { + var e RunConditionTask_SdkV2 + if o.ConditionTask.IsNull() || o.ConditionTask.IsUnknown() { + return e, false + } + var v []RunConditionTask_SdkV2 + d := o.ConditionTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConditionTask sets the value of the ConditionTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetConditionTask(ctx context.Context, v RunConditionTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] + o.ConditionTask = types.ListValueMust(t, vs) +} + +// GetDbtTask returns the value of the DbtTask field in RunTask_SdkV2 as +// a DbtTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetDbtTask(ctx context.Context) (DbtTask_SdkV2, bool) { + var e DbtTask_SdkV2 + if o.DbtTask.IsNull() || o.DbtTask.IsUnknown() { + return e, false + } + var v []DbtTask_SdkV2 + d := o.DbtTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbtTask sets the value of the DbtTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetDbtTask(ctx context.Context, v DbtTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] + o.DbtTask = types.ListValueMust(t, vs) +} + +// GetDependsOn returns the value of the DependsOn field in RunTask_SdkV2 as +// a slice of TaskDependency_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetDependsOn(ctx context.Context) ([]TaskDependency_SdkV2, bool) { + if o.DependsOn.IsNull() || o.DependsOn.IsUnknown() { + return nil, false + } + var v []TaskDependency_SdkV2 + d := o.DependsOn.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDependsOn sets the value of the DependsOn field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetDependsOn(ctx context.Context, v []TaskDependency_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["depends_on"] + t = t.(attr.TypeWithElementType).ElementType() + o.DependsOn = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in RunTask_SdkV2 as +// a JobEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetEmailNotifications(ctx context.Context) (JobEmailNotifications_SdkV2, bool) { + var e JobEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []JobEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetEmailNotifications(ctx context.Context, v JobEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetForEachTask returns the value of the ForEachTask field in RunTask_SdkV2 as +// a RunForEachTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetForEachTask(ctx context.Context) (RunForEachTask_SdkV2, bool) { + var e RunForEachTask_SdkV2 + if o.ForEachTask.IsNull() || o.ForEachTask.IsUnknown() { + return e, false + } + var v []RunForEachTask_SdkV2 + d := o.ForEachTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForEachTask sets the value of the ForEachTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetForEachTask(ctx context.Context, v RunForEachTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] + o.ForEachTask = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in RunTask_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in RunTask_SdkV2 as +// a slice of compute_tf.Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetLibraries(ctx context.Context) ([]compute_tf.Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []compute_tf.Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetLibraries(ctx context.Context, v []compute_tf.Library_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["library"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNewCluster returns the value of the NewCluster field in RunTask_SdkV2 as +// a compute_tf.ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec_SdkV2, bool) { + var e compute_tf.ClusterSpec_SdkV2 + if o.NewCluster.IsNull() || o.NewCluster.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterSpec_SdkV2 + d := o.NewCluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewCluster sets the value of the NewCluster field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] + o.NewCluster = types.ListValueMust(t, vs) +} + +// GetNotebookTask returns the value of the NotebookTask field in RunTask_SdkV2 as +// a NotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetNotebookTask(ctx context.Context) (NotebookTask_SdkV2, bool) { + var e NotebookTask_SdkV2 + if o.NotebookTask.IsNull() || o.NotebookTask.IsUnknown() { + return e, false + } + var v []NotebookTask_SdkV2 + d := o.NotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookTask sets the value of the NotebookTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetNotebookTask(ctx context.Context, v NotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] + o.NotebookTask = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in RunTask_SdkV2 as +// a TaskNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetNotificationSettings(ctx context.Context) (TaskNotificationSettings_SdkV2, bool) { + var e TaskNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []TaskNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetPipelineTask returns the value of the PipelineTask field in RunTask_SdkV2 as +// a PipelineTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetPipelineTask(ctx context.Context) (PipelineTask_SdkV2, bool) { + var e PipelineTask_SdkV2 + if o.PipelineTask.IsNull() || o.PipelineTask.IsUnknown() { + return e, false + } + var v []PipelineTask_SdkV2 + d := o.PipelineTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineTask sets the value of the PipelineTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetPipelineTask(ctx context.Context, v PipelineTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] + o.PipelineTask = types.ListValueMust(t, vs) +} + +// GetPythonWheelTask returns the value of the PythonWheelTask field in RunTask_SdkV2 as +// a PythonWheelTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetPythonWheelTask(ctx context.Context) (PythonWheelTask_SdkV2, bool) { + var e PythonWheelTask_SdkV2 + if o.PythonWheelTask.IsNull() || o.PythonWheelTask.IsUnknown() { + return e, false + } + var v []PythonWheelTask_SdkV2 + d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPythonWheelTask sets the value of the PythonWheelTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetPythonWheelTask(ctx context.Context, v PythonWheelTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] + o.PythonWheelTask = types.ListValueMust(t, vs) +} + +// GetResolvedValues returns the value of the ResolvedValues field in RunTask_SdkV2 as +// a ResolvedValues_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetResolvedValues(ctx context.Context) (ResolvedValues_SdkV2, bool) { + var e ResolvedValues_SdkV2 + if o.ResolvedValues.IsNull() || o.ResolvedValues.IsUnknown() { + return e, false + } + var v []ResolvedValues_SdkV2 + d := o.ResolvedValues.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResolvedValues sets the value of the ResolvedValues field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetResolvedValues(ctx context.Context, v ResolvedValues_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["resolved_values"] + o.ResolvedValues = types.ListValueMust(t, vs) +} + +// GetRunJobTask returns the value of the RunJobTask field in RunTask_SdkV2 as +// a RunJobTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetRunJobTask(ctx context.Context) (RunJobTask_SdkV2, bool) { + var e RunJobTask_SdkV2 + if o.RunJobTask.IsNull() || o.RunJobTask.IsUnknown() { + return e, false + } + var v []RunJobTask_SdkV2 + d := o.RunJobTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunJobTask sets the value of the RunJobTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetRunJobTask(ctx context.Context, v RunJobTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] + o.RunJobTask = types.ListValueMust(t, vs) +} + +// GetSparkJarTask returns the value of the SparkJarTask field in RunTask_SdkV2 as +// a SparkJarTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetSparkJarTask(ctx context.Context) (SparkJarTask_SdkV2, bool) { + var e SparkJarTask_SdkV2 + if o.SparkJarTask.IsNull() || o.SparkJarTask.IsUnknown() { + return e, false + } + var v []SparkJarTask_SdkV2 + d := o.SparkJarTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkJarTask sets the value of the SparkJarTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetSparkJarTask(ctx context.Context, v SparkJarTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] + o.SparkJarTask = types.ListValueMust(t, vs) +} + +// GetSparkPythonTask returns the value of the SparkPythonTask field in RunTask_SdkV2 as +// a SparkPythonTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetSparkPythonTask(ctx context.Context) (SparkPythonTask_SdkV2, bool) { + var e SparkPythonTask_SdkV2 + if o.SparkPythonTask.IsNull() || o.SparkPythonTask.IsUnknown() { + return e, false + } + var v []SparkPythonTask_SdkV2 + d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkPythonTask sets the value of the SparkPythonTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetSparkPythonTask(ctx context.Context, v SparkPythonTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] + o.SparkPythonTask = types.ListValueMust(t, vs) +} + +// GetSparkSubmitTask returns the value of the SparkSubmitTask field in RunTask_SdkV2 as +// a SparkSubmitTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask_SdkV2, bool) { + var e SparkSubmitTask_SdkV2 + if o.SparkSubmitTask.IsNull() || o.SparkSubmitTask.IsUnknown() { + return e, false + } + var v []SparkSubmitTask_SdkV2 + d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkSubmitTask sets the value of the SparkSubmitTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] + o.SparkSubmitTask = types.ListValueMust(t, vs) +} + +// GetSqlTask returns the value of the SqlTask field in RunTask_SdkV2 as +// a SqlTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetSqlTask(ctx context.Context) (SqlTask_SdkV2, bool) { + var e SqlTask_SdkV2 + if o.SqlTask.IsNull() || o.SqlTask.IsUnknown() { + return e, false + } + var v []SqlTask_SdkV2 + d := o.SqlTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlTask sets the value of the SqlTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetSqlTask(ctx context.Context, v SqlTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] + o.SqlTask = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in RunTask_SdkV2 as +// a RunState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetState(ctx context.Context) (RunState_SdkV2, bool) { + var e RunState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []RunState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetState(ctx context.Context, v RunState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in RunTask_SdkV2 as +// a RunStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetStatus(ctx context.Context) (RunStatus_SdkV2, bool) { + var e RunStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []RunStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetStatus(ctx context.Context, v RunStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in RunTask_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +type SparkJarTask_SdkV2 struct { + // Deprecated since 04/2016. Provide a `jar` through the `libraries` field + // instead. For an example, see :method:jobs/create. + JarUri types.String `tfsdk:"jar_uri" tf:"optional"` + // The full name of the class containing the main method to be executed. + // This class must be contained in a JAR provided as a library. + // + // The code must use `SparkContext.getOrCreate` to obtain a Spark context; + // otherwise, runs of the job fail. + MainClassName types.String `tfsdk:"main_class_name" tf:"optional"` + // Parameters passed to the main method. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *SparkJarTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkJarTask_SdkV2) { +} + +func (newState *SparkJarTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkJarTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkJarTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkJarTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, SparkJarTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkJarTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "jar_uri": o.JarUri, + "main_class_name": o.MainClassName, + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkJarTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "jar_uri": types.StringType, + "main_class_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetParameters returns the value of the Parameters field in SparkJarTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SparkJarTask_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in SparkJarTask_SdkV2. +func (o *SparkJarTask_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type SparkPythonTask_SdkV2 struct { + // Command line parameters passed to the Python file. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, + // adls:/, gcs:/) and workspace paths are supported. For python files stored + // in the Databricks workspace, the path must be absolute and begin with + // `/`. For files stored in a remote repository, the path must be relative. + // This field is required. + PythonFile types.String `tfsdk:"python_file" tf:""` + // Optional location type of the Python file. When set to `WORKSPACE` or not + // specified, the file will be retrieved from the local Databricks workspace + // or cloud location (if the `python_file` has a URI format). When set to + // `GIT`, the Python file will be retrieved from a Git repository defined in + // `git_source`. + // + // * `WORKSPACE`: The Python file is located in a Databricks workspace or at + // a cloud filesystem URI. * `GIT`: The Python file is located in a remote + // Git repository. + Source types.String `tfsdk:"source" tf:"optional"` +} + +func (newState *SparkPythonTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkPythonTask_SdkV2) { +} + +func (newState *SparkPythonTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkPythonTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkPythonTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkPythonTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, SparkPythonTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkPythonTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parameters": o.Parameters, + "python_file": o.PythonFile, + "source": o.Source, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkPythonTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + "python_file": types.StringType, + "source": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in SparkPythonTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SparkPythonTask_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in SparkPythonTask_SdkV2. +func (o *SparkPythonTask_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type SparkSubmitTask_SdkV2 struct { + // Command-line parameters passed to spark submit. + // + // Use [Task parameter variables] to set parameters containing information + // about job runs. + // + // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables + Parameters types.List `tfsdk:"parameters" tf:"optional"` +} + +func (newState *SparkSubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparkSubmitTask_SdkV2) { +} + +func (newState *SparkSubmitTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparkSubmitTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparkSubmitTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparkSubmitTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, SparkSubmitTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparkSubmitTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "parameters": o.Parameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparkSubmitTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "parameters": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetParameters returns the value of the Parameters field in SparkSubmitTask_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SparkSubmitTask_SdkV2) GetParameters(ctx context.Context) ([]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in SparkSubmitTask_SdkV2. +func (o *SparkSubmitTask_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +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" tf:"optional"` + // The link to find the output results. + OutputLink types.String `tfsdk:"output_link" tf:"optional"` + // The text of the SQL query. Can Run permission of the SQL query associated + // with the SQL alert is required to view this field. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Information about SQL statements executed in the run. + SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + // The canonical identifier of the SQL warehouse. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *SqlAlertOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlAlertOutput_SdkV2) { +} + +func (newState *SqlAlertOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlAlertOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlAlertOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlAlertOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sql_statements": reflect.TypeOf(SqlStatementOutput_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, SqlAlertOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlAlertOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_state": o.AlertState, + "output_link": o.OutputLink, + "query_text": o.QueryText, + "sql_statements": o.SqlStatements, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlAlertOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_state": types.StringType, + "output_link": types.StringType, + "query_text": types.StringType, + "sql_statements": basetypes.ListType{ + ElemType: SqlStatementOutput{}.Type(ctx), + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetSqlStatements returns the value of the SqlStatements field in SqlAlertOutput_SdkV2 as +// a slice of SqlStatementOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlAlertOutput_SdkV2) GetSqlStatements(ctx context.Context) ([]SqlStatementOutput_SdkV2, bool) { + if o.SqlStatements.IsNull() || o.SqlStatements.IsUnknown() { + return nil, false + } + var v []SqlStatementOutput_SdkV2 + d := o.SqlStatements.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlStatements sets the value of the SqlStatements field in SqlAlertOutput_SdkV2. +func (o *SqlAlertOutput_SdkV2) SetSqlStatements(ctx context.Context, v []SqlStatementOutput_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["sql_statements"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlStatements = types.ListValueMust(t, vs) +} + +type SqlDashboardOutput_SdkV2 struct { + // The canonical identifier of the SQL warehouse. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` + // Widgets executed in the run. Only SQL query based widgets are listed. + Widgets types.List `tfsdk:"widgets" tf:"optional"` +} + +func (newState *SqlDashboardOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardOutput_SdkV2) { +} + +func (newState *SqlDashboardOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlDashboardOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlDashboardOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "widgets": reflect.TypeOf(SqlDashboardWidgetOutput_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, SqlDashboardOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlDashboardOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + "widgets": o.Widgets, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlDashboardOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "warehouse_id": types.StringType, + "widgets": basetypes.ListType{ + ElemType: SqlDashboardWidgetOutput{}.Type(ctx), + }, + }, + } +} + +// GetWidgets returns the value of the Widgets field in SqlDashboardOutput_SdkV2 as +// a slice of SqlDashboardWidgetOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlDashboardOutput_SdkV2) GetWidgets(ctx context.Context) ([]SqlDashboardWidgetOutput_SdkV2, bool) { + if o.Widgets.IsNull() || o.Widgets.IsUnknown() { + return nil, false + } + var v []SqlDashboardWidgetOutput_SdkV2 + d := o.Widgets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWidgets sets the value of the Widgets field in SqlDashboardOutput_SdkV2. +func (o *SqlDashboardOutput_SdkV2) SetWidgets(ctx context.Context, v []SqlDashboardWidgetOutput_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["widgets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Widgets = types.ListValueMust(t, vs) +} + +type SqlDashboardWidgetOutput_SdkV2 struct { + // Time (in epoch milliseconds) when execution of the SQL widget ends. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The information about the error when execution fails. + Error types.List `tfsdk:"error" tf:"optional,object"` + // The link to find the output results. + OutputLink types.String `tfsdk:"output_link" tf:"optional"` + // Time (in epoch milliseconds) when execution of the SQL widget starts. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // The execution status of the SQL widget. + Status types.String `tfsdk:"status" tf:"optional"` + // The canonical identifier of the SQL widget. + WidgetId types.String `tfsdk:"widget_id" tf:"optional"` + // The title of the SQL widget. + WidgetTitle types.String `tfsdk:"widget_title" tf:"optional"` +} + +func (newState *SqlDashboardWidgetOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlDashboardWidgetOutput_SdkV2) { +} + +func (newState *SqlDashboardWidgetOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlDashboardWidgetOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlDashboardWidgetOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlDashboardWidgetOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "error": reflect.TypeOf(SqlOutputError_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, SqlDashboardWidgetOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlDashboardWidgetOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_time": o.EndTime, + "error": o.Error, + "output_link": o.OutputLink, + "start_time": o.StartTime, + "status": o.Status, + "widget_id": o.WidgetId, + "widget_title": o.WidgetTitle, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlDashboardWidgetOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_time": types.Int64Type, + "error": basetypes.ListType{ + ElemType: SqlOutputError{}.Type(ctx), + }, + "output_link": types.StringType, + "start_time": types.Int64Type, + "status": types.StringType, + "widget_id": types.StringType, + "widget_title": types.StringType, + }, + } +} + +// GetError returns the value of the Error field in SqlDashboardWidgetOutput_SdkV2 as +// a SqlOutputError_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlDashboardWidgetOutput_SdkV2) GetError(ctx context.Context) (SqlOutputError_SdkV2, bool) { + var e SqlOutputError_SdkV2 + if o.Error.IsNull() || o.Error.IsUnknown() { + return e, false + } + var v []SqlOutputError_SdkV2 + d := o.Error.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetError sets the value of the Error field in SqlDashboardWidgetOutput_SdkV2. +func (o *SqlDashboardWidgetOutput_SdkV2) SetError(ctx context.Context, v SqlOutputError_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] + o.Error = types.ListValueMust(t, vs) +} + +type SqlOutput_SdkV2 struct { + // The output of a SQL alert task, if available. + AlertOutput types.List `tfsdk:"alert_output" tf:"optional,object"` + // The output of a SQL dashboard task, if available. + DashboardOutput types.List `tfsdk:"dashboard_output" tf:"optional,object"` + // The output of a SQL query task, if available. + QueryOutput types.List `tfsdk:"query_output" tf:"optional,object"` +} + +func (newState *SqlOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutput_SdkV2) { +} + +func (newState *SqlOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert_output": reflect.TypeOf(SqlAlertOutput_SdkV2{}), + "dashboard_output": reflect.TypeOf(SqlDashboardOutput_SdkV2{}), + "query_output": reflect.TypeOf(SqlQueryOutput_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, SqlOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_output": o.AlertOutput, + "dashboard_output": o.DashboardOutput, + "query_output": o.QueryOutput, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_output": basetypes.ListType{ + ElemType: SqlAlertOutput{}.Type(ctx), + }, + "dashboard_output": basetypes.ListType{ + ElemType: SqlDashboardOutput{}.Type(ctx), + }, + "query_output": basetypes.ListType{ + ElemType: SqlQueryOutput{}.Type(ctx), + }, + }, + } +} + +// GetAlertOutput returns the value of the AlertOutput field in SqlOutput_SdkV2 as +// a SqlAlertOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlOutput_SdkV2) GetAlertOutput(ctx context.Context) (SqlAlertOutput_SdkV2, bool) { + var e SqlAlertOutput_SdkV2 + if o.AlertOutput.IsNull() || o.AlertOutput.IsUnknown() { + return e, false + } + var v []SqlAlertOutput_SdkV2 + d := o.AlertOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAlertOutput sets the value of the AlertOutput field in SqlOutput_SdkV2. +func (o *SqlOutput_SdkV2) SetAlertOutput(ctx context.Context, v SqlAlertOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert_output"] + o.AlertOutput = types.ListValueMust(t, vs) +} + +// GetDashboardOutput returns the value of the DashboardOutput field in SqlOutput_SdkV2 as +// a SqlDashboardOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlOutput_SdkV2) GetDashboardOutput(ctx context.Context) (SqlDashboardOutput_SdkV2, bool) { + var e SqlDashboardOutput_SdkV2 + if o.DashboardOutput.IsNull() || o.DashboardOutput.IsUnknown() { + return e, false + } + var v []SqlDashboardOutput_SdkV2 + d := o.DashboardOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDashboardOutput sets the value of the DashboardOutput field in SqlOutput_SdkV2. +func (o *SqlOutput_SdkV2) SetDashboardOutput(ctx context.Context, v SqlDashboardOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard_output"] + o.DashboardOutput = types.ListValueMust(t, vs) +} + +// GetQueryOutput returns the value of the QueryOutput field in SqlOutput_SdkV2 as +// a SqlQueryOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlOutput_SdkV2) GetQueryOutput(ctx context.Context) (SqlQueryOutput_SdkV2, bool) { + var e SqlQueryOutput_SdkV2 + if o.QueryOutput.IsNull() || o.QueryOutput.IsUnknown() { + return e, false + } + var v []SqlQueryOutput_SdkV2 + d := o.QueryOutput.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueryOutput sets the value of the QueryOutput field in SqlOutput_SdkV2. +func (o *SqlOutput_SdkV2) SetQueryOutput(ctx context.Context, v SqlQueryOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_output"] + o.QueryOutput = types.ListValueMust(t, vs) +} + +type SqlOutputError_SdkV2 struct { + // The error message when execution fails. + Message types.String `tfsdk:"message" tf:"optional"` +} + +func (newState *SqlOutputError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutputError_SdkV2) { +} + +func (newState *SqlOutputError_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlOutputError_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlOutputError. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlOutputError_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, SqlOutputError_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlOutputError_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlOutputError_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + }, + } +} + +type SqlQueryOutput_SdkV2 struct { + EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + // The link to find the output results. + OutputLink types.String `tfsdk:"output_link" tf:"optional"` + // The text of the SQL query. Can Run permission of the SQL query is + // required to view this field. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Information about SQL statements executed in the run. + SqlStatements types.List `tfsdk:"sql_statements" tf:"optional"` + // The canonical identifier of the SQL warehouse. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *SqlQueryOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlQueryOutput_SdkV2) { +} + +func (newState *SqlQueryOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlQueryOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlQueryOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlQueryOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sql_statements": reflect.TypeOf(SqlStatementOutput_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, SqlQueryOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlQueryOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_id": o.EndpointId, + "output_link": o.OutputLink, + "query_text": o.QueryText, + "sql_statements": o.SqlStatements, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlQueryOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_id": types.StringType, + "output_link": types.StringType, + "query_text": types.StringType, + "sql_statements": basetypes.ListType{ + ElemType: SqlStatementOutput{}.Type(ctx), + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetSqlStatements returns the value of the SqlStatements field in SqlQueryOutput_SdkV2 as +// a slice of SqlStatementOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlQueryOutput_SdkV2) GetSqlStatements(ctx context.Context) ([]SqlStatementOutput_SdkV2, bool) { + if o.SqlStatements.IsNull() || o.SqlStatements.IsUnknown() { + return nil, false + } + var v []SqlStatementOutput_SdkV2 + d := o.SqlStatements.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSqlStatements sets the value of the SqlStatements field in SqlQueryOutput_SdkV2. +func (o *SqlQueryOutput_SdkV2) SetSqlStatements(ctx context.Context, v []SqlStatementOutput_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["sql_statements"] + t = t.(attr.TypeWithElementType).ElementType() + o.SqlStatements = types.ListValueMust(t, vs) +} + +type SqlStatementOutput_SdkV2 struct { + // A key that can be used to look up query details. + LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` +} + +func (newState *SqlStatementOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlStatementOutput_SdkV2) { +} + +func (newState *SqlStatementOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlStatementOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlStatementOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlStatementOutput_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, SqlStatementOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlStatementOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "lookup_key": o.LookupKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlStatementOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "lookup_key": types.StringType, + }, + } +} + +type SqlTask_SdkV2 struct { + // If alert, indicates that this job must refresh a SQL alert. + Alert types.List `tfsdk:"alert" tf:"optional,object"` + // If dashboard, indicates that this job must refresh a SQL dashboard. + Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + // If file, indicates that this job runs a SQL file in a remote Git + // repository. + File types.List `tfsdk:"file" tf:"optional,object"` + // Parameters to be used for each run of this job. The SQL alert task does + // not support custom parameters. + Parameters types.Map `tfsdk:"parameters" tf:"optional"` + // If query, indicates that this job must execute a SQL query. + Query types.List `tfsdk:"query" tf:"optional,object"` + // The canonical identifier of the SQL warehouse. Recommended to use with + // serverless or pro SQL warehouses. Classic SQL warehouses are only + // supported for SQL alert, dashboard and query tasks and are limited to + // scheduled single-task jobs. + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` +} + +func (newState *SqlTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTask_SdkV2) { +} + +func (newState *SqlTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert": reflect.TypeOf(SqlTaskAlert_SdkV2{}), + "dashboard": reflect.TypeOf(SqlTaskDashboard_SdkV2{}), + "file": reflect.TypeOf(SqlTaskFile_SdkV2{}), + "parameters": reflect.TypeOf(types.String{}), + "query": reflect.TypeOf(SqlTaskQuery_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, SqlTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert": o.Alert, + "dashboard": o.Dashboard, + "file": o.File, + "parameters": o.Parameters, + "query": o.Query, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert": basetypes.ListType{ + ElemType: SqlTaskAlert{}.Type(ctx), + }, + "dashboard": basetypes.ListType{ + ElemType: SqlTaskDashboard{}.Type(ctx), + }, + "file": basetypes.ListType{ + ElemType: SqlTaskFile{}.Type(ctx), + }, + "parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "query": basetypes.ListType{ + ElemType: SqlTaskQuery{}.Type(ctx), + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetAlert returns the value of the Alert field in SqlTask_SdkV2 as +// a SqlTaskAlert_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTask_SdkV2) GetAlert(ctx context.Context) (SqlTaskAlert_SdkV2, bool) { + var e SqlTaskAlert_SdkV2 + if o.Alert.IsNull() || o.Alert.IsUnknown() { + return e, false + } + var v []SqlTaskAlert_SdkV2 + d := o.Alert.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAlert sets the value of the Alert field in SqlTask_SdkV2. +func (o *SqlTask_SdkV2) SetAlert(ctx context.Context, v SqlTaskAlert_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] + o.Alert = types.ListValueMust(t, vs) +} + +// GetDashboard returns the value of the Dashboard field in SqlTask_SdkV2 as +// a SqlTaskDashboard_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTask_SdkV2) GetDashboard(ctx context.Context) (SqlTaskDashboard_SdkV2, bool) { + var e SqlTaskDashboard_SdkV2 + if o.Dashboard.IsNull() || o.Dashboard.IsUnknown() { + return e, false + } + var v []SqlTaskDashboard_SdkV2 + d := o.Dashboard.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDashboard sets the value of the Dashboard field in SqlTask_SdkV2. +func (o *SqlTask_SdkV2) SetDashboard(ctx context.Context, v SqlTaskDashboard_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] + o.Dashboard = types.ListValueMust(t, vs) +} + +// GetFile returns the value of the File field in SqlTask_SdkV2 as +// a SqlTaskFile_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTask_SdkV2) GetFile(ctx context.Context) (SqlTaskFile_SdkV2, bool) { + var e SqlTaskFile_SdkV2 + if o.File.IsNull() || o.File.IsUnknown() { + return e, false + } + var v []SqlTaskFile_SdkV2 + d := o.File.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFile sets the value of the File field in SqlTask_SdkV2. +func (o *SqlTask_SdkV2) SetFile(ctx context.Context, v SqlTaskFile_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] + o.File = types.ListValueMust(t, vs) +} + +// GetParameters returns the value of the Parameters field in SqlTask_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 *SqlTask_SdkV2) GetParameters(ctx context.Context) (map[string]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in SqlTask_SdkV2. +func (o *SqlTask_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.MapValueMust(t, vs) +} + +// GetQuery returns the value of the Query field in SqlTask_SdkV2 as +// a SqlTaskQuery_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTask_SdkV2) GetQuery(ctx context.Context) (SqlTaskQuery_SdkV2, bool) { + var e SqlTaskQuery_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []SqlTaskQuery_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in SqlTask_SdkV2. +func (o *SqlTask_SdkV2) SetQuery(ctx context.Context, v SqlTaskQuery_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +type SqlTaskAlert_SdkV2 struct { + // The canonical identifier of the SQL alert. + AlertId types.String `tfsdk:"alert_id" tf:""` + // If true, the alert notifications are not sent to subscribers. + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + // If specified, alert notifications are sent to subscribers. + Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` +} + +func (newState *SqlTaskAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskAlert_SdkV2) { +} + +func (newState *SqlTaskAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskAlert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskAlert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTaskAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscriptions": reflect.TypeOf(SqlTaskSubscription_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, SqlTaskAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTaskAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_id": o.AlertId, + "pause_subscriptions": o.PauseSubscriptions, + "subscriptions": o.Subscriptions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTaskAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_id": types.StringType, + "pause_subscriptions": types.BoolType, + "subscriptions": basetypes.ListType{ + ElemType: SqlTaskSubscription{}.Type(ctx), + }, + }, + } +} + +// GetSubscriptions returns the value of the Subscriptions field in SqlTaskAlert_SdkV2 as +// a slice of SqlTaskSubscription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTaskAlert_SdkV2) GetSubscriptions(ctx context.Context) ([]SqlTaskSubscription_SdkV2, bool) { + if o.Subscriptions.IsNull() || o.Subscriptions.IsUnknown() { + return nil, false + } + var v []SqlTaskSubscription_SdkV2 + d := o.Subscriptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubscriptions sets the value of the Subscriptions field in SqlTaskAlert_SdkV2. +func (o *SqlTaskAlert_SdkV2) SetSubscriptions(ctx context.Context, v []SqlTaskSubscription_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["subscriptions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Subscriptions = types.ListValueMust(t, vs) +} + +type SqlTaskDashboard_SdkV2 struct { + // Subject of the email sent to subscribers of this task. + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // The canonical identifier of the SQL dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:""` + // If true, the dashboard snapshot is not taken, and emails are not sent to + // subscribers. + PauseSubscriptions types.Bool `tfsdk:"pause_subscriptions" tf:"optional"` + // If specified, dashboard snapshots are sent to subscriptions. + Subscriptions types.List `tfsdk:"subscriptions" tf:"optional"` +} + +func (newState *SqlTaskDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskDashboard_SdkV2) { +} + +func (newState *SqlTaskDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskDashboard_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskDashboard. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTaskDashboard_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscriptions": reflect.TypeOf(SqlTaskSubscription_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, SqlTaskDashboard_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTaskDashboard_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "custom_subject": o.CustomSubject, + "dashboard_id": o.DashboardId, + "pause_subscriptions": o.PauseSubscriptions, + "subscriptions": o.Subscriptions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTaskDashboard_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "custom_subject": types.StringType, + "dashboard_id": types.StringType, + "pause_subscriptions": types.BoolType, + "subscriptions": basetypes.ListType{ + ElemType: SqlTaskSubscription{}.Type(ctx), + }, + }, + } +} + +// GetSubscriptions returns the value of the Subscriptions field in SqlTaskDashboard_SdkV2 as +// a slice of SqlTaskSubscription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SqlTaskDashboard_SdkV2) GetSubscriptions(ctx context.Context) ([]SqlTaskSubscription_SdkV2, bool) { + if o.Subscriptions.IsNull() || o.Subscriptions.IsUnknown() { + return nil, false + } + var v []SqlTaskSubscription_SdkV2 + d := o.Subscriptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubscriptions sets the value of the Subscriptions field in SqlTaskDashboard_SdkV2. +func (o *SqlTaskDashboard_SdkV2) SetSubscriptions(ctx context.Context, v []SqlTaskSubscription_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["subscriptions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Subscriptions = types.ListValueMust(t, vs) +} + +type SqlTaskFile_SdkV2 struct { + // Path of the SQL file. Must be relative if the source is a remote Git + // repository and absolute for workspace paths. + Path types.String `tfsdk:"path" tf:""` + // Optional location type of the SQL file. When set to `WORKSPACE`, the SQL + // file will be retrieved from the local Databricks workspace. When set to + // `GIT`, the SQL file will be retrieved from a Git repository defined in + // `git_source`. If the value is empty, the task will use `GIT` if + // `git_source` is defined and `WORKSPACE` otherwise. + // + // * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL + // file is located in cloud Git provider. + Source types.String `tfsdk:"source" tf:"optional"` +} + +func (newState *SqlTaskFile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskFile_SdkV2) { +} + +func (newState *SqlTaskFile_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskFile_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskFile. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTaskFile_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, SqlTaskFile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTaskFile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + "source": o.Source, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTaskFile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + "source": types.StringType, + }, + } +} + +type SqlTaskQuery_SdkV2 struct { + // The canonical identifier of the SQL query. + QueryId types.String `tfsdk:"query_id" tf:""` +} + +func (newState *SqlTaskQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskQuery_SdkV2) { +} + +func (newState *SqlTaskQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTaskQuery_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, SqlTaskQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTaskQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_id": o.QueryId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTaskQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_id": types.StringType, + }, + } +} + +type SqlTaskSubscription_SdkV2 struct { + // The canonical identifier of the destination to receive email + // notification. This parameter is mutually exclusive with user_name. You + // cannot set both destination_id and user_name for subscription + // notifications. + DestinationId types.String `tfsdk:"destination_id" tf:"optional"` + // The user name to receive the subscription email. This parameter is + // mutually exclusive with destination_id. You cannot set both + // destination_id and user_name for subscription notifications. + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *SqlTaskSubscription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlTaskSubscription_SdkV2) { +} + +func (newState *SqlTaskSubscription_SdkV2) SyncEffectiveFieldsDuringRead(existingState SqlTaskSubscription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SqlTaskSubscription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SqlTaskSubscription_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, SqlTaskSubscription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SqlTaskSubscription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_id": o.DestinationId, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SqlTaskSubscription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_id": types.StringType, + "user_name": types.StringType, + }, + } +} + +type SubmitRun_SdkV2 struct { + // List of permissions to set on the job. + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The user specified id of the budget policy to use for this one-time run. + // If not specified, the run will be not be attributed to any budget policy. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // An optional set of email addresses notified when the run begins or + // completes. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // A list of task execution environment specifications that can be + // referenced by tasks of this run. + Environments types.List `tfsdk:"environments" tf:"optional"` + // An optional specification for a remote Git repository containing the + // source code used by tasks. Version-controlled source code is supported by + // notebook, dbt, Python script, and SQL File tasks. + // + // If `git_source` is set, these tasks retrieve the file from the remote + // repository by default. However, this behavior can be overridden by + // setting `source` to `WORKSPACE` on the task. + // + // Note: dbt and SQL File tasks support only version-controlled sources. If + // dbt or SQL File tasks are used, `git_source` must be defined on the job. + GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health" tf:"optional,object"` + // An optional token that can be used to guarantee the idempotency of job + // run requests. If a run with the provided token already exists, the + // request does not create a new run but returns the ID of the existing run + // instead. If a run with the provided token is deleted, an error is + // returned. + // + // If you specify the idempotency token, upon failure you can retry until + // the request succeeds. Databricks guarantees that exactly one run is + // launched with that idempotency token. + // + // This token must have at most 64 characters. + // + // For more information, see [How to ensure idempotency for jobs]. + // + // [How to ensure idempotency for jobs]: https://kb.databricks.com/jobs/jobs-idempotency.html + IdempotencyToken types.String `tfsdk:"idempotency_token" tf:"optional"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // run. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // The queue settings of the one-time run. + Queue types.List `tfsdk:"queue" tf:"optional,object"` + // Specifies the user or service principal that the job runs as. If not + // specified, the job runs as the user who submits the request. + RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + // An optional name for the run. The default value is `Untitled`. + RunName types.String `tfsdk:"run_name" tf:"optional"` + + Tasks types.List `tfsdk:"tasks" tf:"optional"` + // An optional timeout applied to each run of this job. A value of `0` means + // no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A collection of system notification IDs to notify when the run begins or + // completes. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun_SdkV2) { +} + +func (newState *SubmitRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SubmitRun_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(JobAccessControlRequest_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "environments": reflect.TypeOf(JobEnvironment_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "notification_settings": reflect.TypeOf(JobNotificationSettings_SdkV2{}), + "queue": reflect.TypeOf(QueueSettings_SdkV2{}), + "run_as": reflect.TypeOf(JobRunAs_SdkV2{}), + "tasks": reflect.TypeOf(SubmitTask_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, SubmitRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SubmitRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "budget_policy_id": o.BudgetPolicyId, + "email_notifications": o.EmailNotifications, + "environments": o.Environments, + "git_source": o.GitSource, + "health": o.Health, + "idempotency_token": o.IdempotencyToken, + "notification_settings": o.NotificationSettings, + "queue": o.Queue, + "run_as": o.RunAs, + "run_name": o.RunName, + "tasks": o.Tasks, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SubmitRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: JobAccessControlRequest{}.Type(ctx), + }, + "budget_policy_id": types.StringType, + "email_notifications": basetypes.ListType{ + ElemType: JobEmailNotifications{}.Type(ctx), + }, + "environments": basetypes.ListType{ + ElemType: JobEnvironment{}.Type(ctx), + }, + "git_source": basetypes.ListType{ + ElemType: GitSource{}.Type(ctx), + }, + "health": basetypes.ListType{ + ElemType: JobsHealthRules{}.Type(ctx), + }, + "idempotency_token": types.StringType, + "notification_settings": basetypes.ListType{ + ElemType: JobNotificationSettings{}.Type(ctx), + }, + "queue": basetypes.ListType{ + ElemType: QueueSettings{}.Type(ctx), + }, + "run_as": basetypes.ListType{ + ElemType: JobRunAs{}.Type(ctx), + }, + "run_name": types.StringType, + "tasks": basetypes.ListType{ + ElemType: SubmitTask{}.Type(ctx), + }, + "timeout_seconds": types.Int64Type, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in SubmitRun_SdkV2 as +// a slice of JobAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetAccessControlList(ctx context.Context) ([]JobAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []JobAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetAccessControlList(ctx context.Context, v []JobAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in SubmitRun_SdkV2 as +// a JobEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetEmailNotifications(ctx context.Context) (JobEmailNotifications_SdkV2, bool) { + var e JobEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []JobEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetEmailNotifications(ctx context.Context, v JobEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetEnvironments returns the value of the Environments field in SubmitRun_SdkV2 as +// a slice of JobEnvironment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetEnvironments(ctx context.Context) ([]JobEnvironment_SdkV2, bool) { + if o.Environments.IsNull() || o.Environments.IsUnknown() { + return nil, false + } + var v []JobEnvironment_SdkV2 + d := o.Environments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironments sets the value of the Environments field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetEnvironments(ctx context.Context, v []JobEnvironment_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["environments"] + t = t.(attr.TypeWithElementType).ElementType() + o.Environments = types.ListValueMust(t, vs) +} + +// GetGitSource returns the value of the GitSource field in SubmitRun_SdkV2 as +// a GitSource_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetGitSource(ctx context.Context) (GitSource_SdkV2, bool) { + var e GitSource_SdkV2 + if o.GitSource.IsNull() || o.GitSource.IsUnknown() { + return e, false + } + var v []GitSource_SdkV2 + d := o.GitSource.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitSource sets the value of the GitSource field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetGitSource(ctx context.Context, v GitSource_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] + o.GitSource = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in SubmitRun_SdkV2 as +// a JobsHealthRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetHealth(ctx context.Context) (JobsHealthRules_SdkV2, bool) { + var e JobsHealthRules_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []JobsHealthRules_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetHealth(ctx context.Context, v JobsHealthRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in SubmitRun_SdkV2 as +// a JobNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetNotificationSettings(ctx context.Context) (JobNotificationSettings_SdkV2, bool) { + var e JobNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []JobNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetNotificationSettings(ctx context.Context, v JobNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetQueue returns the value of the Queue field in SubmitRun_SdkV2 as +// a QueueSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetQueue(ctx context.Context) (QueueSettings_SdkV2, bool) { + var e QueueSettings_SdkV2 + if o.Queue.IsNull() || o.Queue.IsUnknown() { + return e, false + } + var v []QueueSettings_SdkV2 + d := o.Queue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueue sets the value of the Queue field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetQueue(ctx context.Context, v QueueSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] + o.Queue = types.ListValueMust(t, vs) +} + +// GetRunAs returns the value of the RunAs field in SubmitRun_SdkV2 as +// a JobRunAs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetRunAs(ctx context.Context) (JobRunAs_SdkV2, bool) { + var e JobRunAs_SdkV2 + if o.RunAs.IsNull() || o.RunAs.IsUnknown() { + return e, false + } + var v []JobRunAs_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 SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetRunAs(ctx context.Context, v JobRunAs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] + o.RunAs = types.ListValueMust(t, vs) +} + +// GetTasks returns the value of the Tasks field in SubmitRun_SdkV2 as +// a slice of SubmitTask_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetTasks(ctx context.Context) ([]SubmitTask_SdkV2, bool) { + if o.Tasks.IsNull() || o.Tasks.IsUnknown() { + return nil, false + } + var v []SubmitTask_SdkV2 + d := o.Tasks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTasks sets the value of the Tasks field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetTasks(ctx context.Context, v []SubmitTask_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["tasks"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tasks = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in SubmitRun_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitRun_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in SubmitRun_SdkV2. +func (o *SubmitRun_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +// Run was created and started successfully. +type SubmitRunResponse_SdkV2 struct { + // The canonical identifier for the newly submitted run. + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` +} + +func (newState *SubmitRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRunResponse_SdkV2) { +} + +func (newState *SubmitRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SubmitRunResponse_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, SubmitRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SubmitRunResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SubmitRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +type SubmitTask_SdkV2 struct { + // The task evaluates a condition that can be used to control the execution + // of other tasks when the `condition_task` field is present. The condition + // task does not require a cluster to execute and does not support retries + // or notifications. + ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + // The task runs one or more dbt commands when the `dbt_task` field is + // present. The dbt task requires both Databricks SQL and the ability to use + // a serverless or a pro SQL warehouse. + DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + // An optional array of objects specifying the dependency graph of the task. + // All tasks specified in this field must complete successfully before + // executing this task. The key is `task_key`, and the value is the name + // assigned to the dependent task. + DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + // An optional description for this task. + Description types.String `tfsdk:"description" tf:"optional"` + // An optional set of email addresses notified when the task run begins or + // completes. The default behavior is to not send any emails. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // The key that references an environment spec in a job. This field is + // required for Python script, Python wheel and dbt tasks when using + // serverless compute. + EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + // If existing_cluster_id, the ID of an existing cluster that is used for + // all runs. When running jobs or tasks on an existing cluster, you may need + // to manually restart the cluster if it stops responding. We suggest + // running jobs and tasks on new clusters for greater reliability + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + // The task executes a nested task for every input provided when the + // `for_each_task` field is present. + ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health" tf:"optional,object"` + // An optional list of libraries to be installed on the cluster. The default + // value is an empty list. + Libraries types.List `tfsdk:"library" tf:"optional"` + // If new_cluster, a description of a new cluster that is created for each + // run. + NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + // The task runs a notebook when the `notebook_task` field is present. + NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // task run. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // The task triggers a pipeline update when the `pipeline_task` field is + // present. Only pipelines configured to use triggered more are supported. + PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + // The task runs a Python wheel when the `python_wheel_task` field is + // present. + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + // An optional value indicating the condition that determines whether the + // task should be run once its dependencies have been completed. When + // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of + // possible values. + RunIf types.String `tfsdk:"run_if" tf:"optional"` + // The task triggers another job when the `run_job_task` field is present. + RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + // The task runs a JAR when the `spark_jar_task` field is present. + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + // The task runs a Python file when the `spark_python_task` field is + // present. + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + // (Legacy) The task runs the spark-submit script when the + // `spark_submit_task` field is present. This task can run only on new + // clusters and is not compatible with serverless compute. + // + // In the `new_cluster` specification, `libraries` and `spark_conf` are not + // supported. Instead, use `--jars` and `--py-files` to add Java and Python + // libraries and `--conf` to set the Spark configurations. + // + // `master`, `deploy-mode`, and `executor-cores` are automatically + // configured by Databricks; you _cannot_ specify them in parameters. + // + // By default, the Spark submit job uses all available memory (excluding + // reserved memory for Databricks services). You can set `--driver-memory`, + // and `--executor-memory` to a smaller value to leave some room for + // off-heap usage. + // + // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 + // paths. + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + // The task runs a SQL query or file, or it refreshes a SQL alert or a + // legacy SQL dashboard when the `sql_task` field is present. + SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + // A unique name for the task. This field is used to refer to this task from + // other tasks. This field is required and must be unique within its parent + // job. On Update or Reset, this field is used to reference the tasks to be + // updated or reset. + TaskKey types.String `tfsdk:"task_key" tf:""` + // An optional timeout applied to each run of this job task. A value of `0` + // means no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A collection of system notification IDs to notify when the run begins or + // completes. The default behavior is to not send any system notifications. + // Task webhooks respect the task notification settings. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitTask_SdkV2) { +} + +func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState SubmitTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SubmitTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SubmitTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, SubmitTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SubmitTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "depends_on": o.DependsOn, + "description": o.Description, + "email_notifications": o.EmailNotifications, + "environment_key": o.EnvironmentKey, + "existing_cluster_id": o.ExistingClusterId, + "for_each_task": o.ForEachTask, + "health": o.Health, + "library": o.Libraries, + "new_cluster": o.NewCluster, + "notebook_task": o.NotebookTask, + "notification_settings": o.NotificationSettings, + "pipeline_task": o.PipelineTask, + "python_wheel_task": o.PythonWheelTask, + "run_if": o.RunIf, + "run_job_task": o.RunJobTask, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + "task_key": o.TaskKey, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SubmitTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition_task": basetypes.ListType{ + ElemType: ConditionTask{}.Type(ctx), + }, + "dbt_task": basetypes.ListType{ + ElemType: DbtTask{}.Type(ctx), + }, + "depends_on": basetypes.ListType{ + ElemType: TaskDependency{}.Type(ctx), + }, + "description": types.StringType, + "email_notifications": basetypes.ListType{ + ElemType: JobEmailNotifications{}.Type(ctx), + }, + "environment_key": types.StringType, + "existing_cluster_id": types.StringType, + "for_each_task": basetypes.ListType{ + ElemType: ForEachTask{}.Type(ctx), + }, + "health": basetypes.ListType{ + ElemType: JobsHealthRules{}.Type(ctx), + }, + "library": basetypes.ListType{ + ElemType: compute_tf.Library{}.Type(ctx), + }, + "new_cluster": basetypes.ListType{ + ElemType: compute_tf.ClusterSpec{}.Type(ctx), + }, + "notebook_task": basetypes.ListType{ + ElemType: NotebookTask{}.Type(ctx), + }, + "notification_settings": basetypes.ListType{ + ElemType: TaskNotificationSettings{}.Type(ctx), + }, + "pipeline_task": basetypes.ListType{ + ElemType: PipelineTask{}.Type(ctx), + }, + "python_wheel_task": basetypes.ListType{ + ElemType: PythonWheelTask{}.Type(ctx), + }, + "run_if": types.StringType, + "run_job_task": basetypes.ListType{ + ElemType: RunJobTask{}.Type(ctx), + }, + "spark_jar_task": basetypes.ListType{ + ElemType: SparkJarTask{}.Type(ctx), + }, + "spark_python_task": basetypes.ListType{ + ElemType: SparkPythonTask{}.Type(ctx), + }, + "spark_submit_task": basetypes.ListType{ + ElemType: SparkSubmitTask{}.Type(ctx), + }, + "sql_task": basetypes.ListType{ + ElemType: SqlTask{}.Type(ctx), + }, + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetConditionTask returns the value of the ConditionTask field in SubmitTask_SdkV2 as +// a ConditionTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetConditionTask(ctx context.Context) (ConditionTask_SdkV2, bool) { + var e ConditionTask_SdkV2 + if o.ConditionTask.IsNull() || o.ConditionTask.IsUnknown() { + return e, false + } + var v []ConditionTask_SdkV2 + d := o.ConditionTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConditionTask sets the value of the ConditionTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetConditionTask(ctx context.Context, v ConditionTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] + o.ConditionTask = types.ListValueMust(t, vs) +} + +// GetDbtTask returns the value of the DbtTask field in SubmitTask_SdkV2 as +// a DbtTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetDbtTask(ctx context.Context) (DbtTask_SdkV2, bool) { + var e DbtTask_SdkV2 + if o.DbtTask.IsNull() || o.DbtTask.IsUnknown() { + return e, false + } + var v []DbtTask_SdkV2 + d := o.DbtTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbtTask sets the value of the DbtTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetDbtTask(ctx context.Context, v DbtTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] + o.DbtTask = types.ListValueMust(t, vs) +} + +// GetDependsOn returns the value of the DependsOn field in SubmitTask_SdkV2 as +// a slice of TaskDependency_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetDependsOn(ctx context.Context) ([]TaskDependency_SdkV2, bool) { + if o.DependsOn.IsNull() || o.DependsOn.IsUnknown() { + return nil, false + } + var v []TaskDependency_SdkV2 + d := o.DependsOn.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDependsOn sets the value of the DependsOn field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetDependsOn(ctx context.Context, v []TaskDependency_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["depends_on"] + t = t.(attr.TypeWithElementType).ElementType() + o.DependsOn = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in SubmitTask_SdkV2 as +// a JobEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetEmailNotifications(ctx context.Context) (JobEmailNotifications_SdkV2, bool) { + var e JobEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []JobEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetEmailNotifications(ctx context.Context, v JobEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetForEachTask returns the value of the ForEachTask field in SubmitTask_SdkV2 as +// a ForEachTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetForEachTask(ctx context.Context) (ForEachTask_SdkV2, bool) { + var e ForEachTask_SdkV2 + if o.ForEachTask.IsNull() || o.ForEachTask.IsUnknown() { + return e, false + } + var v []ForEachTask_SdkV2 + d := o.ForEachTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForEachTask sets the value of the ForEachTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetForEachTask(ctx context.Context, v ForEachTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] + o.ForEachTask = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in SubmitTask_SdkV2 as +// a JobsHealthRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetHealth(ctx context.Context) (JobsHealthRules_SdkV2, bool) { + var e JobsHealthRules_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []JobsHealthRules_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetHealth(ctx context.Context, v JobsHealthRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in SubmitTask_SdkV2 as +// a slice of compute_tf.Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetLibraries(ctx context.Context) ([]compute_tf.Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []compute_tf.Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetLibraries(ctx context.Context, v []compute_tf.Library_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["library"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNewCluster returns the value of the NewCluster field in SubmitTask_SdkV2 as +// a compute_tf.ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec_SdkV2, bool) { + var e compute_tf.ClusterSpec_SdkV2 + if o.NewCluster.IsNull() || o.NewCluster.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterSpec_SdkV2 + d := o.NewCluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewCluster sets the value of the NewCluster field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] + o.NewCluster = types.ListValueMust(t, vs) +} + +// GetNotebookTask returns the value of the NotebookTask field in SubmitTask_SdkV2 as +// a NotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetNotebookTask(ctx context.Context) (NotebookTask_SdkV2, bool) { + var e NotebookTask_SdkV2 + if o.NotebookTask.IsNull() || o.NotebookTask.IsUnknown() { + return e, false + } + var v []NotebookTask_SdkV2 + d := o.NotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookTask sets the value of the NotebookTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetNotebookTask(ctx context.Context, v NotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] + o.NotebookTask = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in SubmitTask_SdkV2 as +// a TaskNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetNotificationSettings(ctx context.Context) (TaskNotificationSettings_SdkV2, bool) { + var e TaskNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []TaskNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetPipelineTask returns the value of the PipelineTask field in SubmitTask_SdkV2 as +// a PipelineTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetPipelineTask(ctx context.Context) (PipelineTask_SdkV2, bool) { + var e PipelineTask_SdkV2 + if o.PipelineTask.IsNull() || o.PipelineTask.IsUnknown() { + return e, false + } + var v []PipelineTask_SdkV2 + d := o.PipelineTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineTask sets the value of the PipelineTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetPipelineTask(ctx context.Context, v PipelineTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] + o.PipelineTask = types.ListValueMust(t, vs) +} + +// GetPythonWheelTask returns the value of the PythonWheelTask field in SubmitTask_SdkV2 as +// a PythonWheelTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetPythonWheelTask(ctx context.Context) (PythonWheelTask_SdkV2, bool) { + var e PythonWheelTask_SdkV2 + if o.PythonWheelTask.IsNull() || o.PythonWheelTask.IsUnknown() { + return e, false + } + var v []PythonWheelTask_SdkV2 + d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPythonWheelTask sets the value of the PythonWheelTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetPythonWheelTask(ctx context.Context, v PythonWheelTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] + o.PythonWheelTask = types.ListValueMust(t, vs) +} + +// GetRunJobTask returns the value of the RunJobTask field in SubmitTask_SdkV2 as +// a RunJobTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetRunJobTask(ctx context.Context) (RunJobTask_SdkV2, bool) { + var e RunJobTask_SdkV2 + if o.RunJobTask.IsNull() || o.RunJobTask.IsUnknown() { + return e, false + } + var v []RunJobTask_SdkV2 + d := o.RunJobTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunJobTask sets the value of the RunJobTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetRunJobTask(ctx context.Context, v RunJobTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] + o.RunJobTask = types.ListValueMust(t, vs) +} + +// GetSparkJarTask returns the value of the SparkJarTask field in SubmitTask_SdkV2 as +// a SparkJarTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetSparkJarTask(ctx context.Context) (SparkJarTask_SdkV2, bool) { + var e SparkJarTask_SdkV2 + if o.SparkJarTask.IsNull() || o.SparkJarTask.IsUnknown() { + return e, false + } + var v []SparkJarTask_SdkV2 + d := o.SparkJarTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkJarTask sets the value of the SparkJarTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetSparkJarTask(ctx context.Context, v SparkJarTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] + o.SparkJarTask = types.ListValueMust(t, vs) +} + +// GetSparkPythonTask returns the value of the SparkPythonTask field in SubmitTask_SdkV2 as +// a SparkPythonTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetSparkPythonTask(ctx context.Context) (SparkPythonTask_SdkV2, bool) { + var e SparkPythonTask_SdkV2 + if o.SparkPythonTask.IsNull() || o.SparkPythonTask.IsUnknown() { + return e, false + } + var v []SparkPythonTask_SdkV2 + d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkPythonTask sets the value of the SparkPythonTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetSparkPythonTask(ctx context.Context, v SparkPythonTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] + o.SparkPythonTask = types.ListValueMust(t, vs) +} + +// GetSparkSubmitTask returns the value of the SparkSubmitTask field in SubmitTask_SdkV2 as +// a SparkSubmitTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask_SdkV2, bool) { + var e SparkSubmitTask_SdkV2 + if o.SparkSubmitTask.IsNull() || o.SparkSubmitTask.IsUnknown() { + return e, false + } + var v []SparkSubmitTask_SdkV2 + d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkSubmitTask sets the value of the SparkSubmitTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] + o.SparkSubmitTask = types.ListValueMust(t, vs) +} + +// GetSqlTask returns the value of the SqlTask field in SubmitTask_SdkV2 as +// a SqlTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetSqlTask(ctx context.Context) (SqlTask_SdkV2, bool) { + var e SqlTask_SdkV2 + if o.SqlTask.IsNull() || o.SqlTask.IsUnknown() { + return e, false + } + var v []SqlTask_SdkV2 + d := o.SqlTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlTask sets the value of the SqlTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetSqlTask(ctx context.Context, v SqlTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] + o.SqlTask = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in SubmitTask_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +type TableUpdateTriggerConfiguration_SdkV2 struct { + // The table(s) condition based on which to trigger a job run. + Condition types.String `tfsdk:"condition" tf:"optional"` + // If set, the trigger starts a run only after the specified amount of time + // has passed since the last time the trigger fired. The minimum allowed + // value is 60 seconds. + MinTimeBetweenTriggersSeconds types.Int64 `tfsdk:"min_time_between_triggers_seconds" tf:"optional"` + // A list of Delta tables to monitor for changes. The table name must be in + // the format `catalog_name.schema_name.table_name`. + TableNames types.List `tfsdk:"table_names" tf:"optional"` + // If set, the trigger starts a run only after no table updates have + // occurred for the specified time and can be used to wait for a series of + // table updates before triggering a run. The minimum allowed value is 60 + // seconds. + WaitAfterLastChangeSeconds types.Int64 `tfsdk:"wait_after_last_change_seconds" tf:"optional"` +} + +func (newState *TableUpdateTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableUpdateTriggerConfiguration_SdkV2) { +} + +func (newState *TableUpdateTriggerConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableUpdateTriggerConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableUpdateTriggerConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableUpdateTriggerConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "table_names": 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, TableUpdateTriggerConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableUpdateTriggerConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition": o.Condition, + "min_time_between_triggers_seconds": o.MinTimeBetweenTriggersSeconds, + "table_names": o.TableNames, + "wait_after_last_change_seconds": o.WaitAfterLastChangeSeconds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableUpdateTriggerConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition": types.StringType, + "min_time_between_triggers_seconds": types.Int64Type, + "table_names": basetypes.ListType{ + ElemType: types.StringType, + }, + "wait_after_last_change_seconds": types.Int64Type, + }, + } +} + +// GetTableNames returns the value of the TableNames field in TableUpdateTriggerConfiguration_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TableUpdateTriggerConfiguration_SdkV2) GetTableNames(ctx context.Context) ([]types.String, bool) { + if o.TableNames.IsNull() || o.TableNames.IsUnknown() { + return nil, false + } + var v []types.String + d := o.TableNames.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTableNames sets the value of the TableNames field in TableUpdateTriggerConfiguration_SdkV2. +func (o *TableUpdateTriggerConfiguration_SdkV2) SetTableNames(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["table_names"] + t = t.(attr.TypeWithElementType).ElementType() + o.TableNames = types.ListValueMust(t, vs) +} + +type Task_SdkV2 struct { + // The task evaluates a condition that can be used to control the execution + // of other tasks when the `condition_task` field is present. The condition + // task does not require a cluster to execute and does not support retries + // or notifications. + ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + // The task runs one or more dbt commands when the `dbt_task` field is + // present. The dbt task requires both Databricks SQL and the ability to use + // a serverless or a pro SQL warehouse. + DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + // An optional array of objects specifying the dependency graph of the task. + // All tasks specified in this field must complete before executing this + // task. The task will run only if the `run_if` condition is true. The key + // is `task_key`, and the value is the name assigned to the dependent task. + DependsOn types.List `tfsdk:"depends_on" tf:"optional"` + // An optional description for this task. + Description types.String `tfsdk:"description" tf:"optional"` + // An option to disable auto optimization in serverless + DisableAutoOptimization types.Bool `tfsdk:"disable_auto_optimization" tf:"optional"` + // An optional set of email addresses that is notified when runs of this + // task begin or complete as well as when this task is deleted. The default + // behavior is to not send any emails. + EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + // The key that references an environment spec in a job. This field is + // required for Python script, Python wheel and dbt tasks when using + // serverless compute. + EnvironmentKey types.String `tfsdk:"environment_key" tf:"optional"` + // If existing_cluster_id, the ID of an existing cluster that is used for + // all runs. When running jobs or tasks on an existing cluster, you may need + // to manually restart the cluster if it stops responding. We suggest + // running jobs and tasks on new clusters for greater reliability + ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` + // The task executes a nested task for every input provided when the + // `for_each_task` field is present. + ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + // An optional set of health rules that can be defined for this job. + Health types.List `tfsdk:"health" tf:"optional,object"` + // If job_cluster_key, this task is executed reusing the cluster specified + // in `job.settings.job_clusters`. + JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` + // An optional list of libraries to be installed on the cluster. The default + // value is an empty list. + Libraries types.List `tfsdk:"library" tf:"optional"` + // An optional maximum number of times to retry an unsuccessful run. A run + // is considered to be unsuccessful if it completes with the `FAILED` + // result_state or `INTERNAL_ERROR` `life_cycle_state`. The value `-1` means + // to retry indefinitely and the value `0` means to never retry. + MaxRetries types.Int64 `tfsdk:"max_retries" tf:"optional"` + // An optional minimal interval in milliseconds between the start of the + // failed run and the subsequent retry run. The default behavior is that + // unsuccessful runs are immediately retried. + MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:"optional"` + // If new_cluster, a description of a new cluster that is created for each + // run. + NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + // The task runs a notebook when the `notebook_task` field is present. + NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + // Optional notification settings that are used when sending notifications + // to each of the `email_notifications` and `webhook_notifications` for this + // task. + NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + // The task triggers a pipeline update when the `pipeline_task` field is + // present. Only pipelines configured to use triggered more are supported. + PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + // The task runs a Python wheel when the `python_wheel_task` field is + // present. + PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + // An optional policy to specify whether to retry a job when it times out. + // The default behavior is to not retry on timeout. + RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:"optional"` + // An optional value specifying the condition determining whether the task + // is run once its dependencies have been completed. + // + // * `ALL_SUCCESS`: All dependencies have executed and succeeded * + // `AT_LEAST_ONE_SUCCESS`: At least one dependency has succeeded * + // `NONE_FAILED`: None of the dependencies have failed and at least one was + // executed * `ALL_DONE`: All dependencies have been completed * + // `AT_LEAST_ONE_FAILED`: At least one dependency failed * `ALL_FAILED`: ALl + // dependencies have failed + RunIf types.String `tfsdk:"run_if" tf:"optional"` + // The task triggers another job when the `run_job_task` field is present. + RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + // The task runs a JAR when the `spark_jar_task` field is present. + SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + // The task runs a Python file when the `spark_python_task` field is + // present. + SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + // (Legacy) The task runs the spark-submit script when the + // `spark_submit_task` field is present. This task can run only on new + // clusters and is not compatible with serverless compute. + // + // In the `new_cluster` specification, `libraries` and `spark_conf` are not + // supported. Instead, use `--jars` and `--py-files` to add Java and Python + // libraries and `--conf` to set the Spark configurations. + // + // `master`, `deploy-mode`, and `executor-cores` are automatically + // configured by Databricks; you _cannot_ specify them in parameters. + // + // By default, the Spark submit job uses all available memory (excluding + // reserved memory for Databricks services). You can set `--driver-memory`, + // and `--executor-memory` to a smaller value to leave some room for + // off-heap usage. + // + // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 + // paths. + SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + // The task runs a SQL query or file, or it refreshes a SQL alert or a + // legacy SQL dashboard when the `sql_task` field is present. + SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + // A unique name for the task. This field is used to refer to this task from + // other tasks. This field is required and must be unique within its parent + // job. On Update or Reset, this field is used to reference the tasks to be + // updated or reset. + TaskKey types.String `tfsdk:"task_key" tf:""` + // An optional timeout applied to each run of this job task. A value of `0` + // means no timeout. + TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` + // A collection of system notification IDs to notify when runs of this task + // begin or complete. The default behavior is to not send any system + // notifications. + WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` +} + +func (newState *Task_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task_SdkV2) { +} + +func (newState *Task_SdkV2) SyncEffectiveFieldsDuringRead(existingState Task_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Task. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Task_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(TaskEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_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, Task_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Task_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "depends_on": o.DependsOn, + "description": o.Description, + "disable_auto_optimization": o.DisableAutoOptimization, + "email_notifications": o.EmailNotifications, + "environment_key": o.EnvironmentKey, + "existing_cluster_id": o.ExistingClusterId, + "for_each_task": o.ForEachTask, + "health": o.Health, + "job_cluster_key": o.JobClusterKey, + "library": o.Libraries, + "max_retries": o.MaxRetries, + "min_retry_interval_millis": o.MinRetryIntervalMillis, + "new_cluster": o.NewCluster, + "notebook_task": o.NotebookTask, + "notification_settings": o.NotificationSettings, + "pipeline_task": o.PipelineTask, + "python_wheel_task": o.PythonWheelTask, + "retry_on_timeout": o.RetryOnTimeout, + "run_if": o.RunIf, + "run_job_task": o.RunJobTask, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + "task_key": o.TaskKey, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Task_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition_task": basetypes.ListType{ + ElemType: ConditionTask{}.Type(ctx), + }, + "dbt_task": basetypes.ListType{ + ElemType: DbtTask{}.Type(ctx), + }, + "depends_on": basetypes.ListType{ + ElemType: TaskDependency{}.Type(ctx), + }, + "description": types.StringType, + "disable_auto_optimization": types.BoolType, + "email_notifications": basetypes.ListType{ + ElemType: TaskEmailNotifications{}.Type(ctx), + }, + "environment_key": types.StringType, + "existing_cluster_id": types.StringType, + "for_each_task": basetypes.ListType{ + ElemType: ForEachTask{}.Type(ctx), + }, + "health": basetypes.ListType{ + ElemType: JobsHealthRules{}.Type(ctx), + }, + "job_cluster_key": types.StringType, + "library": basetypes.ListType{ + ElemType: compute_tf.Library{}.Type(ctx), + }, + "max_retries": types.Int64Type, + "min_retry_interval_millis": types.Int64Type, + "new_cluster": basetypes.ListType{ + ElemType: compute_tf.ClusterSpec{}.Type(ctx), + }, + "notebook_task": basetypes.ListType{ + ElemType: NotebookTask{}.Type(ctx), + }, + "notification_settings": basetypes.ListType{ + ElemType: TaskNotificationSettings{}.Type(ctx), + }, + "pipeline_task": basetypes.ListType{ + ElemType: PipelineTask{}.Type(ctx), + }, + "python_wheel_task": basetypes.ListType{ + ElemType: PythonWheelTask{}.Type(ctx), + }, + "retry_on_timeout": types.BoolType, + "run_if": types.StringType, + "run_job_task": basetypes.ListType{ + ElemType: RunJobTask{}.Type(ctx), + }, + "spark_jar_task": basetypes.ListType{ + ElemType: SparkJarTask{}.Type(ctx), + }, + "spark_python_task": basetypes.ListType{ + ElemType: SparkPythonTask{}.Type(ctx), + }, + "spark_submit_task": basetypes.ListType{ + ElemType: SparkSubmitTask{}.Type(ctx), + }, + "sql_task": basetypes.ListType{ + ElemType: SqlTask{}.Type(ctx), + }, + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": basetypes.ListType{ + ElemType: WebhookNotifications{}.Type(ctx), + }, + }, + } +} + +// GetConditionTask returns the value of the ConditionTask field in Task_SdkV2 as +// a ConditionTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetConditionTask(ctx context.Context) (ConditionTask_SdkV2, bool) { + var e ConditionTask_SdkV2 + if o.ConditionTask.IsNull() || o.ConditionTask.IsUnknown() { + return e, false + } + var v []ConditionTask_SdkV2 + d := o.ConditionTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConditionTask sets the value of the ConditionTask field in Task_SdkV2. +func (o *Task_SdkV2) SetConditionTask(ctx context.Context, v ConditionTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] + o.ConditionTask = types.ListValueMust(t, vs) +} + +// GetDbtTask returns the value of the DbtTask field in Task_SdkV2 as +// a DbtTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetDbtTask(ctx context.Context) (DbtTask_SdkV2, bool) { + var e DbtTask_SdkV2 + if o.DbtTask.IsNull() || o.DbtTask.IsUnknown() { + return e, false + } + var v []DbtTask_SdkV2 + d := o.DbtTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDbtTask sets the value of the DbtTask field in Task_SdkV2. +func (o *Task_SdkV2) SetDbtTask(ctx context.Context, v DbtTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] + o.DbtTask = types.ListValueMust(t, vs) +} + +// GetDependsOn returns the value of the DependsOn field in Task_SdkV2 as +// a slice of TaskDependency_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetDependsOn(ctx context.Context) ([]TaskDependency_SdkV2, bool) { + if o.DependsOn.IsNull() || o.DependsOn.IsUnknown() { + return nil, false + } + var v []TaskDependency_SdkV2 + d := o.DependsOn.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDependsOn sets the value of the DependsOn field in Task_SdkV2. +func (o *Task_SdkV2) SetDependsOn(ctx context.Context, v []TaskDependency_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["depends_on"] + t = t.(attr.TypeWithElementType).ElementType() + o.DependsOn = types.ListValueMust(t, vs) +} + +// GetEmailNotifications returns the value of the EmailNotifications field in Task_SdkV2 as +// a TaskEmailNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetEmailNotifications(ctx context.Context) (TaskEmailNotifications_SdkV2, bool) { + var e TaskEmailNotifications_SdkV2 + if o.EmailNotifications.IsNull() || o.EmailNotifications.IsUnknown() { + return e, false + } + var v []TaskEmailNotifications_SdkV2 + d := o.EmailNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmailNotifications sets the value of the EmailNotifications field in Task_SdkV2. +func (o *Task_SdkV2) SetEmailNotifications(ctx context.Context, v TaskEmailNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] + o.EmailNotifications = types.ListValueMust(t, vs) +} + +// GetForEachTask returns the value of the ForEachTask field in Task_SdkV2 as +// a ForEachTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetForEachTask(ctx context.Context) (ForEachTask_SdkV2, bool) { + var e ForEachTask_SdkV2 + if o.ForEachTask.IsNull() || o.ForEachTask.IsUnknown() { + return e, false + } + var v []ForEachTask_SdkV2 + d := o.ForEachTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetForEachTask sets the value of the ForEachTask field in Task_SdkV2. +func (o *Task_SdkV2) SetForEachTask(ctx context.Context, v ForEachTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] + o.ForEachTask = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in Task_SdkV2 as +// a JobsHealthRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetHealth(ctx context.Context) (JobsHealthRules_SdkV2, bool) { + var e JobsHealthRules_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []JobsHealthRules_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in Task_SdkV2. +func (o *Task_SdkV2) SetHealth(ctx context.Context, v JobsHealthRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in Task_SdkV2 as +// a slice of compute_tf.Library_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetLibraries(ctx context.Context) ([]compute_tf.Library_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []compute_tf.Library_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in Task_SdkV2. +func (o *Task_SdkV2) SetLibraries(ctx context.Context, v []compute_tf.Library_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["library"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNewCluster returns the value of the NewCluster field in Task_SdkV2 as +// a compute_tf.ClusterSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec_SdkV2, bool) { + var e compute_tf.ClusterSpec_SdkV2 + if o.NewCluster.IsNull() || o.NewCluster.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterSpec_SdkV2 + d := o.NewCluster.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewCluster sets the value of the NewCluster field in Task_SdkV2. +func (o *Task_SdkV2) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] + o.NewCluster = types.ListValueMust(t, vs) +} + +// GetNotebookTask returns the value of the NotebookTask field in Task_SdkV2 as +// a NotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetNotebookTask(ctx context.Context) (NotebookTask_SdkV2, bool) { + var e NotebookTask_SdkV2 + if o.NotebookTask.IsNull() || o.NotebookTask.IsUnknown() { + return e, false + } + var v []NotebookTask_SdkV2 + d := o.NotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebookTask sets the value of the NotebookTask field in Task_SdkV2. +func (o *Task_SdkV2) SetNotebookTask(ctx context.Context, v NotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] + o.NotebookTask = types.ListValueMust(t, vs) +} + +// GetNotificationSettings returns the value of the NotificationSettings field in Task_SdkV2 as +// a TaskNotificationSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetNotificationSettings(ctx context.Context) (TaskNotificationSettings_SdkV2, bool) { + var e TaskNotificationSettings_SdkV2 + if o.NotificationSettings.IsNull() || o.NotificationSettings.IsUnknown() { + return e, false + } + var v []TaskNotificationSettings_SdkV2 + d := o.NotificationSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotificationSettings sets the value of the NotificationSettings field in Task_SdkV2. +func (o *Task_SdkV2) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] + o.NotificationSettings = types.ListValueMust(t, vs) +} + +// GetPipelineTask returns the value of the PipelineTask field in Task_SdkV2 as +// a PipelineTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetPipelineTask(ctx context.Context) (PipelineTask_SdkV2, bool) { + var e PipelineTask_SdkV2 + if o.PipelineTask.IsNull() || o.PipelineTask.IsUnknown() { + return e, false + } + var v []PipelineTask_SdkV2 + d := o.PipelineTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPipelineTask sets the value of the PipelineTask field in Task_SdkV2. +func (o *Task_SdkV2) SetPipelineTask(ctx context.Context, v PipelineTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] + o.PipelineTask = types.ListValueMust(t, vs) +} + +// GetPythonWheelTask returns the value of the PythonWheelTask field in Task_SdkV2 as +// a PythonWheelTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetPythonWheelTask(ctx context.Context) (PythonWheelTask_SdkV2, bool) { + var e PythonWheelTask_SdkV2 + if o.PythonWheelTask.IsNull() || o.PythonWheelTask.IsUnknown() { + return e, false + } + var v []PythonWheelTask_SdkV2 + d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPythonWheelTask sets the value of the PythonWheelTask field in Task_SdkV2. +func (o *Task_SdkV2) SetPythonWheelTask(ctx context.Context, v PythonWheelTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] + o.PythonWheelTask = types.ListValueMust(t, vs) +} + +// GetRunJobTask returns the value of the RunJobTask field in Task_SdkV2 as +// a RunJobTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetRunJobTask(ctx context.Context) (RunJobTask_SdkV2, bool) { + var e RunJobTask_SdkV2 + if o.RunJobTask.IsNull() || o.RunJobTask.IsUnknown() { + return e, false + } + var v []RunJobTask_SdkV2 + d := o.RunJobTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunJobTask sets the value of the RunJobTask field in Task_SdkV2. +func (o *Task_SdkV2) SetRunJobTask(ctx context.Context, v RunJobTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] + o.RunJobTask = types.ListValueMust(t, vs) +} + +// GetSparkJarTask returns the value of the SparkJarTask field in Task_SdkV2 as +// a SparkJarTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetSparkJarTask(ctx context.Context) (SparkJarTask_SdkV2, bool) { + var e SparkJarTask_SdkV2 + if o.SparkJarTask.IsNull() || o.SparkJarTask.IsUnknown() { + return e, false + } + var v []SparkJarTask_SdkV2 + d := o.SparkJarTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkJarTask sets the value of the SparkJarTask field in Task_SdkV2. +func (o *Task_SdkV2) SetSparkJarTask(ctx context.Context, v SparkJarTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] + o.SparkJarTask = types.ListValueMust(t, vs) +} + +// GetSparkPythonTask returns the value of the SparkPythonTask field in Task_SdkV2 as +// a SparkPythonTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetSparkPythonTask(ctx context.Context) (SparkPythonTask_SdkV2, bool) { + var e SparkPythonTask_SdkV2 + if o.SparkPythonTask.IsNull() || o.SparkPythonTask.IsUnknown() { + return e, false + } + var v []SparkPythonTask_SdkV2 + d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkPythonTask sets the value of the SparkPythonTask field in Task_SdkV2. +func (o *Task_SdkV2) SetSparkPythonTask(ctx context.Context, v SparkPythonTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] + o.SparkPythonTask = types.ListValueMust(t, vs) +} + +// GetSparkSubmitTask returns the value of the SparkSubmitTask field in Task_SdkV2 as +// a SparkSubmitTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask_SdkV2, bool) { + var e SparkSubmitTask_SdkV2 + if o.SparkSubmitTask.IsNull() || o.SparkSubmitTask.IsUnknown() { + return e, false + } + var v []SparkSubmitTask_SdkV2 + d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparkSubmitTask sets the value of the SparkSubmitTask field in Task_SdkV2. +func (o *Task_SdkV2) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] + o.SparkSubmitTask = types.ListValueMust(t, vs) +} + +// GetSqlTask returns the value of the SqlTask field in Task_SdkV2 as +// a SqlTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetSqlTask(ctx context.Context) (SqlTask_SdkV2, bool) { + var e SqlTask_SdkV2 + if o.SqlTask.IsNull() || o.SqlTask.IsUnknown() { + return e, false + } + var v []SqlTask_SdkV2 + d := o.SqlTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlTask sets the value of the SqlTask field in Task_SdkV2. +func (o *Task_SdkV2) SetSqlTask(ctx context.Context, v SqlTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] + o.SqlTask = types.ListValueMust(t, vs) +} + +// GetWebhookNotifications returns the value of the WebhookNotifications field in Task_SdkV2 as +// a WebhookNotifications_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetWebhookNotifications(ctx context.Context) (WebhookNotifications_SdkV2, bool) { + var e WebhookNotifications_SdkV2 + if o.WebhookNotifications.IsNull() || o.WebhookNotifications.IsUnknown() { + return e, false + } + var v []WebhookNotifications_SdkV2 + d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWebhookNotifications sets the value of the WebhookNotifications field in Task_SdkV2. +func (o *Task_SdkV2) SetWebhookNotifications(ctx context.Context, v WebhookNotifications_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] + o.WebhookNotifications = types.ListValueMust(t, vs) +} + +type TaskDependency_SdkV2 struct { + // Can only be specified on condition task dependencies. The outcome of the + // dependent task that must be met for this task to run. + Outcome types.String `tfsdk:"outcome" tf:"optional"` + // The name of the task this task depends on. + TaskKey types.String `tfsdk:"task_key" tf:""` +} + +func (newState *TaskDependency_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskDependency_SdkV2) { +} + +func (newState *TaskDependency_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskDependency_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskDependency. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TaskDependency_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, TaskDependency_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TaskDependency_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "outcome": o.Outcome, + "task_key": o.TaskKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TaskDependency_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "outcome": types.StringType, + "task_key": types.StringType, + }, + } +} + +type TaskEmailNotifications_SdkV2 struct { + // If true, do not send email to recipients specified in `on_failure` if the + // run is skipped. This field is `deprecated`. Please use the + // `notification_settings.no_alert_for_skipped_runs` field. + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` + // A list of email addresses to be notified when the duration of a run + // exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in + // the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is + // specified in the `health` field for the job, notifications are not sent. + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + // A list of email addresses to be notified when a run unsuccessfully + // completes. A run is considered to have completed unsuccessfully if it + // ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or + // `TIMED_OUT` result_state. If this is not specified on job creation, + // reset, or update the list is empty, and notifications are not sent. + OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + // A list of email addresses to be notified when a run begins. If not + // specified on job creation, reset, or update, the list is empty, and + // notifications are not sent. + OnStart types.List `tfsdk:"on_start" tf:"optional"` + // A list of email addresses to notify when any streaming backlog thresholds + // are exceeded for any stream. Streaming backlog thresholds can be set in + // the `health` field using the following metrics: + // `STREAMING_BACKLOG_BYTES`, `STREAMING_BACKLOG_RECORDS`, + // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is + // based on the 10-minute average of these metrics. If the issue persists, + // notifications are resent every 30 minutes. + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + // A list of email addresses to be notified when a run successfully + // completes. A run is considered to have completed successfully if it ends + // with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If + // not specified on job creation, reset, or update, the list is empty, and + // notifications are not sent. + OnSuccess types.List `tfsdk:"on_success" tf:"optional"` +} + +func (newState *TaskEmailNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskEmailNotifications_SdkV2) { +} + +func (newState *TaskEmailNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskEmailNotifications_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskEmailNotifications. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TaskEmailNotifications_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "on_duration_warning_threshold_exceeded": reflect.TypeOf(types.String{}), + "on_failure": reflect.TypeOf(types.String{}), + "on_start": reflect.TypeOf(types.String{}), + "on_streaming_backlog_exceeded": reflect.TypeOf(types.String{}), + "on_success": 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, TaskEmailNotifications_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TaskEmailNotifications_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "no_alert_for_skipped_runs": o.NoAlertForSkippedRuns, + "on_duration_warning_threshold_exceeded": o.OnDurationWarningThresholdExceeded, + "on_failure": o.OnFailure, + "on_start": o.OnStart, + "on_streaming_backlog_exceeded": o.OnStreamingBacklogExceeded, + "on_success": o.OnSuccess, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TaskEmailNotifications_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "no_alert_for_skipped_runs": types.BoolType, + "on_duration_warning_threshold_exceeded": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_failure": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_start": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_streaming_backlog_exceeded": basetypes.ListType{ + ElemType: types.StringType, + }, + "on_success": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetOnDurationWarningThresholdExceeded returns the value of the OnDurationWarningThresholdExceeded field in TaskEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TaskEmailNotifications_SdkV2) GetOnDurationWarningThresholdExceeded(ctx context.Context) ([]types.String, bool) { + if o.OnDurationWarningThresholdExceeded.IsNull() || o.OnDurationWarningThresholdExceeded.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnDurationWarningThresholdExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnDurationWarningThresholdExceeded sets the value of the OnDurationWarningThresholdExceeded field in TaskEmailNotifications_SdkV2. +func (o *TaskEmailNotifications_SdkV2) SetOnDurationWarningThresholdExceeded(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["on_duration_warning_threshold_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnDurationWarningThresholdExceeded = types.ListValueMust(t, vs) +} + +// GetOnFailure returns the value of the OnFailure field in TaskEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TaskEmailNotifications_SdkV2) GetOnFailure(ctx context.Context) ([]types.String, bool) { + if o.OnFailure.IsNull() || o.OnFailure.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnFailure.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnFailure sets the value of the OnFailure field in TaskEmailNotifications_SdkV2. +func (o *TaskEmailNotifications_SdkV2) SetOnFailure(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["on_failure"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnFailure = types.ListValueMust(t, vs) +} + +// GetOnStart returns the value of the OnStart field in TaskEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TaskEmailNotifications_SdkV2) GetOnStart(ctx context.Context) ([]types.String, bool) { + if o.OnStart.IsNull() || o.OnStart.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnStart.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStart sets the value of the OnStart field in TaskEmailNotifications_SdkV2. +func (o *TaskEmailNotifications_SdkV2) SetOnStart(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["on_start"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStart = types.ListValueMust(t, vs) +} + +// GetOnStreamingBacklogExceeded returns the value of the OnStreamingBacklogExceeded field in TaskEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TaskEmailNotifications_SdkV2) GetOnStreamingBacklogExceeded(ctx context.Context) ([]types.String, bool) { + if o.OnStreamingBacklogExceeded.IsNull() || o.OnStreamingBacklogExceeded.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnStreamingBacklogExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStreamingBacklogExceeded sets the value of the OnStreamingBacklogExceeded field in TaskEmailNotifications_SdkV2. +func (o *TaskEmailNotifications_SdkV2) SetOnStreamingBacklogExceeded(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["on_streaming_backlog_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStreamingBacklogExceeded = types.ListValueMust(t, vs) +} + +// GetOnSuccess returns the value of the OnSuccess field in TaskEmailNotifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TaskEmailNotifications_SdkV2) GetOnSuccess(ctx context.Context) ([]types.String, bool) { + if o.OnSuccess.IsNull() || o.OnSuccess.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OnSuccess.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnSuccess sets the value of the OnSuccess field in TaskEmailNotifications_SdkV2. +func (o *TaskEmailNotifications_SdkV2) SetOnSuccess(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["on_success"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnSuccess = types.ListValueMust(t, vs) +} + +type TaskNotificationSettings_SdkV2 struct { + // If true, do not send notifications to recipients specified in `on_start` + // for the retried runs and do not send notifications to recipients + // specified in `on_failure` until the last retry of the run. + AlertOnLastAttempt types.Bool `tfsdk:"alert_on_last_attempt" tf:"optional"` + // If true, do not send notifications to recipients specified in + // `on_failure` if the run is canceled. + NoAlertForCanceledRuns types.Bool `tfsdk:"no_alert_for_canceled_runs" tf:"optional"` + // If true, do not send notifications to recipients specified in + // `on_failure` if the run is skipped. + NoAlertForSkippedRuns types.Bool `tfsdk:"no_alert_for_skipped_runs" tf:"optional"` +} + +func (newState *TaskNotificationSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TaskNotificationSettings_SdkV2) { +} + +func (newState *TaskNotificationSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState TaskNotificationSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TaskNotificationSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TaskNotificationSettings_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, TaskNotificationSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TaskNotificationSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_on_last_attempt": o.AlertOnLastAttempt, + "no_alert_for_canceled_runs": o.NoAlertForCanceledRuns, + "no_alert_for_skipped_runs": o.NoAlertForSkippedRuns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TaskNotificationSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_on_last_attempt": types.BoolType, + "no_alert_for_canceled_runs": types.BoolType, + "no_alert_for_skipped_runs": types.BoolType, + }, + } +} + +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. * `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. + // + // [Link]: https://kb.databricks.com/en_US/notebooks/too-many-execution-contexts-are-open-right-now + Code types.String `tfsdk:"code" tf:"optional"` + // A descriptive message with the termination details. This field is + // unstructured and the format might change. + Message types.String `tfsdk:"message" tf:"optional"` + // * `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" tf:"optional"` +} + +func (newState *TerminationDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationDetails_SdkV2) { +} + +func (newState *TerminationDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TerminationDetails_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, TerminationDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TerminationDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "code": o.Code, + "message": o.Message, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TerminationDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "code": types.StringType, + "message": types.StringType, + "type": types.StringType, + }, + } +} + +// Additional details about what triggered the run +type TriggerInfo_SdkV2 struct { + // The run id of the Run Job task run + RunId types.Int64 `tfsdk:"run_id" tf:"optional"` +} + +func (newState *TriggerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerInfo_SdkV2) { +} + +func (newState *TriggerInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggerInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TriggerInfo_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, TriggerInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TriggerInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TriggerInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.Int64Type, + }, + } +} + +type TriggerSettings_SdkV2 struct { + // File arrival trigger settings. + FileArrival types.List `tfsdk:"file_arrival" tf:"optional,object"` + // Whether this trigger is paused or not. + PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` + // Periodic trigger settings. + Periodic types.List `tfsdk:"periodic" tf:"optional,object"` + // Old table trigger settings name. Deprecated in favor of `table_update`. + Table types.List `tfsdk:"table" tf:"optional,object"` + + TableUpdate types.List `tfsdk:"table_update" tf:"optional,object"` +} + +func (newState *TriggerSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerSettings_SdkV2) { +} + +func (newState *TriggerSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState TriggerSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TriggerSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TriggerSettings_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_arrival": reflect.TypeOf(FileArrivalTriggerConfiguration_SdkV2{}), + "periodic": reflect.TypeOf(PeriodicTriggerConfiguration_SdkV2{}), + "table": reflect.TypeOf(TableUpdateTriggerConfiguration_SdkV2{}), + "table_update": reflect.TypeOf(TableUpdateTriggerConfiguration_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, TriggerSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TriggerSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_arrival": o.FileArrival, + "pause_status": o.PauseStatus, + "periodic": o.Periodic, + "table": o.Table, + "table_update": o.TableUpdate, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TriggerSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_arrival": basetypes.ListType{ + ElemType: FileArrivalTriggerConfiguration{}.Type(ctx), + }, + "pause_status": types.StringType, + "periodic": basetypes.ListType{ + ElemType: PeriodicTriggerConfiguration{}.Type(ctx), + }, + "table": basetypes.ListType{ + ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), + }, + "table_update": basetypes.ListType{ + ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), + }, + }, + } +} + +// GetFileArrival returns the value of the FileArrival field in TriggerSettings_SdkV2 as +// a FileArrivalTriggerConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TriggerSettings_SdkV2) GetFileArrival(ctx context.Context) (FileArrivalTriggerConfiguration_SdkV2, bool) { + var e FileArrivalTriggerConfiguration_SdkV2 + if o.FileArrival.IsNull() || o.FileArrival.IsUnknown() { + return e, false + } + var v []FileArrivalTriggerConfiguration_SdkV2 + d := o.FileArrival.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFileArrival sets the value of the FileArrival field in TriggerSettings_SdkV2. +func (o *TriggerSettings_SdkV2) SetFileArrival(ctx context.Context, v FileArrivalTriggerConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_arrival"] + o.FileArrival = types.ListValueMust(t, vs) +} + +// GetPeriodic returns the value of the Periodic field in TriggerSettings_SdkV2 as +// a PeriodicTriggerConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TriggerSettings_SdkV2) GetPeriodic(ctx context.Context) (PeriodicTriggerConfiguration_SdkV2, bool) { + var e PeriodicTriggerConfiguration_SdkV2 + if o.Periodic.IsNull() || o.Periodic.IsUnknown() { + return e, false + } + var v []PeriodicTriggerConfiguration_SdkV2 + d := o.Periodic.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPeriodic sets the value of the Periodic field in TriggerSettings_SdkV2. +func (o *TriggerSettings_SdkV2) SetPeriodic(ctx context.Context, v PeriodicTriggerConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["periodic"] + o.Periodic = types.ListValueMust(t, vs) +} + +// GetTable returns the value of the Table field in TriggerSettings_SdkV2 as +// a TableUpdateTriggerConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TriggerSettings_SdkV2) GetTable(ctx context.Context) (TableUpdateTriggerConfiguration_SdkV2, bool) { + var e TableUpdateTriggerConfiguration_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []TableUpdateTriggerConfiguration_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 TriggerSettings_SdkV2. +func (o *TriggerSettings_SdkV2) SetTable(ctx context.Context, v TableUpdateTriggerConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +// GetTableUpdate returns the value of the TableUpdate field in TriggerSettings_SdkV2 as +// a TableUpdateTriggerConfiguration_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TriggerSettings_SdkV2) GetTableUpdate(ctx context.Context) (TableUpdateTriggerConfiguration_SdkV2, bool) { + var e TableUpdateTriggerConfiguration_SdkV2 + if o.TableUpdate.IsNull() || o.TableUpdate.IsUnknown() { + return e, false + } + var v []TableUpdateTriggerConfiguration_SdkV2 + d := o.TableUpdate.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableUpdate sets the value of the TableUpdate field in TriggerSettings_SdkV2. +func (o *TriggerSettings_SdkV2) SetTableUpdate(ctx context.Context, v TableUpdateTriggerConfiguration_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_update"] + o.TableUpdate = types.ListValueMust(t, vs) +} + +type UpdateJob_SdkV2 struct { + // Remove top-level fields in the job settings. Removing nested fields is + // not supported, except for tasks and job clusters (`tasks/task_1`). This + // field is optional. + FieldsToRemove types.List `tfsdk:"fields_to_remove" tf:"optional"` + // The canonical identifier of the job to update. This field is required. + JobId types.Int64 `tfsdk:"job_id" tf:""` + // The new settings for the job. + // + // Top-level fields specified in `new_settings` are completely replaced, + // except for arrays which are merged. That is, new and existing entries are + // completely replaced based on the respective key fields, i.e. `task_key` + // or `job_cluster_key`, while previous entries are kept. + // + // Partially updating nested fields is not supported. + // + // Changes to the field `JobSettings.timeout_seconds` are applied to active + // runs. Changes to other fields are applied to future runs only. + NewSettings types.List `tfsdk:"new_settings" tf:"optional,object"` +} + +func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob_SdkV2) { +} + +func (newState *UpdateJob_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateJob_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateJob_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "fields_to_remove": reflect.TypeOf(types.String{}), + "new_settings": reflect.TypeOf(JobSettings_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, UpdateJob_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateJob_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "fields_to_remove": o.FieldsToRemove, + "job_id": o.JobId, + "new_settings": o.NewSettings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateJob_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "fields_to_remove": basetypes.ListType{ + ElemType: types.StringType, + }, + "job_id": types.Int64Type, + "new_settings": basetypes.ListType{ + ElemType: JobSettings{}.Type(ctx), + }, + }, + } +} + +// GetFieldsToRemove returns the value of the FieldsToRemove field in UpdateJob_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateJob_SdkV2) GetFieldsToRemove(ctx context.Context) ([]types.String, bool) { + if o.FieldsToRemove.IsNull() || o.FieldsToRemove.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FieldsToRemove.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFieldsToRemove sets the value of the FieldsToRemove field in UpdateJob_SdkV2. +func (o *UpdateJob_SdkV2) SetFieldsToRemove(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["fields_to_remove"] + t = t.(attr.TypeWithElementType).ElementType() + o.FieldsToRemove = types.ListValueMust(t, vs) +} + +// GetNewSettings returns the value of the NewSettings field in UpdateJob_SdkV2 as +// a JobSettings_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateJob_SdkV2) GetNewSettings(ctx context.Context) (JobSettings_SdkV2, bool) { + var e JobSettings_SdkV2 + if o.NewSettings.IsNull() || o.NewSettings.IsUnknown() { + return e, false + } + var v []JobSettings_SdkV2 + d := o.NewSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNewSettings sets the value of the NewSettings field in UpdateJob_SdkV2. +func (o *UpdateJob_SdkV2) SetNewSettings(ctx context.Context, v JobSettings_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_settings"] + o.NewSettings = types.ListValueMust(t, vs) +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ViewItem_SdkV2 struct { + // Content of the view. + Content types.String `tfsdk:"content" tf:"optional"` + // Name of the view item. In the case of code view, it would be the + // notebook’s name. In the case of dashboard view, it would be the + // dashboard’s name. + Name types.String `tfsdk:"name" tf:"optional"` + // Type of the view item. + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *ViewItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ViewItem_SdkV2) { +} + +func (newState *ViewItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState ViewItem_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ViewItem. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ViewItem_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, ViewItem_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ViewItem_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "name": o.Name, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ViewItem_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "name": types.StringType, + "type": types.StringType, + }, + } +} + +type Webhook_SdkV2 struct { + Id types.String `tfsdk:"id" tf:""` +} + +func (newState *Webhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Webhook_SdkV2) { +} + +func (newState *Webhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState Webhook_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Webhook. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Webhook_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, Webhook_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Webhook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Webhook_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type WebhookNotifications_SdkV2 struct { + // An optional list of system notification IDs to call when the duration of + // a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` + // metric in the `health` field. A maximum of 3 destinations can be + // specified for the `on_duration_warning_threshold_exceeded` property. + OnDurationWarningThresholdExceeded types.List `tfsdk:"on_duration_warning_threshold_exceeded" tf:"optional"` + // An optional list of system notification IDs to call when the run fails. A + // maximum of 3 destinations can be specified for the `on_failure` property. + OnFailure types.List `tfsdk:"on_failure" tf:"optional"` + // An optional list of system notification IDs to call when the run starts. + // A maximum of 3 destinations can be specified for the `on_start` property. + OnStart types.List `tfsdk:"on_start" tf:"optional"` + // An optional list of system notification IDs to call when any streaming + // backlog thresholds are exceeded for any stream. Streaming backlog + // thresholds can be set in the `health` field using the following metrics: + // `STREAMING_BACKLOG_BYTES`, `STREAMING_BACKLOG_RECORDS`, + // `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is + // based on the 10-minute average of these metrics. If the issue persists, + // notifications are resent every 30 minutes. A maximum of 3 destinations + // can be specified for the `on_streaming_backlog_exceeded` property. + OnStreamingBacklogExceeded types.List `tfsdk:"on_streaming_backlog_exceeded" tf:"optional"` + // An optional list of system notification IDs to call when the run + // completes successfully. A maximum of 3 destinations can be specified for + // the `on_success` property. + OnSuccess types.List `tfsdk:"on_success" tf:"optional"` +} + +func (newState *WebhookNotifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WebhookNotifications_SdkV2) { +} + +func (newState *WebhookNotifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState WebhookNotifications_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WebhookNotifications. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WebhookNotifications_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "on_duration_warning_threshold_exceeded": reflect.TypeOf(Webhook_SdkV2{}), + "on_failure": reflect.TypeOf(Webhook_SdkV2{}), + "on_start": reflect.TypeOf(Webhook_SdkV2{}), + "on_streaming_backlog_exceeded": reflect.TypeOf(Webhook_SdkV2{}), + "on_success": reflect.TypeOf(Webhook_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, WebhookNotifications_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WebhookNotifications_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "on_duration_warning_threshold_exceeded": o.OnDurationWarningThresholdExceeded, + "on_failure": o.OnFailure, + "on_start": o.OnStart, + "on_streaming_backlog_exceeded": o.OnStreamingBacklogExceeded, + "on_success": o.OnSuccess, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WebhookNotifications_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "on_duration_warning_threshold_exceeded": basetypes.ListType{ + ElemType: Webhook{}.Type(ctx), + }, + "on_failure": basetypes.ListType{ + ElemType: Webhook{}.Type(ctx), + }, + "on_start": basetypes.ListType{ + ElemType: Webhook{}.Type(ctx), + }, + "on_streaming_backlog_exceeded": basetypes.ListType{ + ElemType: Webhook{}.Type(ctx), + }, + "on_success": basetypes.ListType{ + ElemType: Webhook{}.Type(ctx), + }, + }, + } +} + +// GetOnDurationWarningThresholdExceeded returns the value of the OnDurationWarningThresholdExceeded field in WebhookNotifications_SdkV2 as +// a slice of Webhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WebhookNotifications_SdkV2) GetOnDurationWarningThresholdExceeded(ctx context.Context) ([]Webhook_SdkV2, bool) { + if o.OnDurationWarningThresholdExceeded.IsNull() || o.OnDurationWarningThresholdExceeded.IsUnknown() { + return nil, false + } + var v []Webhook_SdkV2 + d := o.OnDurationWarningThresholdExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnDurationWarningThresholdExceeded sets the value of the OnDurationWarningThresholdExceeded field in WebhookNotifications_SdkV2. +func (o *WebhookNotifications_SdkV2) SetOnDurationWarningThresholdExceeded(ctx context.Context, v []Webhook_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["on_duration_warning_threshold_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnDurationWarningThresholdExceeded = types.ListValueMust(t, vs) +} + +// GetOnFailure returns the value of the OnFailure field in WebhookNotifications_SdkV2 as +// a slice of Webhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WebhookNotifications_SdkV2) GetOnFailure(ctx context.Context) ([]Webhook_SdkV2, bool) { + if o.OnFailure.IsNull() || o.OnFailure.IsUnknown() { + return nil, false + } + var v []Webhook_SdkV2 + d := o.OnFailure.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnFailure sets the value of the OnFailure field in WebhookNotifications_SdkV2. +func (o *WebhookNotifications_SdkV2) SetOnFailure(ctx context.Context, v []Webhook_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["on_failure"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnFailure = types.ListValueMust(t, vs) +} + +// GetOnStart returns the value of the OnStart field in WebhookNotifications_SdkV2 as +// a slice of Webhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WebhookNotifications_SdkV2) GetOnStart(ctx context.Context) ([]Webhook_SdkV2, bool) { + if o.OnStart.IsNull() || o.OnStart.IsUnknown() { + return nil, false + } + var v []Webhook_SdkV2 + d := o.OnStart.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStart sets the value of the OnStart field in WebhookNotifications_SdkV2. +func (o *WebhookNotifications_SdkV2) SetOnStart(ctx context.Context, v []Webhook_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["on_start"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStart = types.ListValueMust(t, vs) +} + +// GetOnStreamingBacklogExceeded returns the value of the OnStreamingBacklogExceeded field in WebhookNotifications_SdkV2 as +// a slice of Webhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WebhookNotifications_SdkV2) GetOnStreamingBacklogExceeded(ctx context.Context) ([]Webhook_SdkV2, bool) { + if o.OnStreamingBacklogExceeded.IsNull() || o.OnStreamingBacklogExceeded.IsUnknown() { + return nil, false + } + var v []Webhook_SdkV2 + d := o.OnStreamingBacklogExceeded.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnStreamingBacklogExceeded sets the value of the OnStreamingBacklogExceeded field in WebhookNotifications_SdkV2. +func (o *WebhookNotifications_SdkV2) SetOnStreamingBacklogExceeded(ctx context.Context, v []Webhook_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["on_streaming_backlog_exceeded"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnStreamingBacklogExceeded = types.ListValueMust(t, vs) +} + +// GetOnSuccess returns the value of the OnSuccess field in WebhookNotifications_SdkV2 as +// a slice of Webhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WebhookNotifications_SdkV2) GetOnSuccess(ctx context.Context) ([]Webhook_SdkV2, bool) { + if o.OnSuccess.IsNull() || o.OnSuccess.IsUnknown() { + return nil, false + } + var v []Webhook_SdkV2 + d := o.OnSuccess.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOnSuccess sets the value of the OnSuccess field in WebhookNotifications_SdkV2. +func (o *WebhookNotifications_SdkV2) SetOnSuccess(ctx context.Context, v []Webhook_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["on_success"] + t = t.(attr.TypeWithElementType).ElementType() + o.OnSuccess = types.ListValueMust(t, vs) +} diff --git a/internal/service/jobs_tf/model.go b/internal/service/jobs_tf/model.go index 2c6cdea10..39d16cf3e 100755 --- a/internal/service/jobs_tf/model.go +++ b/internal/service/jobs_tf/model.go @@ -40,7 +40,7 @@ type BaseJob struct { JobId types.Int64 `tfsdk:"job_id" tf:"optional"` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"optional,object"` } func (newState *BaseJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseJob) { @@ -85,9 +85,7 @@ func (o BaseJob) Type(ctx context.Context) attr.Type { "creator_user_name": types.StringType, "effective_budget_policy_id": types.StringType, "job_id": types.Int64Type, - "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), - }, + "settings": JobSettings{}.Type(ctx), }, } } @@ -101,7 +99,10 @@ func (o *BaseJob) GetSettings(ctx context.Context) (JobSettings, bool) { return e, false } var v []JobSettings - d := o.Settings.ElementsAs(ctx, &v, true) + d := o.Settings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -113,9 +114,8 @@ func (o *BaseJob) GetSettings(ctx context.Context) (JobSettings, bool) { // SetSettings sets the value of the Settings field in BaseJob. func (o *BaseJob) SetSettings(ctx context.Context, v JobSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] - o.Settings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Settings = vs } type BaseRun struct { @@ -136,10 +136,10 @@ type BaseRun struct { // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"optional,object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` @@ -166,7 +166,7 @@ type BaseRun struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. // You must declare dependent libraries in task settings. @@ -187,7 +187,7 @@ type BaseRun struct { // run_id of the original attempt; otherwise, it is the same as the run_id. OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` // The parameters used for this run. - OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"optional,object"` // The time in milliseconds that the run has spent in the queue. QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` // The repair history of the run. @@ -212,7 +212,7 @@ type BaseRun struct { RunType types.String `tfsdk:"run_type" tf:"optional"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -227,9 +227,9 @@ type BaseRun struct { // new cluster, this is the time the cluster creation call is issued. StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` // The list of tasks performed by the run. Each task has its own `run_id` // which you can use to call `JobsGetOutput` to retrieve the run resutls. Tasks types.List `tfsdk:"tasks" tf:"optional"` @@ -245,7 +245,7 @@ type BaseRun struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. Trigger types.String `tfsdk:"trigger" tf:"optional"` // Additional details about what triggered the run - TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.Object `tfsdk:"trigger_info" tf:"optional,object"` } func (newState *BaseRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseRun) { @@ -323,21 +323,15 @@ func (o BaseRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o BaseRun) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attempt_number": types.Int64Type, - "cleanup_duration": types.Int64Type, - "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), - }, - "cluster_spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), - }, + "attempt_number": types.Int64Type, + "cleanup_duration": types.Int64Type, + "cluster_instance": ClusterInstance{}.Type(ctx), + "cluster_spec": ClusterSpec{}.Type(ctx), "creator_user_name": types.StringType, "description": types.StringType, "end_time": types.Int64Type, "execution_duration": types.Int64Type, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, + "git_source": GitSource{}.Type(ctx), "job_clusters": basetypes.ListType{ ElemType: JobCluster{}.Type(ctx), }, @@ -348,36 +342,26 @@ func (o BaseRun) Type(ctx context.Context) attr.Type { "job_run_id": types.Int64Type, "number_in_job": types.Int64Type, "original_attempt_run_id": types.Int64Type, - "overriding_parameters": basetypes.ListType{ - ElemType: RunParameters{}.Type(ctx), - }, - "queue_duration": types.Int64Type, + "overriding_parameters": RunParameters{}.Type(ctx), + "queue_duration": types.Int64Type, "repair_history": basetypes.ListType{ ElemType: RepairHistoryItem{}.Type(ctx), }, - "run_duration": types.Int64Type, - "run_id": types.Int64Type, - "run_name": types.StringType, - "run_page_url": types.StringType, - "run_type": types.StringType, - "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), - }, + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_name": types.StringType, + "run_page_url": types.StringType, + "run_type": types.StringType, + "schedule": CronSchedule{}.Type(ctx), "setup_duration": types.Int64Type, "start_time": types.Int64Type, - "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), - }, + "state": RunState{}.Type(ctx), + "status": RunStatus{}.Type(ctx), "tasks": basetypes.ListType{ ElemType: RunTask{}.Type(ctx), }, - "trigger": types.StringType, - "trigger_info": basetypes.ListType{ - ElemType: TriggerInfo{}.Type(ctx), - }, + "trigger": types.StringType, + "trigger_info": TriggerInfo{}.Type(ctx), }, } } @@ -391,7 +375,10 @@ func (o *BaseRun) GetClusterInstance(ctx context.Context) (ClusterInstance, bool return e, false } var v []ClusterInstance - d := o.ClusterInstance.ElementsAs(ctx, &v, true) + d := o.ClusterInstance.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -403,9 +390,8 @@ func (o *BaseRun) GetClusterInstance(ctx context.Context) (ClusterInstance, bool // SetClusterInstance sets the value of the ClusterInstance field in BaseRun. func (o *BaseRun) SetClusterInstance(ctx context.Context, v ClusterInstance) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] - o.ClusterInstance = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterInstance = vs } // GetClusterSpec returns the value of the ClusterSpec field in BaseRun as @@ -417,7 +403,10 @@ func (o *BaseRun) GetClusterSpec(ctx context.Context) (ClusterSpec, bool) { return e, false } var v []ClusterSpec - d := o.ClusterSpec.ElementsAs(ctx, &v, true) + d := o.ClusterSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -429,9 +418,8 @@ func (o *BaseRun) GetClusterSpec(ctx context.Context) (ClusterSpec, bool) { // SetClusterSpec sets the value of the ClusterSpec field in BaseRun. func (o *BaseRun) SetClusterSpec(ctx context.Context, v ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_spec"] - o.ClusterSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterSpec = vs } // GetGitSource returns the value of the GitSource field in BaseRun as @@ -443,7 +431,10 @@ func (o *BaseRun) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -455,9 +446,8 @@ func (o *BaseRun) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in BaseRun. func (o *BaseRun) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetJobClusters returns the value of the JobClusters field in BaseRun as @@ -521,7 +511,10 @@ func (o *BaseRun) GetOverridingParameters(ctx context.Context) (RunParameters, b return e, false } var v []RunParameters - d := o.OverridingParameters.ElementsAs(ctx, &v, true) + d := o.OverridingParameters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -533,9 +526,8 @@ func (o *BaseRun) GetOverridingParameters(ctx context.Context) (RunParameters, b // SetOverridingParameters sets the value of the OverridingParameters field in BaseRun. func (o *BaseRun) SetOverridingParameters(ctx context.Context, v RunParameters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["overriding_parameters"] - o.OverridingParameters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OverridingParameters = vs } // GetRepairHistory returns the value of the RepairHistory field in BaseRun as @@ -573,7 +565,10 @@ func (o *BaseRun) GetSchedule(ctx context.Context) (CronSchedule, bool) { return e, false } var v []CronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -585,9 +580,8 @@ func (o *BaseRun) GetSchedule(ctx context.Context) (CronSchedule, bool) { // SetSchedule sets the value of the Schedule field in BaseRun. func (o *BaseRun) SetSchedule(ctx context.Context, v CronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetState returns the value of the State field in BaseRun as @@ -599,7 +593,10 @@ func (o *BaseRun) GetState(ctx context.Context) (RunState, bool) { return e, false } var v []RunState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -611,9 +608,8 @@ func (o *BaseRun) GetState(ctx context.Context) (RunState, bool) { // SetState sets the value of the State field in BaseRun. func (o *BaseRun) SetState(ctx context.Context, v RunState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetStatus returns the value of the Status field in BaseRun as @@ -625,7 +621,10 @@ func (o *BaseRun) GetStatus(ctx context.Context) (RunStatus, bool) { return e, false } var v []RunStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -637,9 +636,8 @@ func (o *BaseRun) GetStatus(ctx context.Context) (RunStatus, bool) { // SetStatus sets the value of the Status field in BaseRun. func (o *BaseRun) SetStatus(ctx context.Context, v RunStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // GetTasks returns the value of the Tasks field in BaseRun as @@ -677,7 +675,10 @@ func (o *BaseRun) GetTriggerInfo(ctx context.Context) (TriggerInfo, bool) { return e, false } var v []TriggerInfo - d := o.TriggerInfo.ElementsAs(ctx, &v, true) + d := o.TriggerInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -689,9 +690,8 @@ func (o *BaseRun) GetTriggerInfo(ctx context.Context) (TriggerInfo, bool) { // SetTriggerInfo sets the value of the TriggerInfo field in BaseRun. func (o *BaseRun) SetTriggerInfo(ctx context.Context, v TriggerInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger_info"] - o.TriggerInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TriggerInfo = vs } type CancelAllRuns struct { @@ -978,7 +978,7 @@ type ClusterSpec struct { Libraries types.List `tfsdk:"library" tf:"optional"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` } func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec) { @@ -1024,9 +1024,7 @@ func (o ClusterSpec) Type(ctx context.Context) attr.Type { "library": basetypes.ListType{ ElemType: compute_tf.Library{}.Type(ctx), }, - "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), - }, + "new_cluster": compute_tf.ClusterSpec{}.Type(ctx), }, } } @@ -1066,7 +1064,10 @@ func (o *ClusterSpec) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec return e, false } var v []compute_tf.ClusterSpec - d := o.NewCluster.ElementsAs(ctx, &v, true) + d := o.NewCluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1078,9 +1079,8 @@ func (o *ClusterSpec) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec // SetNewCluster sets the value of the NewCluster field in ClusterSpec. func (o *ClusterSpec) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] - o.NewCluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewCluster = vs } type ConditionTask struct { @@ -1198,9 +1198,9 @@ type CreateJob struct { // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + Continuous types.Object `tfsdk:"continuous" tf:"optional,object"` // Deployment information for jobs managed by external sources. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. Description types.String `tfsdk:"description" tf:"optional"` @@ -1211,7 +1211,7 @@ type CreateJob struct { EditMode types.String `tfsdk:"edit_mode" tf:"optional"` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the @@ -1233,9 +1233,9 @@ 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.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. // You must declare dependent libraries in task settings. @@ -1258,21 +1258,21 @@ type CreateJob struct { // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // Job-level parameter definitions Parameters types.List `tfsdk:"parameter" tf:"optional"` // The queue settings of the job. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"optional,object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the @@ -1286,10 +1286,10 @@ type CreateJob struct { // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *CreateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateJob) { @@ -1368,61 +1368,39 @@ func (o CreateJob) Type(ctx context.Context) attr.Type { "access_control_list": basetypes.ListType{ ElemType: JobAccessControlRequest{}.Type(ctx), }, - "budget_policy_id": types.StringType, - "continuous": basetypes.ListType{ - ElemType: Continuous{}.Type(ctx), - }, - "deployment": basetypes.ListType{ - ElemType: JobDeployment{}.Type(ctx), - }, - "description": types.StringType, - "edit_mode": types.StringType, - "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), - }, + "budget_policy_id": types.StringType, + "continuous": Continuous{}.Type(ctx), + "deployment": JobDeployment{}.Type(ctx), + "description": types.StringType, + "edit_mode": types.StringType, + "email_notifications": JobEmailNotifications{}.Type(ctx), "environment": basetypes.ListType{ ElemType: JobEnvironment{}.Type(ctx), }, - "format": types.StringType, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, - "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), - }, + "format": types.StringType, + "git_source": GitSource{}.Type(ctx), + "health": JobsHealthRules{}.Type(ctx), "job_cluster": basetypes.ListType{ ElemType: JobCluster{}.Type(ctx), }, - "max_concurrent_runs": types.Int64Type, - "name": types.StringType, - "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), - }, + "max_concurrent_runs": types.Int64Type, + "name": types.StringType, + "notification_settings": JobNotificationSettings{}.Type(ctx), "parameter": basetypes.ListType{ ElemType: JobParameterDefinition{}.Type(ctx), }, - "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), - }, - "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), - }, - "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), - }, + "queue": QueueSettings{}.Type(ctx), + "run_as": JobRunAs{}.Type(ctx), + "schedule": CronSchedule{}.Type(ctx), "tags": basetypes.MapType{ ElemType: types.StringType, }, "task": basetypes.ListType{ ElemType: Task{}.Type(ctx), }, - "timeout_seconds": types.Int64Type, - "trigger": basetypes.ListType{ - ElemType: TriggerSettings{}.Type(ctx), - }, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "timeout_seconds": types.Int64Type, + "trigger": TriggerSettings{}.Type(ctx), + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -1462,7 +1440,10 @@ func (o *CreateJob) GetContinuous(ctx context.Context) (Continuous, bool) { return e, false } var v []Continuous - d := o.Continuous.ElementsAs(ctx, &v, true) + d := o.Continuous.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1474,9 +1455,8 @@ func (o *CreateJob) GetContinuous(ctx context.Context) (Continuous, bool) { // SetContinuous sets the value of the Continuous field in CreateJob. func (o *CreateJob) SetContinuous(ctx context.Context, v Continuous) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous"] - o.Continuous = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Continuous = vs } // GetDeployment returns the value of the Deployment field in CreateJob as @@ -1488,7 +1468,10 @@ func (o *CreateJob) GetDeployment(ctx context.Context) (JobDeployment, bool) { return e, false } var v []JobDeployment - d := o.Deployment.ElementsAs(ctx, &v, true) + d := o.Deployment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1500,9 +1483,8 @@ func (o *CreateJob) GetDeployment(ctx context.Context) (JobDeployment, bool) { // SetDeployment sets the value of the Deployment field in CreateJob. func (o *CreateJob) SetDeployment(ctx context.Context, v JobDeployment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] - o.Deployment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Deployment = vs } // GetEmailNotifications returns the value of the EmailNotifications field in CreateJob as @@ -1514,7 +1496,10 @@ func (o *CreateJob) GetEmailNotifications(ctx context.Context) (JobEmailNotifica return e, false } var v []JobEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1526,9 +1511,8 @@ func (o *CreateJob) GetEmailNotifications(ctx context.Context) (JobEmailNotifica // SetEmailNotifications sets the value of the EmailNotifications field in CreateJob. func (o *CreateJob) SetEmailNotifications(ctx context.Context, v JobEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetEnvironments returns the value of the Environments field in CreateJob as @@ -1566,7 +1550,10 @@ func (o *CreateJob) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1578,9 +1565,8 @@ func (o *CreateJob) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in CreateJob. func (o *CreateJob) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetHealth returns the value of the Health field in CreateJob as @@ -1592,7 +1578,10 @@ func (o *CreateJob) GetHealth(ctx context.Context) (JobsHealthRules, bool) { return e, false } var v []JobsHealthRules - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1604,9 +1593,8 @@ func (o *CreateJob) GetHealth(ctx context.Context) (JobsHealthRules, bool) { // SetHealth sets the value of the Health field in CreateJob. func (o *CreateJob) SetHealth(ctx context.Context, v JobsHealthRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetJobClusters returns the value of the JobClusters field in CreateJob as @@ -1644,7 +1632,10 @@ func (o *CreateJob) GetNotificationSettings(ctx context.Context) (JobNotificatio return e, false } var v []JobNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1656,9 +1647,8 @@ func (o *CreateJob) GetNotificationSettings(ctx context.Context) (JobNotificatio // SetNotificationSettings sets the value of the NotificationSettings field in CreateJob. func (o *CreateJob) SetNotificationSettings(ctx context.Context, v JobNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetParameters returns the value of the Parameters field in CreateJob as @@ -1696,7 +1686,10 @@ func (o *CreateJob) GetQueue(ctx context.Context) (QueueSettings, bool) { return e, false } var v []QueueSettings - d := o.Queue.ElementsAs(ctx, &v, true) + d := o.Queue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1708,9 +1701,8 @@ func (o *CreateJob) GetQueue(ctx context.Context) (QueueSettings, bool) { // SetQueue sets the value of the Queue field in CreateJob. func (o *CreateJob) SetQueue(ctx context.Context, v QueueSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] - o.Queue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Queue = vs } // GetRunAs returns the value of the RunAs field in CreateJob as @@ -1722,7 +1714,10 @@ func (o *CreateJob) GetRunAs(ctx context.Context) (JobRunAs, bool) { return e, false } var v []JobRunAs - d := o.RunAs.ElementsAs(ctx, &v, true) + d := o.RunAs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1734,9 +1729,8 @@ func (o *CreateJob) GetRunAs(ctx context.Context) (JobRunAs, bool) { // SetRunAs sets the value of the RunAs field in CreateJob. func (o *CreateJob) SetRunAs(ctx context.Context, v JobRunAs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] - o.RunAs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunAs = vs } // GetSchedule returns the value of the Schedule field in CreateJob as @@ -1748,7 +1742,10 @@ func (o *CreateJob) GetSchedule(ctx context.Context) (CronSchedule, bool) { return e, false } var v []CronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1760,9 +1757,8 @@ func (o *CreateJob) GetSchedule(ctx context.Context) (CronSchedule, bool) { // SetSchedule sets the value of the Schedule field in CreateJob. func (o *CreateJob) SetSchedule(ctx context.Context, v CronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetTags returns the value of the Tags field in CreateJob as @@ -1826,7 +1822,10 @@ func (o *CreateJob) GetTrigger(ctx context.Context) (TriggerSettings, bool) { return e, false } var v []TriggerSettings - d := o.Trigger.ElementsAs(ctx, &v, true) + d := o.Trigger.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1838,9 +1837,8 @@ func (o *CreateJob) GetTrigger(ctx context.Context) (TriggerSettings, bool) { // SetTrigger sets the value of the Trigger field in CreateJob. func (o *CreateJob) SetTrigger(ctx context.Context, v TriggerSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] - o.Trigger = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Trigger = vs } // GetWebhookNotifications returns the value of the WebhookNotifications field in CreateJob as @@ -1852,7 +1850,10 @@ func (o *CreateJob) GetWebhookNotifications(ctx context.Context) (WebhookNotific return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1864,9 +1865,8 @@ func (o *CreateJob) GetWebhookNotifications(ctx context.Context) (WebhookNotific // SetWebhookNotifications sets the value of the WebhookNotifications field in CreateJob. func (o *CreateJob) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } // Job was created successfully @@ -2439,7 +2439,7 @@ type EnforcePolicyComplianceResponse struct { // clusters. Updated job settings are derived by applying policy default // values to the existing job clusters in order to satisfy policy // requirements. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"optional,object"` } func (newState *EnforcePolicyComplianceResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnforcePolicyComplianceResponse) { @@ -2483,9 +2483,7 @@ func (o EnforcePolicyComplianceResponse) Type(ctx context.Context) attr.Type { "job_cluster_changes": basetypes.ListType{ ElemType: EnforcePolicyComplianceForJobResponseJobClusterSettingsChange{}.Type(ctx), }, - "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), - }, + "settings": JobSettings{}.Type(ctx), }, } } @@ -2525,7 +2523,10 @@ func (o *EnforcePolicyComplianceResponse) GetSettings(ctx context.Context) (JobS return e, false } var v []JobSettings - d := o.Settings.ElementsAs(ctx, &v, true) + d := o.Settings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2537,9 +2538,8 @@ func (o *EnforcePolicyComplianceResponse) GetSettings(ctx context.Context) (JobS // SetSettings sets the value of the Settings field in EnforcePolicyComplianceResponse. func (o *EnforcePolicyComplianceResponse) SetSettings(ctx context.Context, v JobSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] - o.Settings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Settings = vs } // Run was exported successfully. @@ -2726,7 +2726,7 @@ type ForEachStats struct { // Sample of 3 most common error messages occurred during the iteration. ErrorMessageStats types.List `tfsdk:"error_message_stats" tf:"optional"` // Describes stats of the iteration. Only latest retries are considered. - TaskRunStats types.List `tfsdk:"task_run_stats" tf:"optional,object"` + TaskRunStats types.Object `tfsdk:"task_run_stats" tf:"optional,object"` } func (newState *ForEachStats) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachStats) { @@ -2768,9 +2768,7 @@ func (o ForEachStats) Type(ctx context.Context) attr.Type { "error_message_stats": basetypes.ListType{ ElemType: ForEachTaskErrorMessageStats{}.Type(ctx), }, - "task_run_stats": basetypes.ListType{ - ElemType: ForEachTaskTaskRunStats{}.Type(ctx), - }, + "task_run_stats": ForEachTaskTaskRunStats{}.Type(ctx), }, } } @@ -2810,7 +2808,10 @@ func (o *ForEachStats) GetTaskRunStats(ctx context.Context) (ForEachTaskTaskRunS return e, false } var v []ForEachTaskTaskRunStats - d := o.TaskRunStats.ElementsAs(ctx, &v, true) + d := o.TaskRunStats.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2822,9 +2823,8 @@ func (o *ForEachStats) GetTaskRunStats(ctx context.Context) (ForEachTaskTaskRunS // SetTaskRunStats sets the value of the TaskRunStats field in ForEachStats. func (o *ForEachStats) SetTaskRunStats(ctx context.Context, v ForEachTaskTaskRunStats) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task_run_stats"] - o.TaskRunStats = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TaskRunStats = vs } type ForEachTask struct { @@ -2836,7 +2836,7 @@ type ForEachTask struct { // an array parameter. Inputs types.String `tfsdk:"inputs" tf:""` // Configuration for the task that will be run for each element in the array - Task types.List `tfsdk:"task" tf:"object"` + Task types.Object `tfsdk:"task" tf:"object"` } func (newState *ForEachTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan ForEachTask) { @@ -2877,9 +2877,7 @@ func (o ForEachTask) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "concurrency": types.Int64Type, "inputs": types.StringType, - "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), - }, + "task": Task{}.Type(ctx), }, } } @@ -2893,7 +2891,10 @@ func (o *ForEachTask) GetTask(ctx context.Context) (Task, bool) { return e, false } var v []Task - d := o.Task.ElementsAs(ctx, &v, true) + d := o.Task.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2905,9 +2906,8 @@ func (o *ForEachTask) GetTask(ctx context.Context) (Task, bool) { // SetTask sets the value of the Task field in ForEachTask. func (o *ForEachTask) SetTask(ctx context.Context, v Task) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task"] - o.Task = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Task = vs } type ForEachTaskErrorMessageStats struct { @@ -3520,7 +3520,7 @@ type GitSource struct { GitProvider types.String `tfsdk:"git_provider" tf:""` // Read-only state of the remote repository at the time the job was run. // This field is only included on job runs. - GitSnapshot types.List `tfsdk:"git_snapshot" tf:"optional,object"` + GitSnapshot types.Object `tfsdk:"git_snapshot" tf:"optional,object"` // Name of the tag to be checked out and used by this job. This field cannot // be specified in conjunction with git_branch or git_commit. GitTag types.String `tfsdk:"tag" tf:"optional"` @@ -3528,7 +3528,7 @@ type GitSource struct { GitUrl types.String `tfsdk:"url" tf:""` // The source of the job specification in the remote repository when the job // is source controlled. - JobSource types.List `tfsdk:"job_source" tf:"optional,object"` + JobSource types.Object `tfsdk:"job_source" tf:"optional,object"` } func (newState *GitSource) SyncEffectiveFieldsDuringCreateOrUpdate(plan GitSource) { @@ -3575,14 +3575,10 @@ func (o GitSource) Type(ctx context.Context) attr.Type { "branch": types.StringType, "commit": types.StringType, "git_provider": types.StringType, - "git_snapshot": basetypes.ListType{ - ElemType: GitSnapshot{}.Type(ctx), - }, - "tag": types.StringType, - "url": types.StringType, - "job_source": basetypes.ListType{ - ElemType: JobSource{}.Type(ctx), - }, + "git_snapshot": GitSnapshot{}.Type(ctx), + "tag": types.StringType, + "url": types.StringType, + "job_source": JobSource{}.Type(ctx), }, } } @@ -3596,7 +3592,10 @@ func (o *GitSource) GetGitSnapshot(ctx context.Context) (GitSnapshot, bool) { return e, false } var v []GitSnapshot - d := o.GitSnapshot.ElementsAs(ctx, &v, true) + d := o.GitSnapshot.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3608,9 +3607,8 @@ func (o *GitSource) GetGitSnapshot(ctx context.Context) (GitSnapshot, bool) { // SetGitSnapshot sets the value of the GitSnapshot field in GitSource. func (o *GitSource) SetGitSnapshot(ctx context.Context, v GitSnapshot) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_snapshot"] - o.GitSnapshot = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSnapshot = vs } // GetJobSource returns the value of the JobSource field in GitSource as @@ -3622,7 +3620,10 @@ func (o *GitSource) GetJobSource(ctx context.Context) (JobSource, bool) { return e, false } var v []JobSource - d := o.JobSource.ElementsAs(ctx, &v, true) + d := o.JobSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3634,9 +3635,8 @@ func (o *GitSource) GetJobSource(ctx context.Context) (JobSource, bool) { // SetJobSource sets the value of the JobSource field in GitSource. func (o *GitSource) SetJobSource(ctx context.Context, v JobSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_source"] - o.JobSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.JobSource = vs } // Job was retrieved successfully. @@ -3666,7 +3666,7 @@ type Job struct { RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` // Settings for this job and all of its runs. These settings can be updated // using the `resetJob` method. - Settings types.List `tfsdk:"settings" tf:"optional,object"` + Settings types.Object `tfsdk:"settings" tf:"optional,object"` } func (newState *Job) SyncEffectiveFieldsDuringCreateOrUpdate(plan Job) { @@ -3713,9 +3713,7 @@ func (o Job) Type(ctx context.Context) attr.Type { "effective_budget_policy_id": types.StringType, "job_id": types.Int64Type, "run_as_user_name": types.StringType, - "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), - }, + "settings": JobSettings{}.Type(ctx), }, } } @@ -3729,7 +3727,10 @@ func (o *Job) GetSettings(ctx context.Context) (JobSettings, bool) { return e, false } var v []JobSettings - d := o.Settings.ElementsAs(ctx, &v, true) + d := o.Settings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3741,9 +3742,8 @@ func (o *Job) GetSettings(ctx context.Context) (JobSettings, bool) { // SetSettings sets the value of the Settings field in Job. func (o *Job) SetSettings(ctx context.Context, v JobSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["settings"] - o.Settings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Settings = vs } type JobAccessControlRequest struct { @@ -3894,7 +3894,7 @@ type JobCluster struct { // determine which cluster to launch for the task execution. JobClusterKey types.String `tfsdk:"job_cluster_key" tf:""` // If new_cluster, a description of a cluster that is created for each task. - NewCluster types.List `tfsdk:"new_cluster" tf:"object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"object"` } func (newState *JobCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCluster) { @@ -3933,9 +3933,7 @@ func (o JobCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "job_cluster_key": types.StringType, - "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), - }, + "new_cluster": compute_tf.ClusterSpec{}.Type(ctx), }, } } @@ -3949,7 +3947,10 @@ func (o *JobCluster) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, return e, false } var v []compute_tf.ClusterSpec - d := o.NewCluster.ElementsAs(ctx, &v, true) + d := o.NewCluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3961,9 +3962,8 @@ func (o *JobCluster) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, // SetNewCluster sets the value of the NewCluster field in JobCluster. func (o *JobCluster) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] - o.NewCluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewCluster = vs } type JobCompliance struct { @@ -4333,7 +4333,7 @@ type JobEnvironment struct { // The environment entity used to preserve serverless environment side panel // and jobs' environment for non-notebook task. In this minimal environment // spec, only pip dependencies are supported. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"optional,object"` } func (newState *JobEnvironment) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEnvironment) { @@ -4372,9 +4372,7 @@ func (o JobEnvironment) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "environment_key": types.StringType, - "spec": basetypes.ListType{ - ElemType: compute_tf.Environment{}.Type(ctx), - }, + "spec": compute_tf.Environment{}.Type(ctx), }, } } @@ -4388,7 +4386,10 @@ func (o *JobEnvironment) GetSpec(ctx context.Context) (compute_tf.Environment, b return e, false } var v []compute_tf.Environment - d := o.Spec.ElementsAs(ctx, &v, true) + d := o.Spec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4400,9 +4401,8 @@ func (o *JobEnvironment) GetSpec(ctx context.Context) (compute_tf.Environment, b // SetSpec sets the value of the Spec field in JobEnvironment. func (o *JobEnvironment) SetSpec(ctx context.Context, v compute_tf.Environment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] - o.Spec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Spec = vs } type JobNotificationSettings struct { @@ -4890,9 +4890,9 @@ type JobSettings struct { // An optional continuous property for this job. The continuous property // will ensure that there is always one run executing. Only one of // `schedule` and `continuous` can be used. - Continuous types.List `tfsdk:"continuous" tf:"optional,object"` + Continuous types.Object `tfsdk:"continuous" tf:"optional,object"` // Deployment information for jobs managed by external sources. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` // An optional description for the job. The maximum length is 27700 // characters in UTF-8 encoding. Description types.String `tfsdk:"description" tf:"optional"` @@ -4903,7 +4903,7 @@ type JobSettings struct { EditMode types.String `tfsdk:"edit_mode" tf:"optional"` // An optional set of email addresses that is notified when runs of this job // begin or complete as well as when this job is deleted. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // A list of task execution environment specifications that can be // referenced by serverless tasks of this job. An environment is required to // be present for serverless tasks. For serverless notebook tasks, the @@ -4925,9 +4925,9 @@ 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.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // A list of job cluster specifications that can be shared and reused by // tasks of this job. Libraries cannot be declared in a shared job cluster. // You must declare dependent libraries in task settings. @@ -4950,21 +4950,21 @@ type JobSettings struct { // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // job. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // Job-level parameter definitions Parameters types.List `tfsdk:"parameter" tf:"optional"` // The queue settings of the job. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"optional,object"` // Write-only setting. Specifies the user or service principal that the job // runs as. If not specified, the job runs as the user who created the job. // // Either `user_name` or `service_principal_name` should be specified. If // not, an error is thrown. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI // or sending an API request to `runNow`. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // A map of tags associated with the job. These are forwarded to the cluster // as cluster tags for jobs clusters, and are subject to the same // limitations as cluster tags. A maximum of 25 tags can be added to the @@ -4978,10 +4978,10 @@ type JobSettings struct { // A configuration to trigger a run when certain conditions are met. The // default behavior is that the job runs only when triggered by clicking // “Run Now” in the Jobs UI or sending an API request to `runNow`. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` // A collection of system notification IDs to notify when runs of this job // begin or complete. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *JobSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSettings) { @@ -5055,61 +5055,39 @@ func (o JobSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o JobSettings) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "budget_policy_id": types.StringType, - "continuous": basetypes.ListType{ - ElemType: Continuous{}.Type(ctx), - }, - "deployment": basetypes.ListType{ - ElemType: JobDeployment{}.Type(ctx), - }, - "description": types.StringType, - "edit_mode": types.StringType, - "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), - }, + "budget_policy_id": types.StringType, + "continuous": Continuous{}.Type(ctx), + "deployment": JobDeployment{}.Type(ctx), + "description": types.StringType, + "edit_mode": types.StringType, + "email_notifications": JobEmailNotifications{}.Type(ctx), "environment": basetypes.ListType{ ElemType: JobEnvironment{}.Type(ctx), }, - "format": types.StringType, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, - "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), - }, + "format": types.StringType, + "git_source": GitSource{}.Type(ctx), + "health": JobsHealthRules{}.Type(ctx), "job_cluster": basetypes.ListType{ ElemType: JobCluster{}.Type(ctx), }, - "max_concurrent_runs": types.Int64Type, - "name": types.StringType, - "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), - }, + "max_concurrent_runs": types.Int64Type, + "name": types.StringType, + "notification_settings": JobNotificationSettings{}.Type(ctx), "parameter": basetypes.ListType{ ElemType: JobParameterDefinition{}.Type(ctx), }, - "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), - }, - "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), - }, - "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), - }, + "queue": QueueSettings{}.Type(ctx), + "run_as": JobRunAs{}.Type(ctx), + "schedule": CronSchedule{}.Type(ctx), "tags": basetypes.MapType{ ElemType: types.StringType, }, "task": basetypes.ListType{ ElemType: Task{}.Type(ctx), }, - "timeout_seconds": types.Int64Type, - "trigger": basetypes.ListType{ - ElemType: TriggerSettings{}.Type(ctx), - }, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "timeout_seconds": types.Int64Type, + "trigger": TriggerSettings{}.Type(ctx), + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -5123,7 +5101,10 @@ func (o *JobSettings) GetContinuous(ctx context.Context) (Continuous, bool) { return e, false } var v []Continuous - d := o.Continuous.ElementsAs(ctx, &v, true) + d := o.Continuous.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5135,9 +5116,8 @@ func (o *JobSettings) GetContinuous(ctx context.Context) (Continuous, bool) { // SetContinuous sets the value of the Continuous field in JobSettings. func (o *JobSettings) SetContinuous(ctx context.Context, v Continuous) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["continuous"] - o.Continuous = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Continuous = vs } // GetDeployment returns the value of the Deployment field in JobSettings as @@ -5149,7 +5129,10 @@ func (o *JobSettings) GetDeployment(ctx context.Context) (JobDeployment, bool) { return e, false } var v []JobDeployment - d := o.Deployment.ElementsAs(ctx, &v, true) + d := o.Deployment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5161,9 +5144,8 @@ func (o *JobSettings) GetDeployment(ctx context.Context) (JobDeployment, bool) { // SetDeployment sets the value of the Deployment field in JobSettings. func (o *JobSettings) SetDeployment(ctx context.Context, v JobDeployment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] - o.Deployment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Deployment = vs } // GetEmailNotifications returns the value of the EmailNotifications field in JobSettings as @@ -5175,7 +5157,10 @@ func (o *JobSettings) GetEmailNotifications(ctx context.Context) (JobEmailNotifi return e, false } var v []JobEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5187,9 +5172,8 @@ func (o *JobSettings) GetEmailNotifications(ctx context.Context) (JobEmailNotifi // SetEmailNotifications sets the value of the EmailNotifications field in JobSettings. func (o *JobSettings) SetEmailNotifications(ctx context.Context, v JobEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetEnvironments returns the value of the Environments field in JobSettings as @@ -5227,7 +5211,10 @@ func (o *JobSettings) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5239,9 +5226,8 @@ func (o *JobSettings) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in JobSettings. func (o *JobSettings) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetHealth returns the value of the Health field in JobSettings as @@ -5253,7 +5239,10 @@ func (o *JobSettings) GetHealth(ctx context.Context) (JobsHealthRules, bool) { return e, false } var v []JobsHealthRules - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5265,9 +5254,8 @@ func (o *JobSettings) GetHealth(ctx context.Context) (JobsHealthRules, bool) { // SetHealth sets the value of the Health field in JobSettings. func (o *JobSettings) SetHealth(ctx context.Context, v JobsHealthRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetJobClusters returns the value of the JobClusters field in JobSettings as @@ -5305,7 +5293,10 @@ func (o *JobSettings) GetNotificationSettings(ctx context.Context) (JobNotificat return e, false } var v []JobNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5317,9 +5308,8 @@ func (o *JobSettings) GetNotificationSettings(ctx context.Context) (JobNotificat // SetNotificationSettings sets the value of the NotificationSettings field in JobSettings. func (o *JobSettings) SetNotificationSettings(ctx context.Context, v JobNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetParameters returns the value of the Parameters field in JobSettings as @@ -5357,7 +5347,10 @@ func (o *JobSettings) GetQueue(ctx context.Context) (QueueSettings, bool) { return e, false } var v []QueueSettings - d := o.Queue.ElementsAs(ctx, &v, true) + d := o.Queue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5369,9 +5362,8 @@ func (o *JobSettings) GetQueue(ctx context.Context) (QueueSettings, bool) { // SetQueue sets the value of the Queue field in JobSettings. func (o *JobSettings) SetQueue(ctx context.Context, v QueueSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] - o.Queue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Queue = vs } // GetRunAs returns the value of the RunAs field in JobSettings as @@ -5383,7 +5375,10 @@ func (o *JobSettings) GetRunAs(ctx context.Context) (JobRunAs, bool) { return e, false } var v []JobRunAs - d := o.RunAs.ElementsAs(ctx, &v, true) + d := o.RunAs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5395,9 +5390,8 @@ func (o *JobSettings) GetRunAs(ctx context.Context) (JobRunAs, bool) { // SetRunAs sets the value of the RunAs field in JobSettings. func (o *JobSettings) SetRunAs(ctx context.Context, v JobRunAs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] - o.RunAs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunAs = vs } // GetSchedule returns the value of the Schedule field in JobSettings as @@ -5409,7 +5403,10 @@ func (o *JobSettings) GetSchedule(ctx context.Context) (CronSchedule, bool) { return e, false } var v []CronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5421,9 +5418,8 @@ func (o *JobSettings) GetSchedule(ctx context.Context) (CronSchedule, bool) { // SetSchedule sets the value of the Schedule field in JobSettings. func (o *JobSettings) SetSchedule(ctx context.Context, v CronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetTags returns the value of the Tags field in JobSettings as @@ -5487,7 +5483,10 @@ func (o *JobSettings) GetTrigger(ctx context.Context) (TriggerSettings, bool) { return e, false } var v []TriggerSettings - d := o.Trigger.ElementsAs(ctx, &v, true) + d := o.Trigger.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5499,9 +5498,8 @@ func (o *JobSettings) GetTrigger(ctx context.Context) (TriggerSettings, bool) { // SetTrigger sets the value of the Trigger field in JobSettings. func (o *JobSettings) SetTrigger(ctx context.Context, v TriggerSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] - o.Trigger = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Trigger = vs } // GetWebhookNotifications returns the value of the WebhookNotifications field in JobSettings as @@ -5513,7 +5511,10 @@ func (o *JobSettings) GetWebhookNotifications(ctx context.Context) (WebhookNotif return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5525,9 +5526,8 @@ func (o *JobSettings) GetWebhookNotifications(ctx context.Context) (WebhookNotif // SetWebhookNotifications sets the value of the WebhookNotifications field in JobSettings. func (o *JobSettings) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } // The source of the job specification in the remote repository when the job is @@ -6717,9 +6717,9 @@ type RepairHistoryItem struct { // The start time of the (repaired) run. StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` // The run IDs of the task runs that ran as part of this repair history // item. TaskRunIds types.List `tfsdk:"task_run_ids" tf:"optional"` @@ -6773,12 +6773,8 @@ func (o RepairHistoryItem) Type(ctx context.Context) attr.Type { "end_time": types.Int64Type, "id": types.Int64Type, "start_time": types.Int64Type, - "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), - }, + "state": RunState{}.Type(ctx), + "status": RunStatus{}.Type(ctx), "task_run_ids": basetypes.ListType{ ElemType: types.Int64Type, }, @@ -6796,7 +6792,10 @@ func (o *RepairHistoryItem) GetState(ctx context.Context) (RunState, bool) { return e, false } var v []RunState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6808,9 +6807,8 @@ func (o *RepairHistoryItem) GetState(ctx context.Context) (RunState, bool) { // SetState sets the value of the State field in RepairHistoryItem. func (o *RepairHistoryItem) SetState(ctx context.Context, v RunState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetStatus returns the value of the Status field in RepairHistoryItem as @@ -6822,7 +6820,10 @@ func (o *RepairHistoryItem) GetStatus(ctx context.Context) (RunStatus, bool) { return e, false } var v []RunStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6834,9 +6835,8 @@ func (o *RepairHistoryItem) GetStatus(ctx context.Context) (RunStatus, bool) { // SetStatus sets the value of the Status field in RepairHistoryItem. func (o *RepairHistoryItem) SetStatus(ctx context.Context, v RunStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // GetTaskRunIds returns the value of the TaskRunIds field in RepairHistoryItem as @@ -6911,7 +6911,7 @@ type RepairRun struct { // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` // A list of parameters for jobs with Python tasks, for example @@ -7037,9 +7037,7 @@ func (o RepairRun) Type(ctx context.Context) attr.Type { "notebook_params": basetypes.MapType{ ElemType: types.StringType, }, - "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), - }, + "pipeline_params": PipelineParams{}.Type(ctx), "python_named_params": basetypes.MapType{ ElemType: types.StringType, }, @@ -7175,7 +7173,10 @@ func (o *RepairRun) GetPipelineParams(ctx context.Context) (PipelineParams, bool return e, false } var v []PipelineParams - d := o.PipelineParams.ElementsAs(ctx, &v, true) + d := o.PipelineParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7187,9 +7188,8 @@ func (o *RepairRun) GetPipelineParams(ctx context.Context) (PipelineParams, bool // SetPipelineParams sets the value of the PipelineParams field in RepairRun. func (o *RepairRun) SetPipelineParams(ctx context.Context, v PipelineParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] - o.PipelineParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineParams = vs } // GetPythonNamedParams returns the value of the PythonNamedParams field in RepairRun as @@ -7374,7 +7374,7 @@ type ResetJob struct { // // Changes to the field `JobBaseSettings.timeout_seconds` are applied to // active runs. Changes to other fields are applied to future runs only. - NewSettings types.List `tfsdk:"new_settings" tf:"object"` + NewSettings types.Object `tfsdk:"new_settings" tf:"object"` } func (newState *ResetJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResetJob) { @@ -7412,10 +7412,8 @@ func (o ResetJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o ResetJob) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "job_id": types.Int64Type, - "new_settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), - }, + "job_id": types.Int64Type, + "new_settings": JobSettings{}.Type(ctx), }, } } @@ -7429,7 +7427,10 @@ func (o *ResetJob) GetNewSettings(ctx context.Context) (JobSettings, bool) { return e, false } var v []JobSettings - d := o.NewSettings.ElementsAs(ctx, &v, true) + d := o.NewSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7441,9 +7442,8 @@ func (o *ResetJob) GetNewSettings(ctx context.Context) (JobSettings, bool) { // SetNewSettings sets the value of the NewSettings field in ResetJob. func (o *ResetJob) SetNewSettings(ctx context.Context, v JobSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_settings"] - o.NewSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewSettings = vs } type ResetResponse struct { @@ -8020,25 +8020,25 @@ func (o *ResolvedStringParamsValues) SetParameters(ctx context.Context, v []type } type ResolvedValues struct { - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` - SimulationTask types.List `tfsdk:"simulation_task" tf:"optional,object"` + SimulationTask types.Object `tfsdk:"simulation_task" tf:"optional,object"` - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` } func (newState *ResolvedValues) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResolvedValues) { @@ -8093,36 +8093,16 @@ func (o ResolvedValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o ResolvedValues) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition_task": basetypes.ListType{ - ElemType: ResolvedConditionTaskValues{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: ResolvedDbtTaskValues{}.Type(ctx), - }, - "notebook_task": basetypes.ListType{ - ElemType: ResolvedNotebookTaskValues{}.Type(ctx), - }, - "python_wheel_task": basetypes.ListType{ - ElemType: ResolvedPythonWheelTaskValues{}.Type(ctx), - }, - "run_job_task": basetypes.ListType{ - ElemType: ResolvedRunJobTaskValues{}.Type(ctx), - }, - "simulation_task": basetypes.ListType{ - ElemType: ResolvedParamPairValues{}.Type(ctx), - }, - "spark_jar_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), - }, - "spark_python_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), - }, - "spark_submit_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), - }, - "sql_task": basetypes.ListType{ - ElemType: ResolvedParamPairValues{}.Type(ctx), - }, + "condition_task": ResolvedConditionTaskValues{}.Type(ctx), + "dbt_task": ResolvedDbtTaskValues{}.Type(ctx), + "notebook_task": ResolvedNotebookTaskValues{}.Type(ctx), + "python_wheel_task": ResolvedPythonWheelTaskValues{}.Type(ctx), + "run_job_task": ResolvedRunJobTaskValues{}.Type(ctx), + "simulation_task": ResolvedParamPairValues{}.Type(ctx), + "spark_jar_task": ResolvedStringParamsValues{}.Type(ctx), + "spark_python_task": ResolvedStringParamsValues{}.Type(ctx), + "spark_submit_task": ResolvedStringParamsValues{}.Type(ctx), + "sql_task": ResolvedParamPairValues{}.Type(ctx), }, } } @@ -8136,7 +8116,10 @@ func (o *ResolvedValues) GetConditionTask(ctx context.Context) (ResolvedConditio return e, false } var v []ResolvedConditionTaskValues - d := o.ConditionTask.ElementsAs(ctx, &v, true) + d := o.ConditionTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8148,9 +8131,8 @@ func (o *ResolvedValues) GetConditionTask(ctx context.Context) (ResolvedConditio // SetConditionTask sets the value of the ConditionTask field in ResolvedValues. func (o *ResolvedValues) SetConditionTask(ctx context.Context, v ResolvedConditionTaskValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] - o.ConditionTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConditionTask = vs } // GetDbtTask returns the value of the DbtTask field in ResolvedValues as @@ -8162,7 +8144,10 @@ func (o *ResolvedValues) GetDbtTask(ctx context.Context) (ResolvedDbtTaskValues, return e, false } var v []ResolvedDbtTaskValues - d := o.DbtTask.ElementsAs(ctx, &v, true) + d := o.DbtTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8174,9 +8159,8 @@ func (o *ResolvedValues) GetDbtTask(ctx context.Context) (ResolvedDbtTaskValues, // SetDbtTask sets the value of the DbtTask field in ResolvedValues. func (o *ResolvedValues) SetDbtTask(ctx context.Context, v ResolvedDbtTaskValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] - o.DbtTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DbtTask = vs } // GetNotebookTask returns the value of the NotebookTask field in ResolvedValues as @@ -8188,7 +8172,10 @@ func (o *ResolvedValues) GetNotebookTask(ctx context.Context) (ResolvedNotebookT return e, false } var v []ResolvedNotebookTaskValues - d := o.NotebookTask.ElementsAs(ctx, &v, true) + d := o.NotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8200,9 +8187,8 @@ func (o *ResolvedValues) GetNotebookTask(ctx context.Context) (ResolvedNotebookT // SetNotebookTask sets the value of the NotebookTask field in ResolvedValues. func (o *ResolvedValues) SetNotebookTask(ctx context.Context, v ResolvedNotebookTaskValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] - o.NotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookTask = vs } // GetPythonWheelTask returns the value of the PythonWheelTask field in ResolvedValues as @@ -8214,7 +8200,10 @@ func (o *ResolvedValues) GetPythonWheelTask(ctx context.Context) (ResolvedPython return e, false } var v []ResolvedPythonWheelTaskValues - d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + d := o.PythonWheelTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8226,9 +8215,8 @@ func (o *ResolvedValues) GetPythonWheelTask(ctx context.Context) (ResolvedPython // SetPythonWheelTask sets the value of the PythonWheelTask field in ResolvedValues. func (o *ResolvedValues) SetPythonWheelTask(ctx context.Context, v ResolvedPythonWheelTaskValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] - o.PythonWheelTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PythonWheelTask = vs } // GetRunJobTask returns the value of the RunJobTask field in ResolvedValues as @@ -8240,7 +8228,10 @@ func (o *ResolvedValues) GetRunJobTask(ctx context.Context) (ResolvedRunJobTaskV return e, false } var v []ResolvedRunJobTaskValues - d := o.RunJobTask.ElementsAs(ctx, &v, true) + d := o.RunJobTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8252,9 +8243,8 @@ func (o *ResolvedValues) GetRunJobTask(ctx context.Context) (ResolvedRunJobTaskV // SetRunJobTask sets the value of the RunJobTask field in ResolvedValues. func (o *ResolvedValues) SetRunJobTask(ctx context.Context, v ResolvedRunJobTaskValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] - o.RunJobTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunJobTask = vs } // GetSimulationTask returns the value of the SimulationTask field in ResolvedValues as @@ -8266,7 +8256,10 @@ func (o *ResolvedValues) GetSimulationTask(ctx context.Context) (ResolvedParamPa return e, false } var v []ResolvedParamPairValues - d := o.SimulationTask.ElementsAs(ctx, &v, true) + d := o.SimulationTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8278,9 +8271,8 @@ func (o *ResolvedValues) GetSimulationTask(ctx context.Context) (ResolvedParamPa // SetSimulationTask sets the value of the SimulationTask field in ResolvedValues. func (o *ResolvedValues) SetSimulationTask(ctx context.Context, v ResolvedParamPairValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["simulation_task"] - o.SimulationTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SimulationTask = vs } // GetSparkJarTask returns the value of the SparkJarTask field in ResolvedValues as @@ -8292,7 +8284,10 @@ func (o *ResolvedValues) GetSparkJarTask(ctx context.Context) (ResolvedStringPar return e, false } var v []ResolvedStringParamsValues - d := o.SparkJarTask.ElementsAs(ctx, &v, true) + d := o.SparkJarTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8304,9 +8299,8 @@ func (o *ResolvedValues) GetSparkJarTask(ctx context.Context) (ResolvedStringPar // SetSparkJarTask sets the value of the SparkJarTask field in ResolvedValues. func (o *ResolvedValues) SetSparkJarTask(ctx context.Context, v ResolvedStringParamsValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] - o.SparkJarTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkJarTask = vs } // GetSparkPythonTask returns the value of the SparkPythonTask field in ResolvedValues as @@ -8318,7 +8312,10 @@ func (o *ResolvedValues) GetSparkPythonTask(ctx context.Context) (ResolvedString return e, false } var v []ResolvedStringParamsValues - d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + d := o.SparkPythonTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8330,9 +8327,8 @@ func (o *ResolvedValues) GetSparkPythonTask(ctx context.Context) (ResolvedString // SetSparkPythonTask sets the value of the SparkPythonTask field in ResolvedValues. func (o *ResolvedValues) SetSparkPythonTask(ctx context.Context, v ResolvedStringParamsValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] - o.SparkPythonTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkPythonTask = vs } // GetSparkSubmitTask returns the value of the SparkSubmitTask field in ResolvedValues as @@ -8344,7 +8340,10 @@ func (o *ResolvedValues) GetSparkSubmitTask(ctx context.Context) (ResolvedString return e, false } var v []ResolvedStringParamsValues - d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + d := o.SparkSubmitTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8356,9 +8355,8 @@ func (o *ResolvedValues) GetSparkSubmitTask(ctx context.Context) (ResolvedString // SetSparkSubmitTask sets the value of the SparkSubmitTask field in ResolvedValues. func (o *ResolvedValues) SetSparkSubmitTask(ctx context.Context, v ResolvedStringParamsValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] - o.SparkSubmitTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkSubmitTask = vs } // GetSqlTask returns the value of the SqlTask field in ResolvedValues as @@ -8370,7 +8368,10 @@ func (o *ResolvedValues) GetSqlTask(ctx context.Context) (ResolvedParamPairValue return e, false } var v []ResolvedParamPairValues - d := o.SqlTask.ElementsAs(ctx, &v, true) + d := o.SqlTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8382,9 +8383,8 @@ func (o *ResolvedValues) GetSqlTask(ctx context.Context) (ResolvedParamPairValue // SetSqlTask sets the value of the SqlTask field in ResolvedValues. func (o *ResolvedValues) SetSqlTask(ctx context.Context, v ResolvedParamPairValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] - o.SqlTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlTask = vs } // Run was retrieved successfully @@ -8406,10 +8406,10 @@ type Run struct { // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` // A snapshot of the job’s cluster specification when this run was // created. - ClusterSpec types.List `tfsdk:"cluster_spec" tf:"optional,object"` + ClusterSpec types.Object `tfsdk:"cluster_spec" tf:"optional,object"` // The creator user name. This field won’t be included in the response if // the user has already been deleted. CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` @@ -8436,7 +8436,7 @@ type Run struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // Only populated by for-each iterations. The parent for-each task is // located in tasks array. Iterations types.List `tfsdk:"iterations" tf:"optional"` @@ -8462,7 +8462,7 @@ type Run struct { // run_id of the original attempt; otherwise, it is the same as the run_id. OriginalAttemptRunId types.Int64 `tfsdk:"original_attempt_run_id" tf:"optional"` // The parameters used for this run. - OverridingParameters types.List `tfsdk:"overriding_parameters" tf:"optional,object"` + OverridingParameters types.Object `tfsdk:"overriding_parameters" tf:"optional,object"` // The time in milliseconds that the run has spent in the queue. QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` // The repair history of the run. @@ -8487,7 +8487,7 @@ type Run struct { RunType types.String `tfsdk:"run_type" tf:"optional"` // The cron schedule that triggered this run if it was triggered by the // periodic scheduler. - Schedule types.List `tfsdk:"schedule" tf:"optional,object"` + Schedule types.Object `tfsdk:"schedule" tf:"optional,object"` // The time in milliseconds it took to set up the cluster. For runs that run // on new clusters this is the cluster creation time, for runs that run on // existing clusters this time should be very short. The duration of a task @@ -8502,9 +8502,9 @@ type Run struct { // new cluster, this is the time the cluster creation call is issued. StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` // The list of tasks performed by the run. Each task has its own `run_id` // which you can use to call `JobsGetOutput` to retrieve the run resutls. Tasks types.List `tfsdk:"tasks" tf:"optional"` @@ -8520,7 +8520,7 @@ type Run struct { // arrival. * `TABLE`: Indicates a run that is triggered by a table update. Trigger types.String `tfsdk:"trigger" tf:"optional"` // Additional details about what triggered the run - TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` + TriggerInfo types.Object `tfsdk:"trigger_info" tf:"optional,object"` } func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { @@ -8601,21 +8601,15 @@ func (o Run) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Run) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attempt_number": types.Int64Type, - "cleanup_duration": types.Int64Type, - "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), - }, - "cluster_spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), - }, + "attempt_number": types.Int64Type, + "cleanup_duration": types.Int64Type, + "cluster_instance": ClusterInstance{}.Type(ctx), + "cluster_spec": ClusterSpec{}.Type(ctx), "creator_user_name": types.StringType, "description": types.StringType, "end_time": types.Int64Type, "execution_duration": types.Int64Type, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, + "git_source": GitSource{}.Type(ctx), "iterations": basetypes.ListType{ ElemType: RunTask{}.Type(ctx), }, @@ -8630,36 +8624,26 @@ func (o Run) Type(ctx context.Context) attr.Type { "next_page_token": types.StringType, "number_in_job": types.Int64Type, "original_attempt_run_id": types.Int64Type, - "overriding_parameters": basetypes.ListType{ - ElemType: RunParameters{}.Type(ctx), - }, - "queue_duration": types.Int64Type, + "overriding_parameters": RunParameters{}.Type(ctx), + "queue_duration": types.Int64Type, "repair_history": basetypes.ListType{ ElemType: RepairHistoryItem{}.Type(ctx), }, - "run_duration": types.Int64Type, - "run_id": types.Int64Type, - "run_name": types.StringType, - "run_page_url": types.StringType, - "run_type": types.StringType, - "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), - }, + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_name": types.StringType, + "run_page_url": types.StringType, + "run_type": types.StringType, + "schedule": CronSchedule{}.Type(ctx), "setup_duration": types.Int64Type, "start_time": types.Int64Type, - "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), - }, + "state": RunState{}.Type(ctx), + "status": RunStatus{}.Type(ctx), "tasks": basetypes.ListType{ ElemType: RunTask{}.Type(ctx), }, - "trigger": types.StringType, - "trigger_info": basetypes.ListType{ - ElemType: TriggerInfo{}.Type(ctx), - }, + "trigger": types.StringType, + "trigger_info": TriggerInfo{}.Type(ctx), }, } } @@ -8673,7 +8657,10 @@ func (o *Run) GetClusterInstance(ctx context.Context) (ClusterInstance, bool) { return e, false } var v []ClusterInstance - d := o.ClusterInstance.ElementsAs(ctx, &v, true) + d := o.ClusterInstance.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8685,9 +8672,8 @@ func (o *Run) GetClusterInstance(ctx context.Context) (ClusterInstance, bool) { // SetClusterInstance sets the value of the ClusterInstance field in Run. func (o *Run) SetClusterInstance(ctx context.Context, v ClusterInstance) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] - o.ClusterInstance = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterInstance = vs } // GetClusterSpec returns the value of the ClusterSpec field in Run as @@ -8699,7 +8685,10 @@ func (o *Run) GetClusterSpec(ctx context.Context) (ClusterSpec, bool) { return e, false } var v []ClusterSpec - d := o.ClusterSpec.ElementsAs(ctx, &v, true) + d := o.ClusterSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8711,9 +8700,8 @@ func (o *Run) GetClusterSpec(ctx context.Context) (ClusterSpec, bool) { // SetClusterSpec sets the value of the ClusterSpec field in Run. func (o *Run) SetClusterSpec(ctx context.Context, v ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_spec"] - o.ClusterSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterSpec = vs } // GetGitSource returns the value of the GitSource field in Run as @@ -8725,7 +8713,10 @@ func (o *Run) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8737,9 +8728,8 @@ func (o *Run) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in Run. func (o *Run) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetIterations returns the value of the Iterations field in Run as @@ -8829,7 +8819,10 @@ func (o *Run) GetOverridingParameters(ctx context.Context) (RunParameters, bool) return e, false } var v []RunParameters - d := o.OverridingParameters.ElementsAs(ctx, &v, true) + d := o.OverridingParameters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8841,9 +8834,8 @@ func (o *Run) GetOverridingParameters(ctx context.Context) (RunParameters, bool) // SetOverridingParameters sets the value of the OverridingParameters field in Run. func (o *Run) SetOverridingParameters(ctx context.Context, v RunParameters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["overriding_parameters"] - o.OverridingParameters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OverridingParameters = vs } // GetRepairHistory returns the value of the RepairHistory field in Run as @@ -8881,7 +8873,10 @@ func (o *Run) GetSchedule(ctx context.Context) (CronSchedule, bool) { return e, false } var v []CronSchedule - d := o.Schedule.ElementsAs(ctx, &v, true) + d := o.Schedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8893,9 +8888,8 @@ func (o *Run) GetSchedule(ctx context.Context) (CronSchedule, bool) { // SetSchedule sets the value of the Schedule field in Run. func (o *Run) SetSchedule(ctx context.Context, v CronSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schedule"] - o.Schedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schedule = vs } // GetState returns the value of the State field in Run as @@ -8907,7 +8901,10 @@ func (o *Run) GetState(ctx context.Context) (RunState, bool) { return e, false } var v []RunState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8919,9 +8916,8 @@ func (o *Run) GetState(ctx context.Context) (RunState, bool) { // SetState sets the value of the State field in Run. func (o *Run) SetState(ctx context.Context, v RunState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetStatus returns the value of the Status field in Run as @@ -8933,7 +8929,10 @@ func (o *Run) GetStatus(ctx context.Context) (RunStatus, bool) { return e, false } var v []RunStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8945,9 +8944,8 @@ func (o *Run) GetStatus(ctx context.Context) (RunStatus, bool) { // SetStatus sets the value of the Status field in Run. func (o *Run) SetStatus(ctx context.Context, v RunStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // GetTasks returns the value of the Tasks field in Run as @@ -8985,7 +8983,10 @@ func (o *Run) GetTriggerInfo(ctx context.Context) (TriggerInfo, bool) { return e, false } var v []TriggerInfo - d := o.TriggerInfo.ElementsAs(ctx, &v, true) + d := o.TriggerInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8997,9 +8998,8 @@ func (o *Run) GetTriggerInfo(ctx context.Context) (TriggerInfo, bool) { // SetTriggerInfo sets the value of the TriggerInfo field in Run. func (o *Run) SetTriggerInfo(ctx context.Context, v TriggerInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger_info"] - o.TriggerInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TriggerInfo = vs } type RunConditionTask struct { @@ -9078,9 +9078,9 @@ type RunForEachTask struct { Inputs types.String `tfsdk:"inputs" tf:""` // Read only field. Populated for GetRun and ListRuns RPC calls and stores // the execution stats of an For each task - Stats types.List `tfsdk:"stats" tf:"optional,object"` + Stats types.Object `tfsdk:"stats" tf:"optional,object"` // Configuration for the task that will be run for each element in the array - Task types.List `tfsdk:"task" tf:"object"` + Task types.Object `tfsdk:"task" tf:"object"` } func (newState *RunForEachTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunForEachTask) { @@ -9123,12 +9123,8 @@ func (o RunForEachTask) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "concurrency": types.Int64Type, "inputs": types.StringType, - "stats": basetypes.ListType{ - ElemType: ForEachStats{}.Type(ctx), - }, - "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), - }, + "stats": ForEachStats{}.Type(ctx), + "task": Task{}.Type(ctx), }, } } @@ -9142,7 +9138,10 @@ func (o *RunForEachTask) GetStats(ctx context.Context) (ForEachStats, bool) { return e, false } var v []ForEachStats - d := o.Stats.ElementsAs(ctx, &v, true) + d := o.Stats.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9154,9 +9153,8 @@ func (o *RunForEachTask) GetStats(ctx context.Context) (ForEachStats, bool) { // SetStats sets the value of the Stats field in RunForEachTask. func (o *RunForEachTask) SetStats(ctx context.Context, v ForEachStats) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["stats"] - o.Stats = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Stats = vs } // GetTask returns the value of the Task field in RunForEachTask as @@ -9168,7 +9166,10 @@ func (o *RunForEachTask) GetTask(ctx context.Context) (Task, bool) { return e, false } var v []Task - d := o.Task.ElementsAs(ctx, &v, true) + d := o.Task.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9180,9 +9181,8 @@ func (o *RunForEachTask) GetTask(ctx context.Context) (Task, bool) { // SetTask sets the value of the Task field in RunForEachTask. func (o *RunForEachTask) SetTask(ctx context.Context, v Task) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["task"] - o.Task = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Task = vs } type RunJobOutput struct { @@ -9270,7 +9270,7 @@ type RunJobTask struct { // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` // A list of parameters for jobs with Python tasks, for example @@ -9380,9 +9380,7 @@ func (o RunJobTask) Type(ctx context.Context) attr.Type { "notebook_params": basetypes.MapType{ ElemType: types.StringType, }, - "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), - }, + "pipeline_params": PipelineParams{}.Type(ctx), "python_named_params": basetypes.MapType{ ElemType: types.StringType, }, @@ -9512,7 +9510,10 @@ func (o *RunJobTask) GetPipelineParams(ctx context.Context) (PipelineParams, boo return e, false } var v []PipelineParams - d := o.PipelineParams.ElementsAs(ctx, &v, true) + d := o.PipelineParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9524,9 +9525,8 @@ func (o *RunJobTask) GetPipelineParams(ctx context.Context) (PipelineParams, boo // SetPipelineParams sets the value of the PipelineParams field in RunJobTask. func (o *RunJobTask) SetPipelineParams(ctx context.Context, v PipelineParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] - o.PipelineParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineParams = vs } // GetPythonNamedParams returns the value of the PythonNamedParams field in RunJobTask as @@ -9695,7 +9695,7 @@ type RunNow struct { // provided, all tasks in the job will be run. Only types.List `tfsdk:"only" tf:"optional"` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` // A list of parameters for jobs with Python tasks, for example @@ -9717,7 +9717,7 @@ type RunNow struct { // [Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables PythonParams types.List `tfsdk:"python_params" tf:"optional"` // The queue settings of the run. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"optional,object"` // A list of parameters for jobs with spark submit task, for example // `"spark_submit_params": ["--class", // "org.apache.spark.examples.SparkPi"]`. The parameters are passed to @@ -9816,18 +9816,14 @@ func (o RunNow) Type(ctx context.Context) attr.Type { "only": basetypes.ListType{ ElemType: types.StringType, }, - "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), - }, + "pipeline_params": PipelineParams{}.Type(ctx), "python_named_params": basetypes.MapType{ ElemType: types.StringType, }, "python_params": basetypes.ListType{ ElemType: types.StringType, }, - "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), - }, + "queue": QueueSettings{}.Type(ctx), "spark_submit_params": basetypes.ListType{ ElemType: types.StringType, }, @@ -9977,7 +9973,10 @@ func (o *RunNow) GetPipelineParams(ctx context.Context) (PipelineParams, bool) { return e, false } var v []PipelineParams - d := o.PipelineParams.ElementsAs(ctx, &v, true) + d := o.PipelineParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9989,9 +9988,8 @@ func (o *RunNow) GetPipelineParams(ctx context.Context) (PipelineParams, bool) { // SetPipelineParams sets the value of the PipelineParams field in RunNow. func (o *RunNow) SetPipelineParams(ctx context.Context, v PipelineParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] - o.PipelineParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineParams = vs } // GetPythonNamedParams returns the value of the PythonNamedParams field in RunNow as @@ -10055,7 +10053,10 @@ func (o *RunNow) GetQueue(ctx context.Context) (QueueSettings, bool) { return e, false } var v []QueueSettings - d := o.Queue.ElementsAs(ctx, &v, true) + d := o.Queue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10067,9 +10068,8 @@ func (o *RunNow) GetQueue(ctx context.Context) (QueueSettings, bool) { // SetQueue sets the value of the Queue field in RunNow. func (o *RunNow) SetQueue(ctx context.Context, v QueueSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] - o.Queue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Queue = vs } // GetSparkSubmitParams returns the value of the SparkSubmitParams field in RunNow as @@ -10175,7 +10175,7 @@ func (o RunNowResponse) Type(ctx context.Context) attr.Type { // Run output was retrieved successfully. type RunOutput struct { // The output of a dbt task, if available. - DbtOutput types.List `tfsdk:"dbt_output" tf:"optional,object"` + DbtOutput types.Object `tfsdk:"dbt_output" tf:"optional,object"` // An error message indicating why a task failed or why output is not // available. The message is unstructured, and its exact format is subject // to change. @@ -10196,7 +10196,7 @@ type RunOutput struct { // Whether the logs are truncated. LogsTruncated types.Bool `tfsdk:"logs_truncated" tf:"optional"` // All details of the run except for its output. - Metadata types.List `tfsdk:"metadata" tf:"optional,object"` + Metadata types.Object `tfsdk:"metadata" tf:"optional,object"` // The output of a notebook task, if available. A notebook task that // terminates (either successfully or with a failure) without calling // `dbutils.notebook.exit()` is considered to have an empty output. This @@ -10205,11 +10205,11 @@ type RunOutput struct { // the [ClusterLogConf] field to configure log storage for the job cluster. // // [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf - NotebookOutput types.List `tfsdk:"notebook_output" tf:"optional,object"` + NotebookOutput types.Object `tfsdk:"notebook_output" tf:"optional,object"` // The output of a run job task, if available - RunJobOutput types.List `tfsdk:"run_job_output" tf:"optional,object"` + RunJobOutput types.Object `tfsdk:"run_job_output" tf:"optional,object"` // The output of a SQL task, if available. - SqlOutput types.List `tfsdk:"sql_output" tf:"optional,object"` + SqlOutput types.Object `tfsdk:"sql_output" tf:"optional,object"` } func (newState *RunOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunOutput) { @@ -10259,26 +10259,16 @@ func (o RunOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o RunOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "dbt_output": basetypes.ListType{ - ElemType: DbtOutput{}.Type(ctx), - }, - "error": types.StringType, - "error_trace": types.StringType, - "info": types.StringType, - "logs": types.StringType, - "logs_truncated": types.BoolType, - "metadata": basetypes.ListType{ - ElemType: Run{}.Type(ctx), - }, - "notebook_output": basetypes.ListType{ - ElemType: NotebookOutput{}.Type(ctx), - }, - "run_job_output": basetypes.ListType{ - ElemType: RunJobOutput{}.Type(ctx), - }, - "sql_output": basetypes.ListType{ - ElemType: SqlOutput{}.Type(ctx), - }, + "dbt_output": DbtOutput{}.Type(ctx), + "error": types.StringType, + "error_trace": types.StringType, + "info": types.StringType, + "logs": types.StringType, + "logs_truncated": types.BoolType, + "metadata": Run{}.Type(ctx), + "notebook_output": NotebookOutput{}.Type(ctx), + "run_job_output": RunJobOutput{}.Type(ctx), + "sql_output": SqlOutput{}.Type(ctx), }, } } @@ -10292,7 +10282,10 @@ func (o *RunOutput) GetDbtOutput(ctx context.Context) (DbtOutput, bool) { return e, false } var v []DbtOutput - d := o.DbtOutput.ElementsAs(ctx, &v, true) + d := o.DbtOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10304,9 +10297,8 @@ func (o *RunOutput) GetDbtOutput(ctx context.Context) (DbtOutput, bool) { // SetDbtOutput sets the value of the DbtOutput field in RunOutput. func (o *RunOutput) SetDbtOutput(ctx context.Context, v DbtOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_output"] - o.DbtOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DbtOutput = vs } // GetMetadata returns the value of the Metadata field in RunOutput as @@ -10318,7 +10310,10 @@ func (o *RunOutput) GetMetadata(ctx context.Context) (Run, bool) { return e, false } var v []Run - d := o.Metadata.ElementsAs(ctx, &v, true) + d := o.Metadata.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10330,9 +10325,8 @@ func (o *RunOutput) GetMetadata(ctx context.Context) (Run, bool) { // SetMetadata sets the value of the Metadata field in RunOutput. func (o *RunOutput) SetMetadata(ctx context.Context, v Run) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metadata"] - o.Metadata = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Metadata = vs } // GetNotebookOutput returns the value of the NotebookOutput field in RunOutput as @@ -10344,7 +10338,10 @@ func (o *RunOutput) GetNotebookOutput(ctx context.Context) (NotebookOutput, bool return e, false } var v []NotebookOutput - d := o.NotebookOutput.ElementsAs(ctx, &v, true) + d := o.NotebookOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10356,9 +10353,8 @@ func (o *RunOutput) GetNotebookOutput(ctx context.Context) (NotebookOutput, bool // SetNotebookOutput sets the value of the NotebookOutput field in RunOutput. func (o *RunOutput) SetNotebookOutput(ctx context.Context, v NotebookOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_output"] - o.NotebookOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookOutput = vs } // GetRunJobOutput returns the value of the RunJobOutput field in RunOutput as @@ -10370,7 +10366,10 @@ func (o *RunOutput) GetRunJobOutput(ctx context.Context) (RunJobOutput, bool) { return e, false } var v []RunJobOutput - d := o.RunJobOutput.ElementsAs(ctx, &v, true) + d := o.RunJobOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10382,9 +10381,8 @@ func (o *RunOutput) GetRunJobOutput(ctx context.Context) (RunJobOutput, bool) { // SetRunJobOutput sets the value of the RunJobOutput field in RunOutput. func (o *RunOutput) SetRunJobOutput(ctx context.Context, v RunJobOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_output"] - o.RunJobOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunJobOutput = vs } // GetSqlOutput returns the value of the SqlOutput field in RunOutput as @@ -10396,7 +10394,10 @@ func (o *RunOutput) GetSqlOutput(ctx context.Context) (SqlOutput, bool) { return e, false } var v []SqlOutput - d := o.SqlOutput.ElementsAs(ctx, &v, true) + d := o.SqlOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10408,9 +10409,8 @@ func (o *RunOutput) GetSqlOutput(ctx context.Context) (SqlOutput, bool) { // SetSqlOutput sets the value of the SqlOutput field in RunOutput. func (o *RunOutput) SetSqlOutput(ctx context.Context, v SqlOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_output"] - o.SqlOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlOutput = vs } type RunParameters struct { @@ -10452,7 +10452,7 @@ type RunParameters struct { // [dbutils.widgets.get]: https://docs.databricks.com/dev-tools/databricks-utils.html NotebookParams types.Map `tfsdk:"notebook_params" tf:"optional"` // Controls whether the pipeline should perform a full refresh - PipelineParams types.List `tfsdk:"pipeline_params" tf:"optional,object"` + PipelineParams types.Object `tfsdk:"pipeline_params" tf:"optional,object"` PythonNamedParams types.Map `tfsdk:"python_named_params" tf:"optional"` // A list of parameters for jobs with Python tasks, for example @@ -10555,9 +10555,7 @@ func (o RunParameters) Type(ctx context.Context) attr.Type { "notebook_params": basetypes.MapType{ ElemType: types.StringType, }, - "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), - }, + "pipeline_params": PipelineParams{}.Type(ctx), "python_named_params": basetypes.MapType{ ElemType: types.StringType, }, @@ -10661,7 +10659,10 @@ func (o *RunParameters) GetPipelineParams(ctx context.Context) (PipelineParams, return e, false } var v []PipelineParams - d := o.PipelineParams.ElementsAs(ctx, &v, true) + d := o.PipelineParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10673,9 +10674,8 @@ func (o *RunParameters) GetPipelineParams(ctx context.Context) (PipelineParams, // SetPipelineParams sets the value of the PipelineParams field in RunParameters. func (o *RunParameters) SetPipelineParams(ctx context.Context, v PipelineParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_params"] - o.PipelineParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineParams = vs } // GetPythonNamedParams returns the value of the PythonNamedParams field in RunParameters as @@ -10848,12 +10848,12 @@ func (o RunState) Type(ctx context.Context) attr.Type { // The current status of the run type RunStatus struct { // If the run was queued, details about the reason for queuing the run. - QueueDetails types.List `tfsdk:"queue_details" tf:"optional,object"` + QueueDetails types.Object `tfsdk:"queue_details" tf:"optional,object"` // The current state of the run. State types.String `tfsdk:"state" tf:"optional"` // If the run is in a TERMINATING or TERMINATED state, details about the // reason for terminating the run. - TerminationDetails types.List `tfsdk:"termination_details" tf:"optional,object"` + TerminationDetails types.Object `tfsdk:"termination_details" tf:"optional,object"` } func (newState *RunStatus) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunStatus) { @@ -10893,13 +10893,9 @@ func (o RunStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o RunStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "queue_details": basetypes.ListType{ - ElemType: QueueDetails{}.Type(ctx), - }, - "state": types.StringType, - "termination_details": basetypes.ListType{ - ElemType: TerminationDetails{}.Type(ctx), - }, + "queue_details": QueueDetails{}.Type(ctx), + "state": types.StringType, + "termination_details": TerminationDetails{}.Type(ctx), }, } } @@ -10913,7 +10909,10 @@ func (o *RunStatus) GetQueueDetails(ctx context.Context) (QueueDetails, bool) { return e, false } var v []QueueDetails - d := o.QueueDetails.ElementsAs(ctx, &v, true) + d := o.QueueDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10925,9 +10924,8 @@ func (o *RunStatus) GetQueueDetails(ctx context.Context) (QueueDetails, bool) { // SetQueueDetails sets the value of the QueueDetails field in RunStatus. func (o *RunStatus) SetQueueDetails(ctx context.Context, v QueueDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue_details"] - o.QueueDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueueDetails = vs } // GetTerminationDetails returns the value of the TerminationDetails field in RunStatus as @@ -10939,7 +10937,10 @@ func (o *RunStatus) GetTerminationDetails(ctx context.Context) (TerminationDetai return e, false } var v []TerminationDetails - d := o.TerminationDetails.ElementsAs(ctx, &v, true) + d := o.TerminationDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10951,9 +10952,8 @@ func (o *RunStatus) GetTerminationDetails(ctx context.Context) (TerminationDetai // SetTerminationDetails sets the value of the TerminationDetails field in RunStatus. func (o *RunStatus) SetTerminationDetails(ctx context.Context, v TerminationDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["termination_details"] - o.TerminationDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TerminationDetails = vs } // Used when outputting a child run, in GetRun or ListRuns. @@ -10975,16 +10975,16 @@ type RunTask struct { // The cluster used for this run. If the run is specified to use a new // cluster, this field is set once the Jobs service has requested a cluster // for the run. - ClusterInstance types.List `tfsdk:"cluster_instance" tf:"optional,object"` + ClusterInstance types.Object `tfsdk:"cluster_instance" tf:"optional,object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name @@ -10994,7 +10994,7 @@ type RunTask struct { Description types.String `tfsdk:"description" tf:"optional"` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // The time at which this run ended in epoch milliseconds (milliseconds // since 1/1/1970 UTC). This field is set to 0 if the job is still running. EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` @@ -11017,7 +11017,7 @@ type RunTask struct { ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` // An optional specification for a remote Git repository containing the // source code used by tasks. Version-controlled source code is supported by // notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, @@ -11026,7 +11026,7 @@ type RunTask struct { // `WORKSPACE` on the task. Note: dbt and SQL File tasks support only // version-controlled sources. If dbt or SQL File tasks are used, // `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` @@ -11035,23 +11035,23 @@ type RunTask struct { Libraries types.List `tfsdk:"library" tf:"optional"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` // The time in milliseconds that the run has spent in the queue. QueueDuration types.Int64 `tfsdk:"queue_duration" tf:"optional"` // Parameter values including resolved references - ResolvedValues types.List `tfsdk:"resolved_values" tf:"optional,object"` + ResolvedValues types.Object `tfsdk:"resolved_values" tf:"optional,object"` // The time in milliseconds it took the job run and all of its repairs to // finish. RunDuration types.Int64 `tfsdk:"run_duration" tf:"optional"` @@ -11063,7 +11063,7 @@ type RunTask struct { // possible values. RunIf types.String `tfsdk:"run_if" tf:"optional"` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` RunPageUrl types.String `tfsdk:"run_page_url" tf:"optional"` // The time in milliseconds it took to set up the cluster. For runs that run @@ -11075,10 +11075,10 @@ type RunTask struct { // `run_duration` field. SetupDuration types.Int64 `tfsdk:"setup_duration" tf:"optional"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -11097,19 +11097,19 @@ type RunTask struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` // The time at which this run was started in epoch milliseconds // (milliseconds since 1/1/1970 UTC). This may not be the time when the job // task starts executing, for example, if the job is scheduled to run on a // new cluster, this is the time the cluster creation call is issued. StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` // Deprecated. Please use the `status` field instead. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The current status of the run - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -11121,7 +11121,7 @@ type RunTask struct { // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *RunTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTask) { @@ -11219,87 +11219,47 @@ func (o RunTask) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "attempt_number": types.Int64Type, "cleanup_duration": types.Int64Type, - "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), - }, - "condition_task": basetypes.ListType{ - ElemType: RunConditionTask{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), - }, + "cluster_instance": ClusterInstance{}.Type(ctx), + "condition_task": RunConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, - "description": types.StringType, - "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), - }, + "description": types.StringType, + "email_notifications": JobEmailNotifications{}.Type(ctx), "end_time": types.Int64Type, "environment_key": types.StringType, "execution_duration": types.Int64Type, "existing_cluster_id": types.StringType, - "for_each_task": basetypes.ListType{ - ElemType: RunForEachTask{}.Type(ctx), - }, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, - "job_cluster_key": types.StringType, + "for_each_task": RunForEachTask{}.Type(ctx), + "git_source": GitSource{}.Type(ctx), + "job_cluster_key": types.StringType, "library": basetypes.ListType{ ElemType: compute_tf.Library{}.Type(ctx), }, - "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), - }, - "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), - }, - "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), - }, - "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), - }, - "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), - }, - "queue_duration": types.Int64Type, - "resolved_values": basetypes.ListType{ - ElemType: ResolvedValues{}.Type(ctx), - }, - "run_duration": types.Int64Type, - "run_id": types.Int64Type, - "run_if": types.StringType, - "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), - }, - "run_page_url": types.StringType, - "setup_duration": types.Int64Type, - "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), - }, - "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), - }, - "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), - }, - "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), - }, - "start_time": types.Int64Type, - "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), - }, - "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), - }, - "task_key": types.StringType, - "timeout_seconds": types.Int64Type, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "new_cluster": compute_tf.ClusterSpec{}.Type(ctx), + "notebook_task": NotebookTask{}.Type(ctx), + "notification_settings": TaskNotificationSettings{}.Type(ctx), + "pipeline_task": PipelineTask{}.Type(ctx), + "python_wheel_task": PythonWheelTask{}.Type(ctx), + "queue_duration": types.Int64Type, + "resolved_values": ResolvedValues{}.Type(ctx), + "run_duration": types.Int64Type, + "run_id": types.Int64Type, + "run_if": types.StringType, + "run_job_task": RunJobTask{}.Type(ctx), + "run_page_url": types.StringType, + "setup_duration": types.Int64Type, + "spark_jar_task": SparkJarTask{}.Type(ctx), + "spark_python_task": SparkPythonTask{}.Type(ctx), + "spark_submit_task": SparkSubmitTask{}.Type(ctx), + "sql_task": SqlTask{}.Type(ctx), + "start_time": types.Int64Type, + "state": RunState{}.Type(ctx), + "status": RunStatus{}.Type(ctx), + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -11313,7 +11273,10 @@ func (o *RunTask) GetClusterInstance(ctx context.Context) (ClusterInstance, bool return e, false } var v []ClusterInstance - d := o.ClusterInstance.ElementsAs(ctx, &v, true) + d := o.ClusterInstance.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11325,9 +11288,8 @@ func (o *RunTask) GetClusterInstance(ctx context.Context) (ClusterInstance, bool // SetClusterInstance sets the value of the ClusterInstance field in RunTask. func (o *RunTask) SetClusterInstance(ctx context.Context, v ClusterInstance) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_instance"] - o.ClusterInstance = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterInstance = vs } // GetConditionTask returns the value of the ConditionTask field in RunTask as @@ -11339,7 +11301,10 @@ func (o *RunTask) GetConditionTask(ctx context.Context) (RunConditionTask, bool) return e, false } var v []RunConditionTask - d := o.ConditionTask.ElementsAs(ctx, &v, true) + d := o.ConditionTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11351,9 +11316,8 @@ func (o *RunTask) GetConditionTask(ctx context.Context) (RunConditionTask, bool) // SetConditionTask sets the value of the ConditionTask field in RunTask. func (o *RunTask) SetConditionTask(ctx context.Context, v RunConditionTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] - o.ConditionTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConditionTask = vs } // GetDbtTask returns the value of the DbtTask field in RunTask as @@ -11365,7 +11329,10 @@ func (o *RunTask) GetDbtTask(ctx context.Context) (DbtTask, bool) { return e, false } var v []DbtTask - d := o.DbtTask.ElementsAs(ctx, &v, true) + d := o.DbtTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11377,9 +11344,8 @@ func (o *RunTask) GetDbtTask(ctx context.Context) (DbtTask, bool) { // SetDbtTask sets the value of the DbtTask field in RunTask. func (o *RunTask) SetDbtTask(ctx context.Context, v DbtTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] - o.DbtTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DbtTask = vs } // GetDependsOn returns the value of the DependsOn field in RunTask as @@ -11417,7 +11383,10 @@ func (o *RunTask) GetEmailNotifications(ctx context.Context) (JobEmailNotificati return e, false } var v []JobEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11429,9 +11398,8 @@ func (o *RunTask) GetEmailNotifications(ctx context.Context) (JobEmailNotificati // SetEmailNotifications sets the value of the EmailNotifications field in RunTask. func (o *RunTask) SetEmailNotifications(ctx context.Context, v JobEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetForEachTask returns the value of the ForEachTask field in RunTask as @@ -11443,7 +11411,10 @@ func (o *RunTask) GetForEachTask(ctx context.Context) (RunForEachTask, bool) { return e, false } var v []RunForEachTask - d := o.ForEachTask.ElementsAs(ctx, &v, true) + d := o.ForEachTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11455,9 +11426,8 @@ func (o *RunTask) GetForEachTask(ctx context.Context) (RunForEachTask, bool) { // SetForEachTask sets the value of the ForEachTask field in RunTask. func (o *RunTask) SetForEachTask(ctx context.Context, v RunForEachTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] - o.ForEachTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForEachTask = vs } // GetGitSource returns the value of the GitSource field in RunTask as @@ -11469,7 +11439,10 @@ func (o *RunTask) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11481,9 +11454,8 @@ func (o *RunTask) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in RunTask. func (o *RunTask) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetLibraries returns the value of the Libraries field in RunTask as @@ -11521,7 +11493,10 @@ func (o *RunTask) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, bo return e, false } var v []compute_tf.ClusterSpec - d := o.NewCluster.ElementsAs(ctx, &v, true) + d := o.NewCluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11533,9 +11508,8 @@ func (o *RunTask) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, bo // SetNewCluster sets the value of the NewCluster field in RunTask. func (o *RunTask) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] - o.NewCluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewCluster = vs } // GetNotebookTask returns the value of the NotebookTask field in RunTask as @@ -11547,7 +11521,10 @@ func (o *RunTask) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { return e, false } var v []NotebookTask - d := o.NotebookTask.ElementsAs(ctx, &v, true) + d := o.NotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11559,9 +11536,8 @@ func (o *RunTask) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { // SetNotebookTask sets the value of the NotebookTask field in RunTask. func (o *RunTask) SetNotebookTask(ctx context.Context, v NotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] - o.NotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookTask = vs } // GetNotificationSettings returns the value of the NotificationSettings field in RunTask as @@ -11573,7 +11549,10 @@ func (o *RunTask) GetNotificationSettings(ctx context.Context) (TaskNotification return e, false } var v []TaskNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11585,9 +11564,8 @@ func (o *RunTask) GetNotificationSettings(ctx context.Context) (TaskNotification // SetNotificationSettings sets the value of the NotificationSettings field in RunTask. func (o *RunTask) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetPipelineTask returns the value of the PipelineTask field in RunTask as @@ -11599,7 +11577,10 @@ func (o *RunTask) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { return e, false } var v []PipelineTask - d := o.PipelineTask.ElementsAs(ctx, &v, true) + d := o.PipelineTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11611,9 +11592,8 @@ func (o *RunTask) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { // SetPipelineTask sets the value of the PipelineTask field in RunTask. func (o *RunTask) SetPipelineTask(ctx context.Context, v PipelineTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] - o.PipelineTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineTask = vs } // GetPythonWheelTask returns the value of the PythonWheelTask field in RunTask as @@ -11625,7 +11605,10 @@ func (o *RunTask) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, bool return e, false } var v []PythonWheelTask - d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + d := o.PythonWheelTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11637,9 +11620,8 @@ func (o *RunTask) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, bool // SetPythonWheelTask sets the value of the PythonWheelTask field in RunTask. func (o *RunTask) SetPythonWheelTask(ctx context.Context, v PythonWheelTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] - o.PythonWheelTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PythonWheelTask = vs } // GetResolvedValues returns the value of the ResolvedValues field in RunTask as @@ -11651,7 +11633,10 @@ func (o *RunTask) GetResolvedValues(ctx context.Context) (ResolvedValues, bool) return e, false } var v []ResolvedValues - d := o.ResolvedValues.ElementsAs(ctx, &v, true) + d := o.ResolvedValues.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11663,9 +11648,8 @@ func (o *RunTask) GetResolvedValues(ctx context.Context) (ResolvedValues, bool) // SetResolvedValues sets the value of the ResolvedValues field in RunTask. func (o *RunTask) SetResolvedValues(ctx context.Context, v ResolvedValues) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["resolved_values"] - o.ResolvedValues = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ResolvedValues = vs } // GetRunJobTask returns the value of the RunJobTask field in RunTask as @@ -11677,7 +11661,10 @@ func (o *RunTask) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { return e, false } var v []RunJobTask - d := o.RunJobTask.ElementsAs(ctx, &v, true) + d := o.RunJobTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11689,9 +11676,8 @@ func (o *RunTask) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { // SetRunJobTask sets the value of the RunJobTask field in RunTask. func (o *RunTask) SetRunJobTask(ctx context.Context, v RunJobTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] - o.RunJobTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunJobTask = vs } // GetSparkJarTask returns the value of the SparkJarTask field in RunTask as @@ -11703,7 +11689,10 @@ func (o *RunTask) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { return e, false } var v []SparkJarTask - d := o.SparkJarTask.ElementsAs(ctx, &v, true) + d := o.SparkJarTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11715,9 +11704,8 @@ func (o *RunTask) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { // SetSparkJarTask sets the value of the SparkJarTask field in RunTask. func (o *RunTask) SetSparkJarTask(ctx context.Context, v SparkJarTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] - o.SparkJarTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkJarTask = vs } // GetSparkPythonTask returns the value of the SparkPythonTask field in RunTask as @@ -11729,7 +11717,10 @@ func (o *RunTask) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, bool return e, false } var v []SparkPythonTask - d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + d := o.SparkPythonTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11741,9 +11732,8 @@ func (o *RunTask) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, bool // SetSparkPythonTask sets the value of the SparkPythonTask field in RunTask. func (o *RunTask) SetSparkPythonTask(ctx context.Context, v SparkPythonTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] - o.SparkPythonTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkPythonTask = vs } // GetSparkSubmitTask returns the value of the SparkSubmitTask field in RunTask as @@ -11755,7 +11745,10 @@ func (o *RunTask) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, bool return e, false } var v []SparkSubmitTask - d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + d := o.SparkSubmitTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11767,9 +11760,8 @@ func (o *RunTask) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, bool // SetSparkSubmitTask sets the value of the SparkSubmitTask field in RunTask. func (o *RunTask) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] - o.SparkSubmitTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkSubmitTask = vs } // GetSqlTask returns the value of the SqlTask field in RunTask as @@ -11781,7 +11773,10 @@ func (o *RunTask) GetSqlTask(ctx context.Context) (SqlTask, bool) { return e, false } var v []SqlTask - d := o.SqlTask.ElementsAs(ctx, &v, true) + d := o.SqlTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11793,9 +11788,8 @@ func (o *RunTask) GetSqlTask(ctx context.Context) (SqlTask, bool) { // SetSqlTask sets the value of the SqlTask field in RunTask. func (o *RunTask) SetSqlTask(ctx context.Context, v SqlTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] - o.SqlTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlTask = vs } // GetState returns the value of the State field in RunTask as @@ -11807,7 +11801,10 @@ func (o *RunTask) GetState(ctx context.Context) (RunState, bool) { return e, false } var v []RunState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11819,9 +11816,8 @@ func (o *RunTask) GetState(ctx context.Context) (RunState, bool) { // SetState sets the value of the State field in RunTask. func (o *RunTask) SetState(ctx context.Context, v RunState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetStatus returns the value of the Status field in RunTask as @@ -11833,7 +11829,10 @@ func (o *RunTask) GetStatus(ctx context.Context) (RunStatus, bool) { return e, false } var v []RunStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11845,9 +11844,8 @@ func (o *RunTask) GetStatus(ctx context.Context) (RunStatus, bool) { // SetStatus sets the value of the Status field in RunTask. func (o *RunTask) SetStatus(ctx context.Context, v RunStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // GetWebhookNotifications returns the value of the WebhookNotifications field in RunTask as @@ -11859,7 +11857,10 @@ func (o *RunTask) GetWebhookNotifications(ctx context.Context) (WebhookNotificat return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11871,9 +11872,8 @@ func (o *RunTask) GetWebhookNotifications(ctx context.Context) (WebhookNotificat // SetWebhookNotifications sets the value of the WebhookNotifications field in RunTask. func (o *RunTask) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } type SparkJarTask struct { @@ -12313,7 +12313,7 @@ type SqlDashboardWidgetOutput struct { // Time (in epoch milliseconds) when execution of the SQL widget ends. EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` // The information about the error when execution fails. - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"optional,object"` // The link to find the output results. OutputLink types.String `tfsdk:"output_link" tf:"optional"` // Time (in epoch milliseconds) when execution of the SQL widget starts. @@ -12366,10 +12366,8 @@ func (o SqlDashboardWidgetOutput) ToObjectValue(ctx context.Context) basetypes.O func (o SqlDashboardWidgetOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "end_time": types.Int64Type, - "error": basetypes.ListType{ - ElemType: SqlOutputError{}.Type(ctx), - }, + "end_time": types.Int64Type, + "error": SqlOutputError{}.Type(ctx), "output_link": types.StringType, "start_time": types.Int64Type, "status": types.StringType, @@ -12388,7 +12386,10 @@ func (o *SqlDashboardWidgetOutput) GetError(ctx context.Context) (SqlOutputError return e, false } var v []SqlOutputError - d := o.Error.ElementsAs(ctx, &v, true) + d := o.Error.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12400,18 +12401,17 @@ func (o *SqlDashboardWidgetOutput) GetError(ctx context.Context) (SqlOutputError // SetError sets the value of the Error field in SqlDashboardWidgetOutput. func (o *SqlDashboardWidgetOutput) SetError(ctx context.Context, v SqlOutputError) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] - o.Error = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Error = vs } type SqlOutput struct { // The output of a SQL alert task, if available. - AlertOutput types.List `tfsdk:"alert_output" tf:"optional,object"` + AlertOutput types.Object `tfsdk:"alert_output" tf:"optional,object"` // The output of a SQL dashboard task, if available. - DashboardOutput types.List `tfsdk:"dashboard_output" tf:"optional,object"` + DashboardOutput types.Object `tfsdk:"dashboard_output" tf:"optional,object"` // The output of a SQL query task, if available. - QueryOutput types.List `tfsdk:"query_output" tf:"optional,object"` + QueryOutput types.Object `tfsdk:"query_output" tf:"optional,object"` } func (newState *SqlOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan SqlOutput) { @@ -12452,15 +12452,9 @@ func (o SqlOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SqlOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "alert_output": basetypes.ListType{ - ElemType: SqlAlertOutput{}.Type(ctx), - }, - "dashboard_output": basetypes.ListType{ - ElemType: SqlDashboardOutput{}.Type(ctx), - }, - "query_output": basetypes.ListType{ - ElemType: SqlQueryOutput{}.Type(ctx), - }, + "alert_output": SqlAlertOutput{}.Type(ctx), + "dashboard_output": SqlDashboardOutput{}.Type(ctx), + "query_output": SqlQueryOutput{}.Type(ctx), }, } } @@ -12474,7 +12468,10 @@ func (o *SqlOutput) GetAlertOutput(ctx context.Context) (SqlAlertOutput, bool) { return e, false } var v []SqlAlertOutput - d := o.AlertOutput.ElementsAs(ctx, &v, true) + d := o.AlertOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12486,9 +12483,8 @@ func (o *SqlOutput) GetAlertOutput(ctx context.Context) (SqlAlertOutput, bool) { // SetAlertOutput sets the value of the AlertOutput field in SqlOutput. func (o *SqlOutput) SetAlertOutput(ctx context.Context, v SqlAlertOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert_output"] - o.AlertOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AlertOutput = vs } // GetDashboardOutput returns the value of the DashboardOutput field in SqlOutput as @@ -12500,7 +12496,10 @@ func (o *SqlOutput) GetDashboardOutput(ctx context.Context) (SqlDashboardOutput, return e, false } var v []SqlDashboardOutput - d := o.DashboardOutput.ElementsAs(ctx, &v, true) + d := o.DashboardOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12512,9 +12511,8 @@ func (o *SqlOutput) GetDashboardOutput(ctx context.Context) (SqlDashboardOutput, // SetDashboardOutput sets the value of the DashboardOutput field in SqlOutput. func (o *SqlOutput) SetDashboardOutput(ctx context.Context, v SqlDashboardOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard_output"] - o.DashboardOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DashboardOutput = vs } // GetQueryOutput returns the value of the QueryOutput field in SqlOutput as @@ -12526,7 +12524,10 @@ func (o *SqlOutput) GetQueryOutput(ctx context.Context) (SqlQueryOutput, bool) { return e, false } var v []SqlQueryOutput - d := o.QueryOutput.ElementsAs(ctx, &v, true) + d := o.QueryOutput.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12538,9 +12539,8 @@ func (o *SqlOutput) GetQueryOutput(ctx context.Context) (SqlQueryOutput, bool) { // SetQueryOutput sets the value of the QueryOutput field in SqlOutput. func (o *SqlOutput) SetQueryOutput(ctx context.Context, v SqlQueryOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_output"] - o.QueryOutput = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueryOutput = vs } type SqlOutputError struct { @@ -12717,17 +12717,17 @@ func (o SqlStatementOutput) Type(ctx context.Context) attr.Type { type SqlTask struct { // If alert, indicates that this job must refresh a SQL alert. - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"optional,object"` // If dashboard, indicates that this job must refresh a SQL dashboard. - Dashboard types.List `tfsdk:"dashboard" tf:"optional,object"` + Dashboard types.Object `tfsdk:"dashboard" tf:"optional,object"` // If file, indicates that this job runs a SQL file in a remote Git // repository. - File types.List `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"optional,object"` // Parameters to be used for each run of this job. The SQL alert task does // not support custom parameters. Parameters types.Map `tfsdk:"parameters" tf:"optional"` // If query, indicates that this job must execute a SQL query. - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` // The canonical identifier of the SQL warehouse. Recommended to use with // serverless or pro SQL warehouses. Classic SQL warehouses are only // supported for SQL alert, dashboard and query tasks and are limited to @@ -12778,21 +12778,13 @@ func (o SqlTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SqlTask) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "alert": basetypes.ListType{ - ElemType: SqlTaskAlert{}.Type(ctx), - }, - "dashboard": basetypes.ListType{ - ElemType: SqlTaskDashboard{}.Type(ctx), - }, - "file": basetypes.ListType{ - ElemType: SqlTaskFile{}.Type(ctx), - }, + "alert": SqlTaskAlert{}.Type(ctx), + "dashboard": SqlTaskDashboard{}.Type(ctx), + "file": SqlTaskFile{}.Type(ctx), "parameters": basetypes.MapType{ ElemType: types.StringType, }, - "query": basetypes.ListType{ - ElemType: SqlTaskQuery{}.Type(ctx), - }, + "query": SqlTaskQuery{}.Type(ctx), "warehouse_id": types.StringType, }, } @@ -12807,7 +12799,10 @@ func (o *SqlTask) GetAlert(ctx context.Context) (SqlTaskAlert, bool) { return e, false } var v []SqlTaskAlert - d := o.Alert.ElementsAs(ctx, &v, true) + d := o.Alert.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12819,9 +12814,8 @@ func (o *SqlTask) GetAlert(ctx context.Context) (SqlTaskAlert, bool) { // SetAlert sets the value of the Alert field in SqlTask. func (o *SqlTask) SetAlert(ctx context.Context, v SqlTaskAlert) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] - o.Alert = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Alert = vs } // GetDashboard returns the value of the Dashboard field in SqlTask as @@ -12833,7 +12827,10 @@ func (o *SqlTask) GetDashboard(ctx context.Context) (SqlTaskDashboard, bool) { return e, false } var v []SqlTaskDashboard - d := o.Dashboard.ElementsAs(ctx, &v, true) + d := o.Dashboard.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12845,9 +12842,8 @@ func (o *SqlTask) GetDashboard(ctx context.Context) (SqlTaskDashboard, bool) { // SetDashboard sets the value of the Dashboard field in SqlTask. func (o *SqlTask) SetDashboard(ctx context.Context, v SqlTaskDashboard) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dashboard"] - o.Dashboard = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dashboard = vs } // GetFile returns the value of the File field in SqlTask as @@ -12859,7 +12855,10 @@ func (o *SqlTask) GetFile(ctx context.Context) (SqlTaskFile, bool) { return e, false } var v []SqlTaskFile - d := o.File.ElementsAs(ctx, &v, true) + d := o.File.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12871,9 +12870,8 @@ func (o *SqlTask) GetFile(ctx context.Context) (SqlTaskFile, bool) { // SetFile sets the value of the File field in SqlTask. func (o *SqlTask) SetFile(ctx context.Context, v SqlTaskFile) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] - o.File = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.File = vs } // GetParameters returns the value of the Parameters field in SqlTask as @@ -12911,7 +12909,10 @@ func (o *SqlTask) GetQuery(ctx context.Context) (SqlTaskQuery, bool) { return e, false } var v []SqlTaskQuery - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12923,9 +12924,8 @@ func (o *SqlTask) GetQuery(ctx context.Context) (SqlTaskQuery, bool) { // SetQuery sets the value of the Query field in SqlTask. func (o *SqlTask) SetQuery(ctx context.Context, v SqlTaskQuery) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } type SqlTaskAlert struct { @@ -13248,7 +13248,7 @@ type SubmitRun struct { BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` // An optional set of email addresses notified when the run begins or // completes. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // A list of task execution environment specifications that can be // referenced by tasks of this run. Environments types.List `tfsdk:"environments" tf:"optional"` @@ -13262,9 +13262,9 @@ type SubmitRun struct { // // Note: dbt and SQL File tasks support only version-controlled sources. If // dbt or SQL File tasks are used, `git_source` must be defined on the job. - GitSource types.List `tfsdk:"git_source" tf:"optional,object"` + GitSource types.Object `tfsdk:"git_source" tf:"optional,object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // An optional token that can be used to guarantee the idempotency of job // run requests. If a run with the provided token already exists, the // request does not create a new run but returns the ID of the existing run @@ -13284,12 +13284,12 @@ type SubmitRun struct { // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // The queue settings of the one-time run. - Queue types.List `tfsdk:"queue" tf:"optional,object"` + Queue types.Object `tfsdk:"queue" tf:"optional,object"` // Specifies the user or service principal that the job runs as. If not // specified, the job runs as the user who submits the request. - RunAs types.List `tfsdk:"run_as" tf:"optional,object"` + RunAs types.Object `tfsdk:"run_as" tf:"optional,object"` // An optional name for the run. The default value is `Untitled`. RunName types.String `tfsdk:"run_name" tf:"optional"` @@ -13299,7 +13299,7 @@ type SubmitRun struct { TimeoutSeconds types.Int64 `tfsdk:"timeout_seconds" tf:"optional"` // A collection of system notification IDs to notify when the run begins or // completes. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *SubmitRun) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitRun) { @@ -13361,37 +13361,23 @@ func (o SubmitRun) Type(ctx context.Context) attr.Type { "access_control_list": basetypes.ListType{ ElemType: JobAccessControlRequest{}.Type(ctx), }, - "budget_policy_id": types.StringType, - "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), - }, + "budget_policy_id": types.StringType, + "email_notifications": JobEmailNotifications{}.Type(ctx), "environments": basetypes.ListType{ ElemType: JobEnvironment{}.Type(ctx), }, - "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), - }, - "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), - }, - "idempotency_token": types.StringType, - "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), - }, - "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), - }, - "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), - }, - "run_name": types.StringType, + "git_source": GitSource{}.Type(ctx), + "health": JobsHealthRules{}.Type(ctx), + "idempotency_token": types.StringType, + "notification_settings": JobNotificationSettings{}.Type(ctx), + "queue": QueueSettings{}.Type(ctx), + "run_as": JobRunAs{}.Type(ctx), + "run_name": types.StringType, "tasks": basetypes.ListType{ ElemType: SubmitTask{}.Type(ctx), }, - "timeout_seconds": types.Int64Type, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "timeout_seconds": types.Int64Type, + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -13431,7 +13417,10 @@ func (o *SubmitRun) GetEmailNotifications(ctx context.Context) (JobEmailNotifica return e, false } var v []JobEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13443,9 +13432,8 @@ func (o *SubmitRun) GetEmailNotifications(ctx context.Context) (JobEmailNotifica // SetEmailNotifications sets the value of the EmailNotifications field in SubmitRun. func (o *SubmitRun) SetEmailNotifications(ctx context.Context, v JobEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetEnvironments returns the value of the Environments field in SubmitRun as @@ -13483,7 +13471,10 @@ func (o *SubmitRun) GetGitSource(ctx context.Context) (GitSource, bool) { return e, false } var v []GitSource - d := o.GitSource.ElementsAs(ctx, &v, true) + d := o.GitSource.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13495,9 +13486,8 @@ func (o *SubmitRun) GetGitSource(ctx context.Context) (GitSource, bool) { // SetGitSource sets the value of the GitSource field in SubmitRun. func (o *SubmitRun) SetGitSource(ctx context.Context, v GitSource) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_source"] - o.GitSource = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitSource = vs } // GetHealth returns the value of the Health field in SubmitRun as @@ -13509,7 +13499,10 @@ func (o *SubmitRun) GetHealth(ctx context.Context) (JobsHealthRules, bool) { return e, false } var v []JobsHealthRules - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13521,9 +13514,8 @@ func (o *SubmitRun) GetHealth(ctx context.Context) (JobsHealthRules, bool) { // SetHealth sets the value of the Health field in SubmitRun. func (o *SubmitRun) SetHealth(ctx context.Context, v JobsHealthRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetNotificationSettings returns the value of the NotificationSettings field in SubmitRun as @@ -13535,7 +13527,10 @@ func (o *SubmitRun) GetNotificationSettings(ctx context.Context) (JobNotificatio return e, false } var v []JobNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13547,9 +13542,8 @@ func (o *SubmitRun) GetNotificationSettings(ctx context.Context) (JobNotificatio // SetNotificationSettings sets the value of the NotificationSettings field in SubmitRun. func (o *SubmitRun) SetNotificationSettings(ctx context.Context, v JobNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetQueue returns the value of the Queue field in SubmitRun as @@ -13561,7 +13555,10 @@ func (o *SubmitRun) GetQueue(ctx context.Context) (QueueSettings, bool) { return e, false } var v []QueueSettings - d := o.Queue.ElementsAs(ctx, &v, true) + d := o.Queue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13573,9 +13570,8 @@ func (o *SubmitRun) GetQueue(ctx context.Context) (QueueSettings, bool) { // SetQueue sets the value of the Queue field in SubmitRun. func (o *SubmitRun) SetQueue(ctx context.Context, v QueueSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["queue"] - o.Queue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Queue = vs } // GetRunAs returns the value of the RunAs field in SubmitRun as @@ -13587,7 +13583,10 @@ func (o *SubmitRun) GetRunAs(ctx context.Context) (JobRunAs, bool) { return e, false } var v []JobRunAs - d := o.RunAs.ElementsAs(ctx, &v, true) + d := o.RunAs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13599,9 +13598,8 @@ func (o *SubmitRun) GetRunAs(ctx context.Context) (JobRunAs, bool) { // SetRunAs sets the value of the RunAs field in SubmitRun. func (o *SubmitRun) SetRunAs(ctx context.Context, v JobRunAs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_as"] - o.RunAs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunAs = vs } // GetTasks returns the value of the Tasks field in SubmitRun as @@ -13639,7 +13637,10 @@ func (o *SubmitRun) GetWebhookNotifications(ctx context.Context) (WebhookNotific return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13651,9 +13652,8 @@ func (o *SubmitRun) GetWebhookNotifications(ctx context.Context) (WebhookNotific // SetWebhookNotifications sets the value of the WebhookNotifications field in SubmitRun. func (o *SubmitRun) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } // Run was created and started successfully. @@ -13704,11 +13704,11 @@ type SubmitTask struct { // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete successfully before // executing this task. The key is `task_key`, and the value is the name @@ -13718,7 +13718,7 @@ type SubmitTask struct { Description types.String `tfsdk:"description" tf:"optional"` // An optional set of email addresses notified when the task run begins or // completes. The default behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. @@ -13730,39 +13730,39 @@ type SubmitTask struct { ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // An optional list of libraries to be installed on the cluster. The default // value is an empty list. Libraries types.List `tfsdk:"library" tf:"optional"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task run. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` // An optional value indicating the condition that determines whether the // task should be run once its dependencies have been completed. When // omitted, defaults to `ALL_SUCCESS`. See :method:jobs/create for a list of // possible values. RunIf types.String `tfsdk:"run_if" tf:"optional"` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -13781,10 +13781,10 @@ type SubmitTask struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -13796,7 +13796,7 @@ type SubmitTask struct { // A collection of system notification IDs to notify when the run begins or // completes. The default behavior is to not send any system notifications. // Task webhooks respect the task notification settings. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *SubmitTask) SyncEffectiveFieldsDuringCreateOrUpdate(plan SubmitTask) { @@ -13873,66 +13873,34 @@ func (o SubmitTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SubmitTask) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), - }, + "condition_task": ConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, - "description": types.StringType, - "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), - }, + "description": types.StringType, + "email_notifications": JobEmailNotifications{}.Type(ctx), "environment_key": types.StringType, "existing_cluster_id": types.StringType, - "for_each_task": basetypes.ListType{ - ElemType: ForEachTask{}.Type(ctx), - }, - "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), - }, + "for_each_task": ForEachTask{}.Type(ctx), + "health": JobsHealthRules{}.Type(ctx), "library": basetypes.ListType{ ElemType: compute_tf.Library{}.Type(ctx), }, - "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), - }, - "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), - }, - "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), - }, - "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), - }, - "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), - }, - "run_if": types.StringType, - "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), - }, - "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), - }, - "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), - }, - "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), - }, - "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), - }, - "task_key": types.StringType, - "timeout_seconds": types.Int64Type, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "new_cluster": compute_tf.ClusterSpec{}.Type(ctx), + "notebook_task": NotebookTask{}.Type(ctx), + "notification_settings": TaskNotificationSettings{}.Type(ctx), + "pipeline_task": PipelineTask{}.Type(ctx), + "python_wheel_task": PythonWheelTask{}.Type(ctx), + "run_if": types.StringType, + "run_job_task": RunJobTask{}.Type(ctx), + "spark_jar_task": SparkJarTask{}.Type(ctx), + "spark_python_task": SparkPythonTask{}.Type(ctx), + "spark_submit_task": SparkSubmitTask{}.Type(ctx), + "sql_task": SqlTask{}.Type(ctx), + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -13946,7 +13914,10 @@ func (o *SubmitTask) GetConditionTask(ctx context.Context) (ConditionTask, bool) return e, false } var v []ConditionTask - d := o.ConditionTask.ElementsAs(ctx, &v, true) + d := o.ConditionTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13958,9 +13929,8 @@ func (o *SubmitTask) GetConditionTask(ctx context.Context) (ConditionTask, bool) // SetConditionTask sets the value of the ConditionTask field in SubmitTask. func (o *SubmitTask) SetConditionTask(ctx context.Context, v ConditionTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] - o.ConditionTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConditionTask = vs } // GetDbtTask returns the value of the DbtTask field in SubmitTask as @@ -13972,7 +13942,10 @@ func (o *SubmitTask) GetDbtTask(ctx context.Context) (DbtTask, bool) { return e, false } var v []DbtTask - d := o.DbtTask.ElementsAs(ctx, &v, true) + d := o.DbtTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -13984,9 +13957,8 @@ func (o *SubmitTask) GetDbtTask(ctx context.Context) (DbtTask, bool) { // SetDbtTask sets the value of the DbtTask field in SubmitTask. func (o *SubmitTask) SetDbtTask(ctx context.Context, v DbtTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] - o.DbtTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DbtTask = vs } // GetDependsOn returns the value of the DependsOn field in SubmitTask as @@ -14024,7 +13996,10 @@ func (o *SubmitTask) GetEmailNotifications(ctx context.Context) (JobEmailNotific return e, false } var v []JobEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14036,9 +14011,8 @@ func (o *SubmitTask) GetEmailNotifications(ctx context.Context) (JobEmailNotific // SetEmailNotifications sets the value of the EmailNotifications field in SubmitTask. func (o *SubmitTask) SetEmailNotifications(ctx context.Context, v JobEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetForEachTask returns the value of the ForEachTask field in SubmitTask as @@ -14050,7 +14024,10 @@ func (o *SubmitTask) GetForEachTask(ctx context.Context) (ForEachTask, bool) { return e, false } var v []ForEachTask - d := o.ForEachTask.ElementsAs(ctx, &v, true) + d := o.ForEachTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14062,9 +14039,8 @@ func (o *SubmitTask) GetForEachTask(ctx context.Context) (ForEachTask, bool) { // SetForEachTask sets the value of the ForEachTask field in SubmitTask. func (o *SubmitTask) SetForEachTask(ctx context.Context, v ForEachTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] - o.ForEachTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForEachTask = vs } // GetHealth returns the value of the Health field in SubmitTask as @@ -14076,7 +14052,10 @@ func (o *SubmitTask) GetHealth(ctx context.Context) (JobsHealthRules, bool) { return e, false } var v []JobsHealthRules - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14088,9 +14067,8 @@ func (o *SubmitTask) GetHealth(ctx context.Context) (JobsHealthRules, bool) { // SetHealth sets the value of the Health field in SubmitTask. func (o *SubmitTask) SetHealth(ctx context.Context, v JobsHealthRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetLibraries returns the value of the Libraries field in SubmitTask as @@ -14128,7 +14106,10 @@ func (o *SubmitTask) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, return e, false } var v []compute_tf.ClusterSpec - d := o.NewCluster.ElementsAs(ctx, &v, true) + d := o.NewCluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14140,9 +14121,8 @@ func (o *SubmitTask) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, // SetNewCluster sets the value of the NewCluster field in SubmitTask. func (o *SubmitTask) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] - o.NewCluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewCluster = vs } // GetNotebookTask returns the value of the NotebookTask field in SubmitTask as @@ -14154,7 +14134,10 @@ func (o *SubmitTask) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { return e, false } var v []NotebookTask - d := o.NotebookTask.ElementsAs(ctx, &v, true) + d := o.NotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14166,9 +14149,8 @@ func (o *SubmitTask) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { // SetNotebookTask sets the value of the NotebookTask field in SubmitTask. func (o *SubmitTask) SetNotebookTask(ctx context.Context, v NotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] - o.NotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookTask = vs } // GetNotificationSettings returns the value of the NotificationSettings field in SubmitTask as @@ -14180,7 +14162,10 @@ func (o *SubmitTask) GetNotificationSettings(ctx context.Context) (TaskNotificat return e, false } var v []TaskNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14192,9 +14177,8 @@ func (o *SubmitTask) GetNotificationSettings(ctx context.Context) (TaskNotificat // SetNotificationSettings sets the value of the NotificationSettings field in SubmitTask. func (o *SubmitTask) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetPipelineTask returns the value of the PipelineTask field in SubmitTask as @@ -14206,7 +14190,10 @@ func (o *SubmitTask) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { return e, false } var v []PipelineTask - d := o.PipelineTask.ElementsAs(ctx, &v, true) + d := o.PipelineTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14218,9 +14205,8 @@ func (o *SubmitTask) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { // SetPipelineTask sets the value of the PipelineTask field in SubmitTask. func (o *SubmitTask) SetPipelineTask(ctx context.Context, v PipelineTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] - o.PipelineTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineTask = vs } // GetPythonWheelTask returns the value of the PythonWheelTask field in SubmitTask as @@ -14232,7 +14218,10 @@ func (o *SubmitTask) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, b return e, false } var v []PythonWheelTask - d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + d := o.PythonWheelTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14244,9 +14233,8 @@ func (o *SubmitTask) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, b // SetPythonWheelTask sets the value of the PythonWheelTask field in SubmitTask. func (o *SubmitTask) SetPythonWheelTask(ctx context.Context, v PythonWheelTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] - o.PythonWheelTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PythonWheelTask = vs } // GetRunJobTask returns the value of the RunJobTask field in SubmitTask as @@ -14258,7 +14246,10 @@ func (o *SubmitTask) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { return e, false } var v []RunJobTask - d := o.RunJobTask.ElementsAs(ctx, &v, true) + d := o.RunJobTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14270,9 +14261,8 @@ func (o *SubmitTask) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { // SetRunJobTask sets the value of the RunJobTask field in SubmitTask. func (o *SubmitTask) SetRunJobTask(ctx context.Context, v RunJobTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] - o.RunJobTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunJobTask = vs } // GetSparkJarTask returns the value of the SparkJarTask field in SubmitTask as @@ -14284,7 +14274,10 @@ func (o *SubmitTask) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { return e, false } var v []SparkJarTask - d := o.SparkJarTask.ElementsAs(ctx, &v, true) + d := o.SparkJarTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14296,9 +14289,8 @@ func (o *SubmitTask) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { // SetSparkJarTask sets the value of the SparkJarTask field in SubmitTask. func (o *SubmitTask) SetSparkJarTask(ctx context.Context, v SparkJarTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] - o.SparkJarTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkJarTask = vs } // GetSparkPythonTask returns the value of the SparkPythonTask field in SubmitTask as @@ -14310,7 +14302,10 @@ func (o *SubmitTask) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, b return e, false } var v []SparkPythonTask - d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + d := o.SparkPythonTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14322,9 +14317,8 @@ func (o *SubmitTask) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, b // SetSparkPythonTask sets the value of the SparkPythonTask field in SubmitTask. func (o *SubmitTask) SetSparkPythonTask(ctx context.Context, v SparkPythonTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] - o.SparkPythonTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkPythonTask = vs } // GetSparkSubmitTask returns the value of the SparkSubmitTask field in SubmitTask as @@ -14336,7 +14330,10 @@ func (o *SubmitTask) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, b return e, false } var v []SparkSubmitTask - d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + d := o.SparkSubmitTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14348,9 +14345,8 @@ func (o *SubmitTask) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, b // SetSparkSubmitTask sets the value of the SparkSubmitTask field in SubmitTask. func (o *SubmitTask) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] - o.SparkSubmitTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkSubmitTask = vs } // GetSqlTask returns the value of the SqlTask field in SubmitTask as @@ -14362,7 +14358,10 @@ func (o *SubmitTask) GetSqlTask(ctx context.Context) (SqlTask, bool) { return e, false } var v []SqlTask - d := o.SqlTask.ElementsAs(ctx, &v, true) + d := o.SqlTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14374,9 +14373,8 @@ func (o *SubmitTask) GetSqlTask(ctx context.Context) (SqlTask, bool) { // SetSqlTask sets the value of the SqlTask field in SubmitTask. func (o *SubmitTask) SetSqlTask(ctx context.Context, v SqlTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] - o.SqlTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlTask = vs } // GetWebhookNotifications returns the value of the WebhookNotifications field in SubmitTask as @@ -14388,7 +14386,10 @@ func (o *SubmitTask) GetWebhookNotifications(ctx context.Context) (WebhookNotifi return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14400,9 +14401,8 @@ func (o *SubmitTask) GetWebhookNotifications(ctx context.Context) (WebhookNotifi // SetWebhookNotifications sets the value of the WebhookNotifications field in SubmitTask. func (o *SubmitTask) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } type TableUpdateTriggerConfiguration struct { @@ -14500,11 +14500,11 @@ type Task struct { // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries // or notifications. - ConditionTask types.List `tfsdk:"condition_task" tf:"optional,object"` + ConditionTask types.Object `tfsdk:"condition_task" tf:"optional,object"` // The task runs one or more dbt commands when the `dbt_task` field is // present. The dbt task requires both Databricks SQL and the ability to use // a serverless or a pro SQL warehouse. - DbtTask types.List `tfsdk:"dbt_task" tf:"optional,object"` + DbtTask types.Object `tfsdk:"dbt_task" tf:"optional,object"` // An optional array of objects specifying the dependency graph of the task. // All tasks specified in this field must complete before executing this // task. The task will run only if the `run_if` condition is true. The key @@ -14517,7 +14517,7 @@ type Task struct { // An optional set of email addresses that is notified when runs of this // task begin or complete as well as when this task is deleted. The default // behavior is to not send any emails. - EmailNotifications types.List `tfsdk:"email_notifications" tf:"optional,object"` + EmailNotifications types.Object `tfsdk:"email_notifications" tf:"optional,object"` // The key that references an environment spec in a job. This field is // required for Python script, Python wheel and dbt tasks when using // serverless compute. @@ -14529,9 +14529,9 @@ type Task struct { ExistingClusterId types.String `tfsdk:"existing_cluster_id" tf:"optional"` // The task executes a nested task for every input provided when the // `for_each_task` field is present. - ForEachTask types.List `tfsdk:"for_each_task" tf:"optional,object"` + ForEachTask types.Object `tfsdk:"for_each_task" tf:"optional,object"` // An optional set of health rules that can be defined for this job. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // If job_cluster_key, this task is executed reusing the cluster specified // in `job.settings.job_clusters`. JobClusterKey types.String `tfsdk:"job_cluster_key" tf:"optional"` @@ -14549,19 +14549,19 @@ type Task struct { MinRetryIntervalMillis types.Int64 `tfsdk:"min_retry_interval_millis" tf:"optional"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.Object `tfsdk:"new_cluster" tf:"optional,object"` // The task runs a notebook when the `notebook_task` field is present. - NotebookTask types.List `tfsdk:"notebook_task" tf:"optional,object"` + NotebookTask types.Object `tfsdk:"notebook_task" tf:"optional,object"` // Optional notification settings that are used when sending notifications // to each of the `email_notifications` and `webhook_notifications` for this // task. - NotificationSettings types.List `tfsdk:"notification_settings" tf:"optional,object"` + NotificationSettings types.Object `tfsdk:"notification_settings" tf:"optional,object"` // The task triggers a pipeline update when the `pipeline_task` field is // present. Only pipelines configured to use triggered more are supported. - PipelineTask types.List `tfsdk:"pipeline_task" tf:"optional,object"` + PipelineTask types.Object `tfsdk:"pipeline_task" tf:"optional,object"` // The task runs a Python wheel when the `python_wheel_task` field is // present. - PythonWheelTask types.List `tfsdk:"python_wheel_task" tf:"optional,object"` + PythonWheelTask types.Object `tfsdk:"python_wheel_task" tf:"optional,object"` // An optional policy to specify whether to retry a job when it times out. // The default behavior is to not retry on timeout. RetryOnTimeout types.Bool `tfsdk:"retry_on_timeout" tf:"optional"` @@ -14576,12 +14576,12 @@ type Task struct { // dependencies have failed RunIf types.String `tfsdk:"run_if" tf:"optional"` // The task triggers another job when the `run_job_task` field is present. - RunJobTask types.List `tfsdk:"run_job_task" tf:"optional,object"` + RunJobTask types.Object `tfsdk:"run_job_task" tf:"optional,object"` // The task runs a JAR when the `spark_jar_task` field is present. - SparkJarTask types.List `tfsdk:"spark_jar_task" tf:"optional,object"` + SparkJarTask types.Object `tfsdk:"spark_jar_task" tf:"optional,object"` // The task runs a Python file when the `spark_python_task` field is // present. - SparkPythonTask types.List `tfsdk:"spark_python_task" tf:"optional,object"` + SparkPythonTask types.Object `tfsdk:"spark_python_task" tf:"optional,object"` // (Legacy) The task runs the spark-submit script when the // `spark_submit_task` field is present. This task can run only on new // clusters and is not compatible with serverless compute. @@ -14600,10 +14600,10 @@ type Task struct { // // The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 // paths. - SparkSubmitTask types.List `tfsdk:"spark_submit_task" tf:"optional,object"` + SparkSubmitTask types.Object `tfsdk:"spark_submit_task" tf:"optional,object"` // The task runs a SQL query or file, or it refreshes a SQL alert or a // legacy SQL dashboard when the `sql_task` field is present. - SqlTask types.List `tfsdk:"sql_task" tf:"optional,object"` + SqlTask types.Object `tfsdk:"sql_task" tf:"optional,object"` // A unique name for the task. This field is used to refer to this task from // other tasks. This field is required and must be unique within its parent // job. On Update or Reset, this field is used to reference the tasks to be @@ -14615,7 +14615,7 @@ type Task struct { // A collection of system notification IDs to notify when runs of this task // begin or complete. The default behavior is to not send any system // notifications. - WebhookNotifications types.List `tfsdk:"webhook_notifications" tf:"optional,object"` + WebhookNotifications types.Object `tfsdk:"webhook_notifications" tf:"optional,object"` } func (newState *Task) SyncEffectiveFieldsDuringCreateOrUpdate(plan Task) { @@ -14697,71 +14697,39 @@ func (o Task) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Task) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), - }, + "condition_task": ConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, "description": types.StringType, "disable_auto_optimization": types.BoolType, - "email_notifications": basetypes.ListType{ - ElemType: TaskEmailNotifications{}.Type(ctx), - }, - "environment_key": types.StringType, - "existing_cluster_id": types.StringType, - "for_each_task": basetypes.ListType{ - ElemType: ForEachTask{}.Type(ctx), - }, - "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), - }, - "job_cluster_key": types.StringType, + "email_notifications": TaskEmailNotifications{}.Type(ctx), + "environment_key": types.StringType, + "existing_cluster_id": types.StringType, + "for_each_task": ForEachTask{}.Type(ctx), + "health": JobsHealthRules{}.Type(ctx), + "job_cluster_key": types.StringType, "library": basetypes.ListType{ ElemType: compute_tf.Library{}.Type(ctx), }, "max_retries": types.Int64Type, "min_retry_interval_millis": types.Int64Type, - "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), - }, - "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), - }, - "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), - }, - "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), - }, - "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), - }, - "retry_on_timeout": types.BoolType, - "run_if": types.StringType, - "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), - }, - "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), - }, - "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), - }, - "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), - }, - "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), - }, - "task_key": types.StringType, - "timeout_seconds": types.Int64Type, - "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), - }, + "new_cluster": compute_tf.ClusterSpec{}.Type(ctx), + "notebook_task": NotebookTask{}.Type(ctx), + "notification_settings": TaskNotificationSettings{}.Type(ctx), + "pipeline_task": PipelineTask{}.Type(ctx), + "python_wheel_task": PythonWheelTask{}.Type(ctx), + "retry_on_timeout": types.BoolType, + "run_if": types.StringType, + "run_job_task": RunJobTask{}.Type(ctx), + "spark_jar_task": SparkJarTask{}.Type(ctx), + "spark_python_task": SparkPythonTask{}.Type(ctx), + "spark_submit_task": SparkSubmitTask{}.Type(ctx), + "sql_task": SqlTask{}.Type(ctx), + "task_key": types.StringType, + "timeout_seconds": types.Int64Type, + "webhook_notifications": WebhookNotifications{}.Type(ctx), }, } } @@ -14775,7 +14743,10 @@ func (o *Task) GetConditionTask(ctx context.Context) (ConditionTask, bool) { return e, false } var v []ConditionTask - d := o.ConditionTask.ElementsAs(ctx, &v, true) + d := o.ConditionTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14787,9 +14758,8 @@ func (o *Task) GetConditionTask(ctx context.Context) (ConditionTask, bool) { // SetConditionTask sets the value of the ConditionTask field in Task. func (o *Task) SetConditionTask(ctx context.Context, v ConditionTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition_task"] - o.ConditionTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConditionTask = vs } // GetDbtTask returns the value of the DbtTask field in Task as @@ -14801,7 +14771,10 @@ func (o *Task) GetDbtTask(ctx context.Context) (DbtTask, bool) { return e, false } var v []DbtTask - d := o.DbtTask.ElementsAs(ctx, &v, true) + d := o.DbtTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14813,9 +14786,8 @@ func (o *Task) GetDbtTask(ctx context.Context) (DbtTask, bool) { // SetDbtTask sets the value of the DbtTask field in Task. func (o *Task) SetDbtTask(ctx context.Context, v DbtTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dbt_task"] - o.DbtTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DbtTask = vs } // GetDependsOn returns the value of the DependsOn field in Task as @@ -14853,7 +14825,10 @@ func (o *Task) GetEmailNotifications(ctx context.Context) (TaskEmailNotification return e, false } var v []TaskEmailNotifications - d := o.EmailNotifications.ElementsAs(ctx, &v, true) + d := o.EmailNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14865,9 +14840,8 @@ func (o *Task) GetEmailNotifications(ctx context.Context) (TaskEmailNotification // SetEmailNotifications sets the value of the EmailNotifications field in Task. func (o *Task) SetEmailNotifications(ctx context.Context, v TaskEmailNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email_notifications"] - o.EmailNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EmailNotifications = vs } // GetForEachTask returns the value of the ForEachTask field in Task as @@ -14879,7 +14853,10 @@ func (o *Task) GetForEachTask(ctx context.Context) (ForEachTask, bool) { return e, false } var v []ForEachTask - d := o.ForEachTask.ElementsAs(ctx, &v, true) + d := o.ForEachTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14891,9 +14868,8 @@ func (o *Task) GetForEachTask(ctx context.Context) (ForEachTask, bool) { // SetForEachTask sets the value of the ForEachTask field in Task. func (o *Task) SetForEachTask(ctx context.Context, v ForEachTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["for_each_task"] - o.ForEachTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ForEachTask = vs } // GetHealth returns the value of the Health field in Task as @@ -14905,7 +14881,10 @@ func (o *Task) GetHealth(ctx context.Context) (JobsHealthRules, bool) { return e, false } var v []JobsHealthRules - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14917,9 +14896,8 @@ func (o *Task) GetHealth(ctx context.Context) (JobsHealthRules, bool) { // SetHealth sets the value of the Health field in Task. func (o *Task) SetHealth(ctx context.Context, v JobsHealthRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetLibraries returns the value of the Libraries field in Task as @@ -14957,7 +14935,10 @@ func (o *Task) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, bool) return e, false } var v []compute_tf.ClusterSpec - d := o.NewCluster.ElementsAs(ctx, &v, true) + d := o.NewCluster.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14969,9 +14950,8 @@ func (o *Task) GetNewCluster(ctx context.Context) (compute_tf.ClusterSpec, bool) // SetNewCluster sets the value of the NewCluster field in Task. func (o *Task) SetNewCluster(ctx context.Context, v compute_tf.ClusterSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_cluster"] - o.NewCluster = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewCluster = vs } // GetNotebookTask returns the value of the NotebookTask field in Task as @@ -14983,7 +14963,10 @@ func (o *Task) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { return e, false } var v []NotebookTask - d := o.NotebookTask.ElementsAs(ctx, &v, true) + d := o.NotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14995,9 +14978,8 @@ func (o *Task) GetNotebookTask(ctx context.Context) (NotebookTask, bool) { // SetNotebookTask sets the value of the NotebookTask field in Task. func (o *Task) SetNotebookTask(ctx context.Context, v NotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook_task"] - o.NotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotebookTask = vs } // GetNotificationSettings returns the value of the NotificationSettings field in Task as @@ -15009,7 +14991,10 @@ func (o *Task) GetNotificationSettings(ctx context.Context) (TaskNotificationSet return e, false } var v []TaskNotificationSettings - d := o.NotificationSettings.ElementsAs(ctx, &v, true) + d := o.NotificationSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15021,9 +15006,8 @@ func (o *Task) GetNotificationSettings(ctx context.Context) (TaskNotificationSet // SetNotificationSettings sets the value of the NotificationSettings field in Task. func (o *Task) SetNotificationSettings(ctx context.Context, v TaskNotificationSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notification_settings"] - o.NotificationSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NotificationSettings = vs } // GetPipelineTask returns the value of the PipelineTask field in Task as @@ -15035,7 +15019,10 @@ func (o *Task) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { return e, false } var v []PipelineTask - d := o.PipelineTask.ElementsAs(ctx, &v, true) + d := o.PipelineTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15047,9 +15034,8 @@ func (o *Task) GetPipelineTask(ctx context.Context) (PipelineTask, bool) { // SetPipelineTask sets the value of the PipelineTask field in Task. func (o *Task) SetPipelineTask(ctx context.Context, v PipelineTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pipeline_task"] - o.PipelineTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PipelineTask = vs } // GetPythonWheelTask returns the value of the PythonWheelTask field in Task as @@ -15061,7 +15047,10 @@ func (o *Task) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, bool) { return e, false } var v []PythonWheelTask - d := o.PythonWheelTask.ElementsAs(ctx, &v, true) + d := o.PythonWheelTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15073,9 +15062,8 @@ func (o *Task) GetPythonWheelTask(ctx context.Context) (PythonWheelTask, bool) { // SetPythonWheelTask sets the value of the PythonWheelTask field in Task. func (o *Task) SetPythonWheelTask(ctx context.Context, v PythonWheelTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["python_wheel_task"] - o.PythonWheelTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PythonWheelTask = vs } // GetRunJobTask returns the value of the RunJobTask field in Task as @@ -15087,7 +15075,10 @@ func (o *Task) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { return e, false } var v []RunJobTask - d := o.RunJobTask.ElementsAs(ctx, &v, true) + d := o.RunJobTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15099,9 +15090,8 @@ func (o *Task) GetRunJobTask(ctx context.Context) (RunJobTask, bool) { // SetRunJobTask sets the value of the RunJobTask field in Task. func (o *Task) SetRunJobTask(ctx context.Context, v RunJobTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_job_task"] - o.RunJobTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunJobTask = vs } // GetSparkJarTask returns the value of the SparkJarTask field in Task as @@ -15113,7 +15103,10 @@ func (o *Task) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { return e, false } var v []SparkJarTask - d := o.SparkJarTask.ElementsAs(ctx, &v, true) + d := o.SparkJarTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15125,9 +15118,8 @@ func (o *Task) GetSparkJarTask(ctx context.Context) (SparkJarTask, bool) { // SetSparkJarTask sets the value of the SparkJarTask field in Task. func (o *Task) SetSparkJarTask(ctx context.Context, v SparkJarTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_jar_task"] - o.SparkJarTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkJarTask = vs } // GetSparkPythonTask returns the value of the SparkPythonTask field in Task as @@ -15139,7 +15131,10 @@ func (o *Task) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, bool) { return e, false } var v []SparkPythonTask - d := o.SparkPythonTask.ElementsAs(ctx, &v, true) + d := o.SparkPythonTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15151,9 +15146,8 @@ func (o *Task) GetSparkPythonTask(ctx context.Context) (SparkPythonTask, bool) { // SetSparkPythonTask sets the value of the SparkPythonTask field in Task. func (o *Task) SetSparkPythonTask(ctx context.Context, v SparkPythonTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_python_task"] - o.SparkPythonTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkPythonTask = vs } // GetSparkSubmitTask returns the value of the SparkSubmitTask field in Task as @@ -15165,7 +15159,10 @@ func (o *Task) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, bool) { return e, false } var v []SparkSubmitTask - d := o.SparkSubmitTask.ElementsAs(ctx, &v, true) + d := o.SparkSubmitTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15177,9 +15174,8 @@ func (o *Task) GetSparkSubmitTask(ctx context.Context) (SparkSubmitTask, bool) { // SetSparkSubmitTask sets the value of the SparkSubmitTask field in Task. func (o *Task) SetSparkSubmitTask(ctx context.Context, v SparkSubmitTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spark_submit_task"] - o.SparkSubmitTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparkSubmitTask = vs } // GetSqlTask returns the value of the SqlTask field in Task as @@ -15191,7 +15187,10 @@ func (o *Task) GetSqlTask(ctx context.Context) (SqlTask, bool) { return e, false } var v []SqlTask - d := o.SqlTask.ElementsAs(ctx, &v, true) + d := o.SqlTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15203,9 +15202,8 @@ func (o *Task) GetSqlTask(ctx context.Context) (SqlTask, bool) { // SetSqlTask sets the value of the SqlTask field in Task. func (o *Task) SetSqlTask(ctx context.Context, v SqlTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_task"] - o.SqlTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlTask = vs } // GetWebhookNotifications returns the value of the WebhookNotifications field in Task as @@ -15217,7 +15215,10 @@ func (o *Task) GetWebhookNotifications(ctx context.Context) (WebhookNotification return e, false } var v []WebhookNotifications - d := o.WebhookNotifications.ElementsAs(ctx, &v, true) + d := o.WebhookNotifications.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15229,9 +15230,8 @@ func (o *Task) GetWebhookNotifications(ctx context.Context) (WebhookNotification // SetWebhookNotifications sets the value of the WebhookNotifications field in Task. func (o *Task) SetWebhookNotifications(ctx context.Context, v WebhookNotifications) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook_notifications"] - o.WebhookNotifications = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WebhookNotifications = vs } type TaskDependency struct { @@ -15711,15 +15711,15 @@ func (o TriggerInfo) Type(ctx context.Context) attr.Type { type TriggerSettings struct { // File arrival trigger settings. - FileArrival types.List `tfsdk:"file_arrival" tf:"optional,object"` + FileArrival types.Object `tfsdk:"file_arrival" tf:"optional,object"` // Whether this trigger is paused or not. PauseStatus types.String `tfsdk:"pause_status" tf:"optional"` // Periodic trigger settings. - Periodic types.List `tfsdk:"periodic" tf:"optional,object"` + Periodic types.Object `tfsdk:"periodic" tf:"optional,object"` // Old table trigger settings name. Deprecated in favor of `table_update`. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"optional,object"` - TableUpdate types.List `tfsdk:"table_update" tf:"optional,object"` + TableUpdate types.Object `tfsdk:"table_update" tf:"optional,object"` } func (newState *TriggerSettings) SyncEffectiveFieldsDuringCreateOrUpdate(plan TriggerSettings) { @@ -15763,19 +15763,11 @@ func (o TriggerSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o TriggerSettings) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_arrival": basetypes.ListType{ - ElemType: FileArrivalTriggerConfiguration{}.Type(ctx), - }, + "file_arrival": FileArrivalTriggerConfiguration{}.Type(ctx), "pause_status": types.StringType, - "periodic": basetypes.ListType{ - ElemType: PeriodicTriggerConfiguration{}.Type(ctx), - }, - "table": basetypes.ListType{ - ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), - }, - "table_update": basetypes.ListType{ - ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), - }, + "periodic": PeriodicTriggerConfiguration{}.Type(ctx), + "table": TableUpdateTriggerConfiguration{}.Type(ctx), + "table_update": TableUpdateTriggerConfiguration{}.Type(ctx), }, } } @@ -15789,7 +15781,10 @@ func (o *TriggerSettings) GetFileArrival(ctx context.Context) (FileArrivalTrigge return e, false } var v []FileArrivalTriggerConfiguration - d := o.FileArrival.ElementsAs(ctx, &v, true) + d := o.FileArrival.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15801,9 +15796,8 @@ func (o *TriggerSettings) GetFileArrival(ctx context.Context) (FileArrivalTrigge // SetFileArrival sets the value of the FileArrival field in TriggerSettings. func (o *TriggerSettings) SetFileArrival(ctx context.Context, v FileArrivalTriggerConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_arrival"] - o.FileArrival = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileArrival = vs } // GetPeriodic returns the value of the Periodic field in TriggerSettings as @@ -15815,7 +15809,10 @@ func (o *TriggerSettings) GetPeriodic(ctx context.Context) (PeriodicTriggerConfi return e, false } var v []PeriodicTriggerConfiguration - d := o.Periodic.ElementsAs(ctx, &v, true) + d := o.Periodic.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15827,9 +15824,8 @@ func (o *TriggerSettings) GetPeriodic(ctx context.Context) (PeriodicTriggerConfi // SetPeriodic sets the value of the Periodic field in TriggerSettings. func (o *TriggerSettings) SetPeriodic(ctx context.Context, v PeriodicTriggerConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["periodic"] - o.Periodic = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Periodic = vs } // GetTable returns the value of the Table field in TriggerSettings as @@ -15841,7 +15837,10 @@ func (o *TriggerSettings) GetTable(ctx context.Context) (TableUpdateTriggerConfi return e, false } var v []TableUpdateTriggerConfiguration - d := o.Table.ElementsAs(ctx, &v, true) + d := o.Table.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15853,9 +15852,8 @@ func (o *TriggerSettings) GetTable(ctx context.Context) (TableUpdateTriggerConfi // SetTable sets the value of the Table field in TriggerSettings. func (o *TriggerSettings) SetTable(ctx context.Context, v TableUpdateTriggerConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] - o.Table = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Table = vs } // GetTableUpdate returns the value of the TableUpdate field in TriggerSettings as @@ -15867,7 +15865,10 @@ func (o *TriggerSettings) GetTableUpdate(ctx context.Context) (TableUpdateTrigge return e, false } var v []TableUpdateTriggerConfiguration - d := o.TableUpdate.ElementsAs(ctx, &v, true) + d := o.TableUpdate.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -15879,9 +15880,8 @@ func (o *TriggerSettings) GetTableUpdate(ctx context.Context) (TableUpdateTrigge // SetTableUpdate sets the value of the TableUpdate field in TriggerSettings. func (o *TriggerSettings) SetTableUpdate(ctx context.Context, v TableUpdateTriggerConfiguration) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_update"] - o.TableUpdate = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableUpdate = vs } type UpdateJob struct { @@ -15902,7 +15902,7 @@ type UpdateJob struct { // // Changes to the field `JobSettings.timeout_seconds` are applied to active // runs. Changes to other fields are applied to future runs only. - NewSettings types.List `tfsdk:"new_settings" tf:"optional,object"` + NewSettings types.Object `tfsdk:"new_settings" tf:"optional,object"` } func (newState *UpdateJob) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateJob) { @@ -15945,10 +15945,8 @@ func (o UpdateJob) Type(ctx context.Context) attr.Type { "fields_to_remove": basetypes.ListType{ ElemType: types.StringType, }, - "job_id": types.Int64Type, - "new_settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), - }, + "job_id": types.Int64Type, + "new_settings": JobSettings{}.Type(ctx), }, } } @@ -15988,7 +15986,10 @@ func (o *UpdateJob) GetNewSettings(ctx context.Context) (JobSettings, bool) { return e, false } var v []JobSettings - d := o.NewSettings.ElementsAs(ctx, &v, true) + d := o.NewSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -16000,9 +16001,8 @@ func (o *UpdateJob) GetNewSettings(ctx context.Context) (JobSettings, bool) { // SetNewSettings sets the value of the NewSettings field in UpdateJob. func (o *UpdateJob) SetNewSettings(ctx context.Context, v JobSettings) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["new_settings"] - o.NewSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NewSettings = vs } type UpdateResponse struct { diff --git a/internal/service/marketplace_tf/legacy_model.go b/internal/service/marketplace_tf/legacy_model.go new file mode 100755 index 000000000..205f36cd6 --- /dev/null +++ b/internal/service/marketplace_tf/legacy_model.go @@ -0,0 +1,7898 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package marketplace_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AddExchangeForListingRequest_SdkV2 struct { + ExchangeId types.String `tfsdk:"exchange_id" tf:""` + + ListingId types.String `tfsdk:"listing_id" tf:""` +} + +func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingRequest_SdkV2) { +} + +func (newState *AddExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddExchangeForListingRequest_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, AddExchangeForListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddExchangeForListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "listing_id": o.ListingId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AddExchangeForListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_id": types.StringType, + "listing_id": types.StringType, + }, + } +} + +type AddExchangeForListingResponse_SdkV2 struct { + ExchangeForListing types.List `tfsdk:"exchange_for_listing" tf:"optional,object"` +} + +func (newState *AddExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingResponse_SdkV2) { +} + +func (newState *AddExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState AddExchangeForListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AddExchangeForListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AddExchangeForListingResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange_for_listing": reflect.TypeOf(ExchangeListing_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, AddExchangeForListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AddExchangeForListingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_for_listing": o.ExchangeForListing, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AddExchangeForListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_for_listing": basetypes.ListType{ + ElemType: ExchangeListing{}.Type(ctx), + }, + }, + } +} + +// GetExchangeForListing returns the value of the ExchangeForListing field in AddExchangeForListingResponse_SdkV2 as +// a ExchangeListing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AddExchangeForListingResponse_SdkV2) GetExchangeForListing(ctx context.Context) (ExchangeListing_SdkV2, bool) { + var e ExchangeListing_SdkV2 + if o.ExchangeForListing.IsNull() || o.ExchangeForListing.IsUnknown() { + return e, false + } + var v []ExchangeListing_SdkV2 + d := o.ExchangeForListing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExchangeForListing sets the value of the ExchangeForListing field in AddExchangeForListingResponse_SdkV2. +func (o *AddExchangeForListingResponse_SdkV2) SetExchangeForListing(ctx context.Context, v ExchangeListing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange_for_listing"] + o.ExchangeForListing = types.ListValueMust(t, vs) +} + +// Get one batch of listings. One may specify up to 50 IDs per request. +type BatchGetListingsRequest_SdkV2 struct { + Ids types.List `tfsdk:"-"` +} + +func (newState *BatchGetListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsRequest_SdkV2) { +} + +func (newState *BatchGetListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BatchGetListingsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ids": 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, BatchGetListingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BatchGetListingsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ids": o.Ids, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BatchGetListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ids": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetIds returns the value of the Ids field in BatchGetListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *BatchGetListingsRequest_SdkV2) GetIds(ctx context.Context) ([]types.String, bool) { + if o.Ids.IsNull() || o.Ids.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Ids.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIds sets the value of the Ids field in BatchGetListingsRequest_SdkV2. +func (o *BatchGetListingsRequest_SdkV2) SetIds(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["ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.Ids = types.ListValueMust(t, vs) +} + +type BatchGetListingsResponse_SdkV2 struct { + Listings types.List `tfsdk:"listings" tf:"optional"` +} + +func (newState *BatchGetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetListingsResponse_SdkV2) { +} + +func (newState *BatchGetListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetListingsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetListingsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BatchGetListingsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listings": reflect.TypeOf(Listing_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, BatchGetListingsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BatchGetListingsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listings": o.Listings, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BatchGetListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listings": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + }, + } +} + +// GetListings returns the value of the Listings field in BatchGetListingsResponse_SdkV2 as +// a slice of Listing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BatchGetListingsResponse_SdkV2) GetListings(ctx context.Context) ([]Listing_SdkV2, bool) { + if o.Listings.IsNull() || o.Listings.IsUnknown() { + return nil, false + } + var v []Listing_SdkV2 + d := o.Listings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetListings sets the value of the Listings field in BatchGetListingsResponse_SdkV2. +func (o *BatchGetListingsResponse_SdkV2) SetListings(ctx context.Context, v []Listing_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["listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.Listings = types.ListValueMust(t, vs) +} + +// Get one batch of providers. One may specify up to 50 IDs per request. +type BatchGetProvidersRequest_SdkV2 struct { + Ids types.List `tfsdk:"-"` +} + +func (newState *BatchGetProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersRequest_SdkV2) { +} + +func (newState *BatchGetProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BatchGetProvidersRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ids": 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, BatchGetProvidersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BatchGetProvidersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ids": o.Ids, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BatchGetProvidersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ids": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetIds returns the value of the Ids field in BatchGetProvidersRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *BatchGetProvidersRequest_SdkV2) GetIds(ctx context.Context) ([]types.String, bool) { + if o.Ids.IsNull() || o.Ids.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Ids.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIds sets the value of the Ids field in BatchGetProvidersRequest_SdkV2. +func (o *BatchGetProvidersRequest_SdkV2) SetIds(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["ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.Ids = types.ListValueMust(t, vs) +} + +type BatchGetProvidersResponse_SdkV2 struct { + Providers types.List `tfsdk:"providers" tf:"optional"` +} + +func (newState *BatchGetProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BatchGetProvidersResponse_SdkV2) { +} + +func (newState *BatchGetProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BatchGetProvidersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BatchGetProvidersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BatchGetProvidersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "providers": reflect.TypeOf(ProviderInfo_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, BatchGetProvidersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BatchGetProvidersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "providers": o.Providers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BatchGetProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "providers": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProviders returns the value of the Providers field in BatchGetProvidersResponse_SdkV2 as +// a slice of ProviderInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *BatchGetProvidersResponse_SdkV2) GetProviders(ctx context.Context) ([]ProviderInfo_SdkV2, bool) { + if o.Providers.IsNull() || o.Providers.IsUnknown() { + return nil, false + } + var v []ProviderInfo_SdkV2 + d := o.Providers.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProviders sets the value of the Providers field in BatchGetProvidersResponse_SdkV2. +func (o *BatchGetProvidersResponse_SdkV2) SetProviders(ctx context.Context, v []ProviderInfo_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["providers"] + t = t.(attr.TypeWithElementType).ElementType() + o.Providers = types.ListValueMust(t, vs) +} + +type ConsumerTerms_SdkV2 struct { + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *ConsumerTerms_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ConsumerTerms_SdkV2) { +} + +func (newState *ConsumerTerms_SdkV2) SyncEffectiveFieldsDuringRead(existingState ConsumerTerms_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ConsumerTerms. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ConsumerTerms_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, ConsumerTerms_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ConsumerTerms_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ConsumerTerms_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "version": types.StringType, + }, + } +} + +// contact info for the consumer requesting data or performing a listing +// installation +type ContactInfo_SdkV2 struct { + Company types.String `tfsdk:"company" tf:"optional"` + + Email types.String `tfsdk:"email" tf:"optional"` + + FirstName types.String `tfsdk:"first_name" tf:"optional"` + + LastName types.String `tfsdk:"last_name" tf:"optional"` +} + +func (newState *ContactInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ContactInfo_SdkV2) { +} + +func (newState *ContactInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ContactInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ContactInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ContactInfo_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, ContactInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ContactInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "company": o.Company, + "email": o.Email, + "first_name": o.FirstName, + "last_name": o.LastName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ContactInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "company": types.StringType, + "email": types.StringType, + "first_name": types.StringType, + "last_name": types.StringType, + }, + } +} + +type CreateExchangeFilterRequest_SdkV2 struct { + Filter types.List `tfsdk:"filter" tf:"object"` +} + +func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterRequest_SdkV2) { +} + +func (newState *CreateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExchangeFilterRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filter": reflect.TypeOf(ExchangeFilter_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, CreateExchangeFilterRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeFilterRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExchangeFilterRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": basetypes.ListType{ + ElemType: ExchangeFilter{}.Type(ctx), + }, + }, + } +} + +// GetFilter returns the value of the Filter field in CreateExchangeFilterRequest_SdkV2 as +// a ExchangeFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExchangeFilterRequest_SdkV2) GetFilter(ctx context.Context) (ExchangeFilter_SdkV2, bool) { + var e ExchangeFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []ExchangeFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in CreateExchangeFilterRequest_SdkV2. +func (o *CreateExchangeFilterRequest_SdkV2) SetFilter(ctx context.Context, v ExchangeFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type CreateExchangeFilterResponse_SdkV2 struct { + FilterId types.String `tfsdk:"filter_id" tf:"optional"` +} + +func (newState *CreateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterResponse_SdkV2) { +} + +func (newState *CreateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeFilterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeFilterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExchangeFilterResponse_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, CreateExchangeFilterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeFilterResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter_id": o.FilterId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExchangeFilterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter_id": types.StringType, + }, + } +} + +type CreateExchangeRequest_SdkV2 struct { + Exchange types.List `tfsdk:"exchange" tf:"object"` +} + +func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeRequest_SdkV2) { +} + +func (newState *CreateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExchangeRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange": reflect.TypeOf(Exchange_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, CreateExchangeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange": o.Exchange, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange": basetypes.ListType{ + ElemType: Exchange{}.Type(ctx), + }, + }, + } +} + +// GetExchange returns the value of the Exchange field in CreateExchangeRequest_SdkV2 as +// a Exchange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExchangeRequest_SdkV2) GetExchange(ctx context.Context) (Exchange_SdkV2, bool) { + var e Exchange_SdkV2 + if o.Exchange.IsNull() || o.Exchange.IsUnknown() { + return e, false + } + var v []Exchange_SdkV2 + d := o.Exchange.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExchange sets the value of the Exchange field in CreateExchangeRequest_SdkV2. +func (o *CreateExchangeRequest_SdkV2) SetExchange(ctx context.Context, v Exchange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] + o.Exchange = types.ListValueMust(t, vs) +} + +type CreateExchangeResponse_SdkV2 struct { + ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` +} + +func (newState *CreateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeResponse_SdkV2) { +} + +func (newState *CreateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExchangeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExchangeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExchangeResponse_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, CreateExchangeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_id": types.StringType, + }, + } +} + +type CreateFileRequest_SdkV2 struct { + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + + FileParent types.List `tfsdk:"file_parent" tf:"object"` + + MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:""` + + MimeType types.String `tfsdk:"mime_type" tf:""` +} + +func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileRequest_SdkV2) { +} + +func (newState *CreateFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFileRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateFileRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_parent": reflect.TypeOf(FileParent_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, CreateFileRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateFileRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "file_parent": o.FileParent, + "marketplace_file_type": o.MarketplaceFileType, + "mime_type": o.MimeType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFileRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "file_parent": basetypes.ListType{ + ElemType: FileParent{}.Type(ctx), + }, + "marketplace_file_type": types.StringType, + "mime_type": types.StringType, + }, + } +} + +// GetFileParent returns the value of the FileParent field in CreateFileRequest_SdkV2 as +// a FileParent_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFileRequest_SdkV2) GetFileParent(ctx context.Context) (FileParent_SdkV2, bool) { + var e FileParent_SdkV2 + if o.FileParent.IsNull() || o.FileParent.IsUnknown() { + return e, false + } + var v []FileParent_SdkV2 + d := o.FileParent.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFileParent sets the value of the FileParent field in CreateFileRequest_SdkV2. +func (o *CreateFileRequest_SdkV2) SetFileParent(ctx context.Context, v FileParent_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] + o.FileParent = types.ListValueMust(t, vs) +} + +type CreateFileResponse_SdkV2 struct { + FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` + // Pre-signed POST URL to blob storage + UploadUrl types.String `tfsdk:"upload_url" tf:"optional"` +} + +func (newState *CreateFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateFileResponse_SdkV2) { +} + +func (newState *CreateFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateFileResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateFileResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateFileResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_info": reflect.TypeOf(FileInfo_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, CreateFileResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateFileResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_info": o.FileInfo, + "upload_url": o.UploadUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateFileResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_info": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + "upload_url": types.StringType, + }, + } +} + +// GetFileInfo returns the value of the FileInfo field in CreateFileResponse_SdkV2 as +// a FileInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateFileResponse_SdkV2) GetFileInfo(ctx context.Context) (FileInfo_SdkV2, bool) { + var e FileInfo_SdkV2 + if o.FileInfo.IsNull() || o.FileInfo.IsUnknown() { + return e, false + } + var v []FileInfo_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 CreateFileResponse_SdkV2. +func (o *CreateFileResponse_SdkV2) SetFileInfo(ctx context.Context, v FileInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_info"] + o.FileInfo = types.ListValueMust(t, vs) +} + +type CreateInstallationRequest_SdkV2 struct { + AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"optional,object"` + + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + + ListingId types.String `tfsdk:"-"` + + RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + // for git repo installations + RepoDetail types.List `tfsdk:"repo_detail" tf:"optional,object"` + + ShareName types.String `tfsdk:"share_name" tf:"optional"` +} + +func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateInstallationRequest_SdkV2) { +} + +func (newState *CreateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateInstallationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateInstallationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "accepted_consumer_terms": reflect.TypeOf(ConsumerTerms_SdkV2{}), + "repo_detail": reflect.TypeOf(RepoInstallation_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, CreateInstallationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateInstallationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "accepted_consumer_terms": o.AcceptedConsumerTerms, + "catalog_name": o.CatalogName, + "listing_id": o.ListingId, + "recipient_type": o.RecipientType, + "repo_detail": o.RepoDetail, + "share_name": o.ShareName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateInstallationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "accepted_consumer_terms": basetypes.ListType{ + ElemType: ConsumerTerms{}.Type(ctx), + }, + "catalog_name": types.StringType, + "listing_id": types.StringType, + "recipient_type": types.StringType, + "repo_detail": basetypes.ListType{ + ElemType: RepoInstallation{}.Type(ctx), + }, + "share_name": types.StringType, + }, + } +} + +// GetAcceptedConsumerTerms returns the value of the AcceptedConsumerTerms field in CreateInstallationRequest_SdkV2 as +// a ConsumerTerms_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstallationRequest_SdkV2) GetAcceptedConsumerTerms(ctx context.Context) (ConsumerTerms_SdkV2, bool) { + var e ConsumerTerms_SdkV2 + if o.AcceptedConsumerTerms.IsNull() || o.AcceptedConsumerTerms.IsUnknown() { + return e, false + } + var v []ConsumerTerms_SdkV2 + d := o.AcceptedConsumerTerms.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAcceptedConsumerTerms sets the value of the AcceptedConsumerTerms field in CreateInstallationRequest_SdkV2. +func (o *CreateInstallationRequest_SdkV2) SetAcceptedConsumerTerms(ctx context.Context, v ConsumerTerms_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["accepted_consumer_terms"] + o.AcceptedConsumerTerms = types.ListValueMust(t, vs) +} + +// GetRepoDetail returns the value of the RepoDetail field in CreateInstallationRequest_SdkV2 as +// a RepoInstallation_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateInstallationRequest_SdkV2) GetRepoDetail(ctx context.Context) (RepoInstallation_SdkV2, bool) { + var e RepoInstallation_SdkV2 + if o.RepoDetail.IsNull() || o.RepoDetail.IsUnknown() { + return e, false + } + var v []RepoInstallation_SdkV2 + d := o.RepoDetail.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRepoDetail sets the value of the RepoDetail field in CreateInstallationRequest_SdkV2. +func (o *CreateInstallationRequest_SdkV2) SetRepoDetail(ctx context.Context, v RepoInstallation_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["repo_detail"] + o.RepoDetail = types.ListValueMust(t, vs) +} + +type CreateListingRequest_SdkV2 struct { + Listing types.List `tfsdk:"listing" tf:"object"` +} + +func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingRequest_SdkV2) { +} + +func (newState *CreateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateListingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateListingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listing": reflect.TypeOf(Listing_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, CreateListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing": o.Listing, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + }, + } +} + +// GetListing returns the value of the Listing field in CreateListingRequest_SdkV2 as +// a Listing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateListingRequest_SdkV2) GetListing(ctx context.Context) (Listing_SdkV2, bool) { + var e Listing_SdkV2 + if o.Listing.IsNull() || o.Listing.IsUnknown() { + return e, false + } + var v []Listing_SdkV2 + d := o.Listing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetListing sets the value of the Listing field in CreateListingRequest_SdkV2. +func (o *CreateListingRequest_SdkV2) SetListing(ctx context.Context, v Listing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] + o.Listing = types.ListValueMust(t, vs) +} + +type CreateListingResponse_SdkV2 struct { + ListingId types.String `tfsdk:"listing_id" tf:"optional"` +} + +func (newState *CreateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingResponse_SdkV2) { +} + +func (newState *CreateListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateListingResponse_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, CreateListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateListingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + }, + } +} + +// Data request messages also creates a lead (maybe) +type CreatePersonalizationRequest_SdkV2 struct { + AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"object"` + + Comment types.String `tfsdk:"comment" tf:"optional"` + + Company types.String `tfsdk:"company" tf:"optional"` + + FirstName types.String `tfsdk:"first_name" tf:"optional"` + + IntendedUse types.String `tfsdk:"intended_use" tf:""` + + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + + LastName types.String `tfsdk:"last_name" tf:"optional"` + + ListingId types.String `tfsdk:"-"` + + RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` +} + +func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequest_SdkV2) { +} + +func (newState *CreatePersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePersonalizationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "accepted_consumer_terms": reflect.TypeOf(ConsumerTerms_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, CreatePersonalizationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePersonalizationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "accepted_consumer_terms": o.AcceptedConsumerTerms, + "comment": o.Comment, + "company": o.Company, + "first_name": o.FirstName, + "intended_use": o.IntendedUse, + "is_from_lighthouse": o.IsFromLighthouse, + "last_name": o.LastName, + "listing_id": o.ListingId, + "recipient_type": o.RecipientType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePersonalizationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "accepted_consumer_terms": basetypes.ListType{ + ElemType: ConsumerTerms{}.Type(ctx), + }, + "comment": types.StringType, + "company": types.StringType, + "first_name": types.StringType, + "intended_use": types.StringType, + "is_from_lighthouse": types.BoolType, + "last_name": types.StringType, + "listing_id": types.StringType, + "recipient_type": types.StringType, + }, + } +} + +// GetAcceptedConsumerTerms returns the value of the AcceptedConsumerTerms field in CreatePersonalizationRequest_SdkV2 as +// a ConsumerTerms_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePersonalizationRequest_SdkV2) GetAcceptedConsumerTerms(ctx context.Context) (ConsumerTerms_SdkV2, bool) { + var e ConsumerTerms_SdkV2 + if o.AcceptedConsumerTerms.IsNull() || o.AcceptedConsumerTerms.IsUnknown() { + return e, false + } + var v []ConsumerTerms_SdkV2 + d := o.AcceptedConsumerTerms.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAcceptedConsumerTerms sets the value of the AcceptedConsumerTerms field in CreatePersonalizationRequest_SdkV2. +func (o *CreatePersonalizationRequest_SdkV2) SetAcceptedConsumerTerms(ctx context.Context, v ConsumerTerms_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["accepted_consumer_terms"] + o.AcceptedConsumerTerms = types.ListValueMust(t, vs) +} + +type CreatePersonalizationRequestResponse_SdkV2 struct { + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *CreatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePersonalizationRequestResponse_SdkV2) { +} + +func (newState *CreatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePersonalizationRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePersonalizationRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePersonalizationRequestResponse_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, CreatePersonalizationRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePersonalizationRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePersonalizationRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type CreateProviderRequest_SdkV2 struct { + Provider types.List `tfsdk:"provider" tf:"object"` +} + +func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderRequest_SdkV2) { +} + +func (newState *CreateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProviderRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateProviderRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "provider": reflect.TypeOf(ProviderInfo_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, CreateProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateProviderRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "provider": o.Provider, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "provider": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProvider returns the value of the Provider field in CreateProviderRequest_SdkV2 as +// a ProviderInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateProviderRequest_SdkV2) GetProvider(ctx context.Context) (ProviderInfo_SdkV2, bool) { + var e ProviderInfo_SdkV2 + if o.Provider.IsNull() || o.Provider.IsUnknown() { + return e, false + } + var v []ProviderInfo_SdkV2 + d := o.Provider.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvider sets the value of the Provider field in CreateProviderRequest_SdkV2. +func (o *CreateProviderRequest_SdkV2) SetProvider(ctx context.Context, v ProviderInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] + o.Provider = types.ListValueMust(t, vs) +} + +type CreateProviderResponse_SdkV2 struct { + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *CreateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderResponse_SdkV2) { +} + +func (newState *CreateProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProviderResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateProviderResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateProviderResponse_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, CreateProviderResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateProviderResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DataRefreshInfo_SdkV2 struct { + Interval types.Int64 `tfsdk:"interval" tf:""` + + Unit types.String `tfsdk:"unit" tf:""` +} + +func (newState *DataRefreshInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataRefreshInfo_SdkV2) { +} + +func (newState *DataRefreshInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataRefreshInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataRefreshInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataRefreshInfo_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, DataRefreshInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataRefreshInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "interval": o.Interval, + "unit": o.Unit, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataRefreshInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "interval": types.Int64Type, + "unit": types.StringType, + }, + } +} + +// Delete an exchange filter +type DeleteExchangeFilterRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeFilterRequest_SdkV2) { +} + +func (newState *DeleteExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExchangeFilterRequest_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, DeleteExchangeFilterRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeFilterRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExchangeFilterRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteExchangeFilterResponse_SdkV2 struct { +} + +func (newState *DeleteExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeFilterResponse_SdkV2) { +} + +func (newState *DeleteExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeFilterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeFilterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExchangeFilterResponse_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, DeleteExchangeFilterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeFilterResponse_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 DeleteExchangeFilterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete an exchange +type DeleteExchangeRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeRequest_SdkV2) { +} + +func (newState *DeleteExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExchangeRequest_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, DeleteExchangeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteExchangeResponse_SdkV2 struct { +} + +func (newState *DeleteExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExchangeResponse_SdkV2) { +} + +func (newState *DeleteExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExchangeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExchangeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExchangeResponse_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, DeleteExchangeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeResponse_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 DeleteExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a file +type DeleteFileRequest_SdkV2 struct { + FileId types.String `tfsdk:"-"` +} + +func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileRequest_SdkV2) { +} + +func (newState *DeleteFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteFileRequest_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, DeleteFileRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteFileRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_id": o.FileId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteFileRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_id": types.StringType, + }, + } +} + +type DeleteFileResponse_SdkV2 struct { +} + +func (newState *DeleteFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteFileResponse_SdkV2) { +} + +func (newState *DeleteFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteFileResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteFileResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteFileResponse_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, DeleteFileResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteFileResponse_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 DeleteFileResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Uninstall from a listing +type DeleteInstallationRequest_SdkV2 struct { + InstallationId types.String `tfsdk:"-"` + + ListingId types.String `tfsdk:"-"` +} + +func (newState *DeleteInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstallationRequest_SdkV2) { +} + +func (newState *DeleteInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteInstallationRequest_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, DeleteInstallationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteInstallationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installation_id": o.InstallationId, + "listing_id": o.ListingId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteInstallationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installation_id": types.StringType, + "listing_id": types.StringType, + }, + } +} + +type DeleteInstallationResponse_SdkV2 struct { +} + +func (newState *DeleteInstallationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteInstallationResponse_SdkV2) { +} + +func (newState *DeleteInstallationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteInstallationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteInstallationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteInstallationResponse_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, DeleteInstallationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteInstallationResponse_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 DeleteInstallationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a listing +type DeleteListingRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteListingRequest_SdkV2) { +} + +func (newState *DeleteListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteListingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteListingRequest_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, DeleteListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteListingResponse_SdkV2 struct { +} + +func (newState *DeleteListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteListingResponse_SdkV2) { +} + +func (newState *DeleteListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteListingResponse_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, DeleteListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteListingResponse_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 DeleteListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete provider +type DeleteProviderRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest_SdkV2) { +} + +func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteProviderRequest_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, DeleteProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteProviderResponse_SdkV2 struct { +} + +func (newState *DeleteProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderResponse_SdkV2) { +} + +func (newState *DeleteProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteProviderResponse_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, DeleteProviderResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderResponse_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 DeleteProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Exchange_SdkV2 struct { + Comment types.String `tfsdk:"comment" tf:"optional"` + + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + Filters types.List `tfsdk:"filters" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + + LinkedListings types.List `tfsdk:"linked_listings" tf:"optional"` + + Name types.String `tfsdk:"name" tf:""` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *Exchange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Exchange_SdkV2) { +} + +func (newState *Exchange_SdkV2) SyncEffectiveFieldsDuringRead(existingState Exchange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Exchange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Exchange_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filters": reflect.TypeOf(ExchangeFilter_SdkV2{}), + "linked_listings": reflect.TypeOf(ExchangeListing_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, Exchange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Exchange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "filters": o.Filters, + "id": o.Id, + "linked_listings": o.LinkedListings, + "name": o.Name, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Exchange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "filters": basetypes.ListType{ + ElemType: ExchangeFilter{}.Type(ctx), + }, + "id": types.StringType, + "linked_listings": basetypes.ListType{ + ElemType: ExchangeListing{}.Type(ctx), + }, + "name": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetFilters returns the value of the Filters field in Exchange_SdkV2 as +// a slice of ExchangeFilter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Exchange_SdkV2) GetFilters(ctx context.Context) ([]ExchangeFilter_SdkV2, bool) { + if o.Filters.IsNull() || o.Filters.IsUnknown() { + return nil, false + } + var v []ExchangeFilter_SdkV2 + d := o.Filters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFilters sets the value of the Filters field in Exchange_SdkV2. +func (o *Exchange_SdkV2) SetFilters(ctx context.Context, v []ExchangeFilter_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["filters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Filters = types.ListValueMust(t, vs) +} + +// GetLinkedListings returns the value of the LinkedListings field in Exchange_SdkV2 as +// a slice of ExchangeListing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Exchange_SdkV2) GetLinkedListings(ctx context.Context) ([]ExchangeListing_SdkV2, bool) { + if o.LinkedListings.IsNull() || o.LinkedListings.IsUnknown() { + return nil, false + } + var v []ExchangeListing_SdkV2 + d := o.LinkedListings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLinkedListings sets the value of the LinkedListings field in Exchange_SdkV2. +func (o *Exchange_SdkV2) SetLinkedListings(ctx context.Context, v []ExchangeListing_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["linked_listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.LinkedListings = types.ListValueMust(t, vs) +} + +type ExchangeFilter_SdkV2 struct { + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + ExchangeId types.String `tfsdk:"exchange_id" tf:""` + + FilterType types.String `tfsdk:"filter_type" tf:""` + + FilterValue types.String `tfsdk:"filter_value" tf:""` + + Id types.String `tfsdk:"id" tf:"optional"` + + Name types.String `tfsdk:"name" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *ExchangeFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeFilter_SdkV2) { +} + +func (newState *ExchangeFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeFilter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeFilter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExchangeFilter_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, ExchangeFilter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExchangeFilter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "exchange_id": o.ExchangeId, + "filter_type": o.FilterType, + "filter_value": o.FilterValue, + "id": o.Id, + "name": o.Name, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExchangeFilter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "created_by": types.StringType, + "exchange_id": types.StringType, + "filter_type": types.StringType, + "filter_value": types.StringType, + "id": types.StringType, + "name": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +type ExchangeListing_SdkV2 struct { + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + ExchangeId types.String `tfsdk:"exchange_id" tf:"optional"` + + ExchangeName types.String `tfsdk:"exchange_name" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + + ListingId types.String `tfsdk:"listing_id" tf:"optional"` + + ListingName types.String `tfsdk:"listing_name" tf:"optional"` +} + +func (newState *ExchangeListing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeListing_SdkV2) { +} + +func (newState *ExchangeListing_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeListing_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeListing. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExchangeListing_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, ExchangeListing_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExchangeListing_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "exchange_id": o.ExchangeId, + "exchange_name": o.ExchangeName, + "id": o.Id, + "listing_id": o.ListingId, + "listing_name": o.ListingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExchangeListing_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "created_by": types.StringType, + "exchange_id": types.StringType, + "exchange_name": types.StringType, + "id": types.StringType, + "listing_id": types.StringType, + "listing_name": types.StringType, + }, + } +} + +type FileInfo_SdkV2 struct { + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Name displayed to users for applicable files, e.g. embedded notebooks + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + + DownloadLink types.String `tfsdk:"download_link" tf:"optional"` + + FileParent types.List `tfsdk:"file_parent" tf:"optional,object"` + + Id types.String `tfsdk:"id" tf:"optional"` + + MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:"optional"` + + MimeType types.String `tfsdk:"mime_type" tf:"optional"` + + Status types.String `tfsdk:"status" tf:"optional"` + // Populated if status is in a failed state with more information on reason + // for the failure. + StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { +} + +// 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{ + "file_parent": reflect.TypeOf(FileParent_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, 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{ + "created_at": o.CreatedAt, + "display_name": o.DisplayName, + "download_link": o.DownloadLink, + "file_parent": o.FileParent, + "id": o.Id, + "marketplace_file_type": o.MarketplaceFileType, + "mime_type": o.MimeType, + "status": o.Status, + "status_message": o.StatusMessage, + "updated_at": o.UpdatedAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "display_name": types.StringType, + "download_link": types.StringType, + "file_parent": basetypes.ListType{ + ElemType: FileParent{}.Type(ctx), + }, + "id": types.StringType, + "marketplace_file_type": types.StringType, + "mime_type": types.StringType, + "status": types.StringType, + "status_message": types.StringType, + "updated_at": types.Int64Type, + }, + } +} + +// GetFileParent returns the value of the FileParent field in FileInfo_SdkV2 as +// a FileParent_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FileInfo_SdkV2) GetFileParent(ctx context.Context) (FileParent_SdkV2, bool) { + var e FileParent_SdkV2 + if o.FileParent.IsNull() || o.FileParent.IsUnknown() { + return e, false + } + var v []FileParent_SdkV2 + d := o.FileParent.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFileParent sets the value of the FileParent field in FileInfo_SdkV2. +func (o *FileInfo_SdkV2) SetFileParent(ctx context.Context, v FileParent_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] + o.FileParent = types.ListValueMust(t, vs) +} + +type FileParent_SdkV2 struct { + FileParentType types.String `tfsdk:"file_parent_type" tf:"optional"` + // TODO make the following fields required + ParentId types.String `tfsdk:"parent_id" tf:"optional"` +} + +func (newState *FileParent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileParent_SdkV2) { +} + +func (newState *FileParent_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileParent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FileParent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FileParent_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, FileParent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FileParent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_parent_type": o.FileParentType, + "parent_id": o.ParentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileParent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_parent_type": types.StringType, + "parent_id": types.StringType, + }, + } +} + +// Get an exchange +type GetExchangeRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeRequest_SdkV2) { +} + +func (newState *GetExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExchangeRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExchangeRequest_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, GetExchangeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExchangeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetExchangeResponse_SdkV2 struct { + Exchange types.List `tfsdk:"exchange" tf:"optional,object"` +} + +func (newState *GetExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeResponse_SdkV2) { +} + +func (newState *GetExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExchangeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExchangeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExchangeResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange": reflect.TypeOf(Exchange_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, GetExchangeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExchangeResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange": o.Exchange, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange": basetypes.ListType{ + ElemType: Exchange{}.Type(ctx), + }, + }, + } +} + +// GetExchange returns the value of the Exchange field in GetExchangeResponse_SdkV2 as +// a Exchange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetExchangeResponse_SdkV2) GetExchange(ctx context.Context) (Exchange_SdkV2, bool) { + var e Exchange_SdkV2 + if o.Exchange.IsNull() || o.Exchange.IsUnknown() { + return e, false + } + var v []Exchange_SdkV2 + d := o.Exchange.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExchange sets the value of the Exchange field in GetExchangeResponse_SdkV2. +func (o *GetExchangeResponse_SdkV2) SetExchange(ctx context.Context, v Exchange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] + o.Exchange = types.ListValueMust(t, vs) +} + +// Get a file +type GetFileRequest_SdkV2 struct { + FileId types.String `tfsdk:"-"` +} + +func (newState *GetFileRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileRequest_SdkV2) { +} + +func (newState *GetFileRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFileRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetFileRequest_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, GetFileRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetFileRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_id": o.FileId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFileRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_id": types.StringType, + }, + } +} + +type GetFileResponse_SdkV2 struct { + FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` +} + +func (newState *GetFileResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileResponse_SdkV2) { +} + +func (newState *GetFileResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetFileResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetFileResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetFileResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_info": reflect.TypeOf(FileInfo_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, GetFileResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetFileResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_info": o.FileInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetFileResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_info": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + }, + } +} + +// GetFileInfo returns the value of the FileInfo field in GetFileResponse_SdkV2 as +// a FileInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetFileResponse_SdkV2) GetFileInfo(ctx context.Context) (FileInfo_SdkV2, bool) { + var e FileInfo_SdkV2 + if o.FileInfo.IsNull() || o.FileInfo.IsUnknown() { + return e, false + } + var v []FileInfo_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 GetFileResponse_SdkV2. +func (o *GetFileResponse_SdkV2) SetFileInfo(ctx context.Context, v FileInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_info"] + o.FileInfo = types.ListValueMust(t, vs) +} + +type GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2 struct { + // version here is latest logical version of the dashboard template + Version types.Int64 `tfsdk:"version" tf:"optional"` +} + +func (newState *GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) { +} + +func (newState *GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionProviderAnalyticsDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetLatestVersionProviderAnalyticsDashboardResponse_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, GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLatestVersionProviderAnalyticsDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "version": types.Int64Type, + }, + } +} + +// Get listing content metadata +type GetListingContentMetadataRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *GetListingContentMetadataRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataRequest_SdkV2) { +} + +func (newState *GetListingContentMetadataRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingContentMetadataRequest_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, GetListingContentMetadataRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingContentMetadataRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetListingContentMetadataRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type GetListingContentMetadataResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + SharedDataObjects types.List `tfsdk:"shared_data_objects" tf:"optional"` +} + +func (newState *GetListingContentMetadataResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingContentMetadataResponse_SdkV2) { +} + +func (newState *GetListingContentMetadataResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingContentMetadataResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingContentMetadataResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingContentMetadataResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "shared_data_objects": reflect.TypeOf(SharedDataObject_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, GetListingContentMetadataResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingContentMetadataResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shared_data_objects": o.SharedDataObjects, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetListingContentMetadataResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "shared_data_objects": basetypes.ListType{ + ElemType: SharedDataObject{}.Type(ctx), + }, + }, + } +} + +// GetSharedDataObjects returns the value of the SharedDataObjects field in GetListingContentMetadataResponse_SdkV2 as +// a slice of SharedDataObject_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetListingContentMetadataResponse_SdkV2) GetSharedDataObjects(ctx context.Context) ([]SharedDataObject_SdkV2, bool) { + if o.SharedDataObjects.IsNull() || o.SharedDataObjects.IsUnknown() { + return nil, false + } + var v []SharedDataObject_SdkV2 + d := o.SharedDataObjects.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSharedDataObjects sets the value of the SharedDataObjects field in GetListingContentMetadataResponse_SdkV2. +func (o *GetListingContentMetadataResponse_SdkV2) SetSharedDataObjects(ctx context.Context, v []SharedDataObject_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["shared_data_objects"] + t = t.(attr.TypeWithElementType).ElementType() + o.SharedDataObjects = types.ListValueMust(t, vs) +} + +// Get listing +type GetListingRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingRequest_SdkV2) { +} + +func (newState *GetListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingRequest_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, GetListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetListingResponse_SdkV2 struct { + Listing types.List `tfsdk:"listing" tf:"optional,object"` +} + +func (newState *GetListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingResponse_SdkV2) { +} + +func (newState *GetListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listing": reflect.TypeOf(Listing_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, GetListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing": o.Listing, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + }, + } +} + +// GetListing returns the value of the Listing field in GetListingResponse_SdkV2 as +// a Listing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetListingResponse_SdkV2) GetListing(ctx context.Context) (Listing_SdkV2, bool) { + var e Listing_SdkV2 + if o.Listing.IsNull() || o.Listing.IsUnknown() { + return e, false + } + var v []Listing_SdkV2 + d := o.Listing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetListing sets the value of the Listing field in GetListingResponse_SdkV2. +func (o *GetListingResponse_SdkV2) SetListing(ctx context.Context, v Listing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] + o.Listing = types.ListValueMust(t, vs) +} + +// List listings +type GetListingsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *GetListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsRequest_SdkV2) { +} + +func (newState *GetListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingsRequest_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, GetListingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingsRequest_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 GetListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type GetListingsResponse_SdkV2 struct { + Listings types.List `tfsdk:"listings" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *GetListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingsResponse_SdkV2) { +} + +func (newState *GetListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetListingsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetListingsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetListingsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listings": reflect.TypeOf(Listing_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, GetListingsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetListingsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listings": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetListings returns the value of the Listings field in GetListingsResponse_SdkV2 as +// a slice of Listing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetListingsResponse_SdkV2) GetListings(ctx context.Context) ([]Listing_SdkV2, bool) { + if o.Listings.IsNull() || o.Listings.IsUnknown() { + return nil, false + } + var v []Listing_SdkV2 + d := o.Listings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetListings sets the value of the Listings field in GetListingsResponse_SdkV2. +func (o *GetListingsResponse_SdkV2) SetListings(ctx context.Context, v []Listing_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["listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.Listings = types.ListValueMust(t, vs) +} + +// Get the personalization request for a listing +type GetPersonalizationRequestRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` +} + +func (newState *GetPersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestRequest_SdkV2) { +} + +func (newState *GetPersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPersonalizationRequestRequest_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, GetPersonalizationRequestRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPersonalizationRequestRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPersonalizationRequestRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + }, + } +} + +type GetPersonalizationRequestResponse_SdkV2 struct { + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` +} + +func (newState *GetPersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalizationRequestResponse_SdkV2) { +} + +func (newState *GetPersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalizationRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalizationRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPersonalizationRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "personalization_requests": reflect.TypeOf(PersonalizationRequest_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, GetPersonalizationRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPersonalizationRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "personalization_requests": o.PersonalizationRequests, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPersonalizationRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "personalization_requests": basetypes.ListType{ + ElemType: PersonalizationRequest{}.Type(ctx), + }, + }, + } +} + +// GetPersonalizationRequests returns the value of the PersonalizationRequests field in GetPersonalizationRequestResponse_SdkV2 as +// a slice of PersonalizationRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPersonalizationRequestResponse_SdkV2) GetPersonalizationRequests(ctx context.Context) ([]PersonalizationRequest_SdkV2, bool) { + if o.PersonalizationRequests.IsNull() || o.PersonalizationRequests.IsUnknown() { + return nil, false + } + var v []PersonalizationRequest_SdkV2 + d := o.PersonalizationRequests.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPersonalizationRequests sets the value of the PersonalizationRequests field in GetPersonalizationRequestResponse_SdkV2. +func (o *GetPersonalizationRequestResponse_SdkV2) SetPersonalizationRequests(ctx context.Context, v []PersonalizationRequest_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["personalization_requests"] + t = t.(attr.TypeWithElementType).ElementType() + o.PersonalizationRequests = types.ListValueMust(t, vs) +} + +// Get a provider +type GetProviderRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest_SdkV2) { +} + +func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetProviderRequest_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, GetProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetProviderRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetProviderResponse_SdkV2 struct { + Provider types.List `tfsdk:"provider" tf:"optional,object"` +} + +func (newState *GetProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderResponse_SdkV2) { +} + +func (newState *GetProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetProviderResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "provider": reflect.TypeOf(ProviderInfo_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, GetProviderResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetProviderResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "provider": o.Provider, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "provider": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProvider returns the value of the Provider field in GetProviderResponse_SdkV2 as +// a ProviderInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetProviderResponse_SdkV2) GetProvider(ctx context.Context) (ProviderInfo_SdkV2, bool) { + var e ProviderInfo_SdkV2 + if o.Provider.IsNull() || o.Provider.IsUnknown() { + return e, false + } + var v []ProviderInfo_SdkV2 + d := o.Provider.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvider sets the value of the Provider field in GetProviderResponse_SdkV2. +func (o *GetProviderResponse_SdkV2) SetProvider(ctx context.Context, v ProviderInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] + o.Provider = types.ListValueMust(t, vs) +} + +type Installation_SdkV2 struct { + Installation types.List `tfsdk:"installation" tf:"optional,object"` +} + +func (newState *Installation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Installation_SdkV2) { +} + +func (newState *Installation_SdkV2) SyncEffectiveFieldsDuringRead(existingState Installation_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Installation. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Installation_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "installation": reflect.TypeOf(InstallationDetail_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, Installation_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Installation_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installation": o.Installation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Installation_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installation": basetypes.ListType{ + ElemType: InstallationDetail{}.Type(ctx), + }, + }, + } +} + +// GetInstallation returns the value of the Installation field in Installation_SdkV2 as +// a InstallationDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Installation_SdkV2) GetInstallation(ctx context.Context) (InstallationDetail_SdkV2, bool) { + var e InstallationDetail_SdkV2 + if o.Installation.IsNull() || o.Installation.IsUnknown() { + return e, false + } + var v []InstallationDetail_SdkV2 + d := o.Installation.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInstallation sets the value of the Installation field in Installation_SdkV2. +func (o *Installation_SdkV2) SetInstallation(ctx context.Context, v InstallationDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] + o.Installation = types.ListValueMust(t, vs) +} + +type InstallationDetail_SdkV2 struct { + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + + ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + + InstalledOn types.Int64 `tfsdk:"installed_on" tf:"optional"` + + ListingId types.String `tfsdk:"listing_id" tf:"optional"` + + ListingName types.String `tfsdk:"listing_name" tf:"optional"` + + RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + + RepoName types.String `tfsdk:"repo_name" tf:"optional"` + + RepoPath types.String `tfsdk:"repo_path" tf:"optional"` + + ShareName types.String `tfsdk:"share_name" tf:"optional"` + + Status types.String `tfsdk:"status" tf:"optional"` + + TokenDetail types.List `tfsdk:"token_detail" tf:"optional,object"` + + Tokens types.List `tfsdk:"tokens" tf:"optional"` +} + +func (newState *InstallationDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InstallationDetail_SdkV2) { +} + +func (newState *InstallationDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState InstallationDetail_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InstallationDetail. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InstallationDetail_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_detail": reflect.TypeOf(TokenDetail_SdkV2{}), + "tokens": reflect.TypeOf(TokenInfo_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, InstallationDetail_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InstallationDetail_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "error_message": o.ErrorMessage, + "id": o.Id, + "installed_on": o.InstalledOn, + "listing_id": o.ListingId, + "listing_name": o.ListingName, + "recipient_type": o.RecipientType, + "repo_name": o.RepoName, + "repo_path": o.RepoPath, + "share_name": o.ShareName, + "status": o.Status, + "token_detail": o.TokenDetail, + "tokens": o.Tokens, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o InstallationDetail_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "error_message": types.StringType, + "id": types.StringType, + "installed_on": types.Int64Type, + "listing_id": types.StringType, + "listing_name": types.StringType, + "recipient_type": types.StringType, + "repo_name": types.StringType, + "repo_path": types.StringType, + "share_name": types.StringType, + "status": types.StringType, + "token_detail": basetypes.ListType{ + ElemType: TokenDetail{}.Type(ctx), + }, + "tokens": basetypes.ListType{ + ElemType: TokenInfo{}.Type(ctx), + }, + }, + } +} + +// GetTokenDetail returns the value of the TokenDetail field in InstallationDetail_SdkV2 as +// a TokenDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *InstallationDetail_SdkV2) GetTokenDetail(ctx context.Context) (TokenDetail_SdkV2, bool) { + var e TokenDetail_SdkV2 + if o.TokenDetail.IsNull() || o.TokenDetail.IsUnknown() { + return e, false + } + var v []TokenDetail_SdkV2 + d := o.TokenDetail.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenDetail sets the value of the TokenDetail field in InstallationDetail_SdkV2. +func (o *InstallationDetail_SdkV2) SetTokenDetail(ctx context.Context, v TokenDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_detail"] + o.TokenDetail = types.ListValueMust(t, vs) +} + +// GetTokens returns the value of the Tokens field in InstallationDetail_SdkV2 as +// a slice of TokenInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *InstallationDetail_SdkV2) GetTokens(ctx context.Context) ([]TokenInfo_SdkV2, bool) { + if o.Tokens.IsNull() || o.Tokens.IsUnknown() { + return nil, false + } + var v []TokenInfo_SdkV2 + d := o.Tokens.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTokens sets the value of the Tokens field in InstallationDetail_SdkV2. +func (o *InstallationDetail_SdkV2) SetTokens(ctx context.Context, v []TokenInfo_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["tokens"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tokens = types.ListValueMust(t, vs) +} + +// List all installations +type ListAllInstallationsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAllInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsRequest_SdkV2) { +} + +func (newState *ListAllInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAllInstallationsRequest_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, ListAllInstallationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllInstallationsRequest_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 ListAllInstallationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListAllInstallationsResponse_SdkV2 struct { + Installations types.List `tfsdk:"installations" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListAllInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllInstallationsResponse_SdkV2) { +} + +func (newState *ListAllInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllInstallationsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllInstallationsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAllInstallationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "installations": reflect.TypeOf(InstallationDetail_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, ListAllInstallationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllInstallationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installations": o.Installations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAllInstallationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installations": basetypes.ListType{ + ElemType: InstallationDetail{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetInstallations returns the value of the Installations field in ListAllInstallationsResponse_SdkV2 as +// a slice of InstallationDetail_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAllInstallationsResponse_SdkV2) GetInstallations(ctx context.Context) ([]InstallationDetail_SdkV2, bool) { + if o.Installations.IsNull() || o.Installations.IsUnknown() { + return nil, false + } + var v []InstallationDetail_SdkV2 + d := o.Installations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInstallations sets the value of the Installations field in ListAllInstallationsResponse_SdkV2. +func (o *ListAllInstallationsResponse_SdkV2) SetInstallations(ctx context.Context, v []InstallationDetail_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["installations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Installations = types.ListValueMust(t, vs) +} + +// List all personalization requests +type ListAllPersonalizationRequestsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAllPersonalizationRequestsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsRequest_SdkV2) { +} + +func (newState *ListAllPersonalizationRequestsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAllPersonalizationRequestsRequest_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, ListAllPersonalizationRequestsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllPersonalizationRequestsRequest_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 ListAllPersonalizationRequestsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListAllPersonalizationRequestsResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + PersonalizationRequests types.List `tfsdk:"personalization_requests" tf:"optional"` +} + +func (newState *ListAllPersonalizationRequestsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAllPersonalizationRequestsResponse_SdkV2) { +} + +func (newState *ListAllPersonalizationRequestsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAllPersonalizationRequestsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAllPersonalizationRequestsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAllPersonalizationRequestsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "personalization_requests": reflect.TypeOf(PersonalizationRequest_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, ListAllPersonalizationRequestsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAllPersonalizationRequestsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "personalization_requests": o.PersonalizationRequests, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAllPersonalizationRequestsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "personalization_requests": basetypes.ListType{ + ElemType: PersonalizationRequest{}.Type(ctx), + }, + }, + } +} + +// GetPersonalizationRequests returns the value of the PersonalizationRequests field in ListAllPersonalizationRequestsResponse_SdkV2 as +// a slice of PersonalizationRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAllPersonalizationRequestsResponse_SdkV2) GetPersonalizationRequests(ctx context.Context) ([]PersonalizationRequest_SdkV2, bool) { + if o.PersonalizationRequests.IsNull() || o.PersonalizationRequests.IsUnknown() { + return nil, false + } + var v []PersonalizationRequest_SdkV2 + d := o.PersonalizationRequests.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPersonalizationRequests sets the value of the PersonalizationRequests field in ListAllPersonalizationRequestsResponse_SdkV2. +func (o *ListAllPersonalizationRequestsResponse_SdkV2) SetPersonalizationRequests(ctx context.Context, v []PersonalizationRequest_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["personalization_requests"] + t = t.(attr.TypeWithElementType).ElementType() + o.PersonalizationRequests = types.ListValueMust(t, vs) +} + +// List exchange filters +type ListExchangeFiltersRequest_SdkV2 struct { + ExchangeId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListExchangeFiltersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersRequest_SdkV2) { +} + +func (newState *ListExchangeFiltersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangeFiltersRequest_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, ListExchangeFiltersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangeFiltersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExchangeFiltersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListExchangeFiltersResponse_SdkV2 struct { + Filters types.List `tfsdk:"filters" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListExchangeFiltersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangeFiltersResponse_SdkV2) { +} + +func (newState *ListExchangeFiltersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangeFiltersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangeFiltersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangeFiltersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filters": reflect.TypeOf(ExchangeFilter_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, ListExchangeFiltersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangeFiltersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filters": o.Filters, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExchangeFiltersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filters": basetypes.ListType{ + ElemType: ExchangeFilter{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetFilters returns the value of the Filters field in ListExchangeFiltersResponse_SdkV2 as +// a slice of ExchangeFilter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExchangeFiltersResponse_SdkV2) GetFilters(ctx context.Context) ([]ExchangeFilter_SdkV2, bool) { + if o.Filters.IsNull() || o.Filters.IsUnknown() { + return nil, false + } + var v []ExchangeFilter_SdkV2 + d := o.Filters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFilters sets the value of the Filters field in ListExchangeFiltersResponse_SdkV2. +func (o *ListExchangeFiltersResponse_SdkV2) SetFilters(ctx context.Context, v []ExchangeFilter_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["filters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Filters = types.ListValueMust(t, vs) +} + +// List exchanges for listing +type ListExchangesForListingRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListExchangesForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingRequest_SdkV2) { +} + +func (newState *ListExchangesForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangesForListingRequest_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, ListExchangesForListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangesForListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExchangesForListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListExchangesForListingResponse_SdkV2 struct { + ExchangeListing types.List `tfsdk:"exchange_listing" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListExchangesForListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesForListingResponse_SdkV2) { +} + +func (newState *ListExchangesForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesForListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesForListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangesForListingResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange_listing": reflect.TypeOf(ExchangeListing_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, ListExchangesForListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangesForListingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_listing": o.ExchangeListing, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExchangesForListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_listing": basetypes.ListType{ + ElemType: ExchangeListing{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExchangeListing returns the value of the ExchangeListing field in ListExchangesForListingResponse_SdkV2 as +// a slice of ExchangeListing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExchangesForListingResponse_SdkV2) GetExchangeListing(ctx context.Context) ([]ExchangeListing_SdkV2, bool) { + if o.ExchangeListing.IsNull() || o.ExchangeListing.IsUnknown() { + return nil, false + } + var v []ExchangeListing_SdkV2 + d := o.ExchangeListing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExchangeListing sets the value of the ExchangeListing field in ListExchangesForListingResponse_SdkV2. +func (o *ListExchangesForListingResponse_SdkV2) SetExchangeListing(ctx context.Context, v []ExchangeListing_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["exchange_listing"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExchangeListing = types.ListValueMust(t, vs) +} + +// List exchanges +type ListExchangesRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListExchangesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesRequest_SdkV2) { +} + +func (newState *ListExchangesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangesRequest_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, ListExchangesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangesRequest_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 ListExchangesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListExchangesResponse_SdkV2 struct { + Exchanges types.List `tfsdk:"exchanges" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListExchangesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExchangesResponse_SdkV2) { +} + +func (newState *ListExchangesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExchangesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExchangesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExchangesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchanges": reflect.TypeOf(Exchange_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, ListExchangesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExchangesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchanges": o.Exchanges, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListExchangesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchanges": basetypes.ListType{ + ElemType: Exchange{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExchanges returns the value of the Exchanges field in ListExchangesResponse_SdkV2 as +// a slice of Exchange_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListExchangesResponse_SdkV2) GetExchanges(ctx context.Context) ([]Exchange_SdkV2, bool) { + if o.Exchanges.IsNull() || o.Exchanges.IsUnknown() { + return nil, false + } + var v []Exchange_SdkV2 + d := o.Exchanges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExchanges sets the value of the Exchanges field in ListExchangesResponse_SdkV2. +func (o *ListExchangesResponse_SdkV2) SetExchanges(ctx context.Context, v []Exchange_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["exchanges"] + t = t.(attr.TypeWithElementType).ElementType() + o.Exchanges = types.ListValueMust(t, vs) +} + +// List files +type ListFilesRequest_SdkV2 struct { + FileParent types.List `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListFilesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesRequest_SdkV2) { +} + +func (newState *ListFilesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFilesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFilesRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_parent": reflect.TypeOf(FileParent_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, ListFilesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFilesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_parent": o.FileParent, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFilesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_parent": basetypes.ListType{ + ElemType: FileParent{}.Type(ctx), + }, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// GetFileParent returns the value of the FileParent field in ListFilesRequest_SdkV2 as +// a FileParent_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListFilesRequest_SdkV2) GetFileParent(ctx context.Context) (FileParent_SdkV2, bool) { + var e FileParent_SdkV2 + if o.FileParent.IsNull() || o.FileParent.IsUnknown() { + return e, false + } + var v []FileParent_SdkV2 + d := o.FileParent.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFileParent sets the value of the FileParent field in ListFilesRequest_SdkV2. +func (o *ListFilesRequest_SdkV2) SetFileParent(ctx context.Context, v FileParent_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] + o.FileParent = types.ListValueMust(t, vs) +} + +type ListFilesResponse_SdkV2 struct { + FileInfos types.List `tfsdk:"file_infos" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListFilesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFilesResponse_SdkV2) { +} + +func (newState *ListFilesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFilesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFilesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFilesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file_infos": reflect.TypeOf(FileInfo_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, ListFilesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFilesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file_infos": o.FileInfos, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFilesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file_infos": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetFileInfos returns the value of the FileInfos field in ListFilesResponse_SdkV2 as +// a slice of FileInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListFilesResponse_SdkV2) GetFileInfos(ctx context.Context) ([]FileInfo_SdkV2, bool) { + if o.FileInfos.IsNull() || o.FileInfos.IsUnknown() { + return nil, false + } + var v []FileInfo_SdkV2 + d := o.FileInfos.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFileInfos sets the value of the FileInfos field in ListFilesResponse_SdkV2. +func (o *ListFilesResponse_SdkV2) SetFileInfos(ctx context.Context, v []FileInfo_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["file_infos"] + t = t.(attr.TypeWithElementType).ElementType() + o.FileInfos = types.ListValueMust(t, vs) +} + +// List all listing fulfillments +type ListFulfillmentsRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListFulfillmentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsRequest_SdkV2) { +} + +func (newState *ListFulfillmentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFulfillmentsRequest_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, ListFulfillmentsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFulfillmentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFulfillmentsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListFulfillmentsResponse_SdkV2 struct { + Fulfillments types.List `tfsdk:"fulfillments" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListFulfillmentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFulfillmentsResponse_SdkV2) { +} + +func (newState *ListFulfillmentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFulfillmentsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFulfillmentsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFulfillmentsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "fulfillments": reflect.TypeOf(ListingFulfillment_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, ListFulfillmentsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFulfillmentsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "fulfillments": o.Fulfillments, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFulfillmentsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "fulfillments": basetypes.ListType{ + ElemType: ListingFulfillment{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetFulfillments returns the value of the Fulfillments field in ListFulfillmentsResponse_SdkV2 as +// a slice of ListingFulfillment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListFulfillmentsResponse_SdkV2) GetFulfillments(ctx context.Context) ([]ListingFulfillment_SdkV2, bool) { + if o.Fulfillments.IsNull() || o.Fulfillments.IsUnknown() { + return nil, false + } + var v []ListingFulfillment_SdkV2 + d := o.Fulfillments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFulfillments sets the value of the Fulfillments field in ListFulfillmentsResponse_SdkV2. +func (o *ListFulfillmentsResponse_SdkV2) SetFulfillments(ctx context.Context, v []ListingFulfillment_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["fulfillments"] + t = t.(attr.TypeWithElementType).ElementType() + o.Fulfillments = types.ListValueMust(t, vs) +} + +// List installations for a listing +type ListInstallationsRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsRequest_SdkV2) { +} + +func (newState *ListInstallationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstallationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListInstallationsRequest_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, ListInstallationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstallationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstallationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListInstallationsResponse_SdkV2 struct { + Installations types.List `tfsdk:"installations" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListInstallationsResponse_SdkV2) { +} + +func (newState *ListInstallationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListInstallationsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListInstallationsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListInstallationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "installations": reflect.TypeOf(InstallationDetail_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, ListInstallationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListInstallationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installations": o.Installations, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListInstallationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installations": basetypes.ListType{ + ElemType: InstallationDetail{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetInstallations returns the value of the Installations field in ListInstallationsResponse_SdkV2 as +// a slice of InstallationDetail_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListInstallationsResponse_SdkV2) GetInstallations(ctx context.Context) ([]InstallationDetail_SdkV2, bool) { + if o.Installations.IsNull() || o.Installations.IsUnknown() { + return nil, false + } + var v []InstallationDetail_SdkV2 + d := o.Installations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInstallations sets the value of the Installations field in ListInstallationsResponse_SdkV2. +func (o *ListInstallationsResponse_SdkV2) SetInstallations(ctx context.Context, v []InstallationDetail_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["installations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Installations = types.ListValueMust(t, vs) +} + +// List listings for exchange +type ListListingsForExchangeRequest_SdkV2 struct { + ExchangeId types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListListingsForExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeRequest_SdkV2) { +} + +func (newState *ListListingsForExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListListingsForExchangeRequest_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, ListListingsForExchangeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListListingsForExchangeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListListingsForExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListListingsForExchangeResponse_SdkV2 struct { + ExchangeListings types.List `tfsdk:"exchange_listings" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListListingsForExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsForExchangeResponse_SdkV2) { +} + +func (newState *ListListingsForExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsForExchangeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsForExchangeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListListingsForExchangeResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange_listings": reflect.TypeOf(ExchangeListing_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, ListListingsForExchangeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListListingsForExchangeResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange_listings": o.ExchangeListings, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListListingsForExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange_listings": basetypes.ListType{ + ElemType: ExchangeListing{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetExchangeListings returns the value of the ExchangeListings field in ListListingsForExchangeResponse_SdkV2 as +// a slice of ExchangeListing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsForExchangeResponse_SdkV2) GetExchangeListings(ctx context.Context) ([]ExchangeListing_SdkV2, bool) { + if o.ExchangeListings.IsNull() || o.ExchangeListings.IsUnknown() { + return nil, false + } + var v []ExchangeListing_SdkV2 + d := o.ExchangeListings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExchangeListings sets the value of the ExchangeListings field in ListListingsForExchangeResponse_SdkV2. +func (o *ListListingsForExchangeResponse_SdkV2) SetExchangeListings(ctx context.Context, v []ExchangeListing_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["exchange_listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExchangeListings = types.ListValueMust(t, vs) +} + +// List listings +type ListListingsRequest_SdkV2 struct { + // Matches any of the following asset types + Assets types.List `tfsdk:"-"` + // Matches any of the following categories + Categories types.List `tfsdk:"-"` + // Filters each listing based on if it is free. + IsFree types.Bool `tfsdk:"-"` + // Filters each listing based on if it is a private exchange. + IsPrivateExchange types.Bool `tfsdk:"-"` + // Filters each listing based on whether it is a staff pick. + IsStaffPick types.Bool `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` + // Matches any of the following provider ids + ProviderIds types.List `tfsdk:"-"` + // Matches any of the following tags + Tags types.List `tfsdk:"-"` +} + +func (newState *ListListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsRequest_SdkV2) { +} + +func (newState *ListListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListListingsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assets": reflect.TypeOf(types.String{}), + "categories": reflect.TypeOf(types.String{}), + "provider_ids": reflect.TypeOf(types.String{}), + "tags": reflect.TypeOf(ListingTag_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, ListListingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListListingsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets": o.Assets, + "categories": o.Categories, + "is_free": o.IsFree, + "is_private_exchange": o.IsPrivateExchange, + "is_staff_pick": o.IsStaffPick, + "page_size": o.PageSize, + "page_token": o.PageToken, + "provider_ids": o.ProviderIds, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets": basetypes.ListType{ + ElemType: types.StringType, + }, + "categories": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_free": types.BoolType, + "is_private_exchange": types.BoolType, + "is_staff_pick": types.BoolType, + "page_size": types.Int64Type, + "page_token": types.StringType, + "provider_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "tags": basetypes.ListType{ + ElemType: ListingTag{}.Type(ctx), + }, + }, + } +} + +// GetAssets returns the value of the Assets field in ListListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsRequest_SdkV2) GetAssets(ctx context.Context) ([]types.String, bool) { + if o.Assets.IsNull() || o.Assets.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Assets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssets sets the value of the Assets field in ListListingsRequest_SdkV2. +func (o *ListListingsRequest_SdkV2) SetAssets(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["assets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Assets = types.ListValueMust(t, vs) +} + +// GetCategories returns the value of the Categories field in ListListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsRequest_SdkV2) GetCategories(ctx context.Context) ([]types.String, bool) { + if o.Categories.IsNull() || o.Categories.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Categories.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCategories sets the value of the Categories field in ListListingsRequest_SdkV2. +func (o *ListListingsRequest_SdkV2) SetCategories(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["categories"] + t = t.(attr.TypeWithElementType).ElementType() + o.Categories = types.ListValueMust(t, vs) +} + +// GetProviderIds returns the value of the ProviderIds field in ListListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsRequest_SdkV2) GetProviderIds(ctx context.Context) ([]types.String, bool) { + if o.ProviderIds.IsNull() || o.ProviderIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ProviderIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProviderIds sets the value of the ProviderIds field in ListListingsRequest_SdkV2. +func (o *ListListingsRequest_SdkV2) SetProviderIds(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["provider_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.ProviderIds = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ListListingsRequest_SdkV2 as +// a slice of ListingTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsRequest_SdkV2) GetTags(ctx context.Context) ([]ListingTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ListingTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ListListingsRequest_SdkV2. +func (o *ListListingsRequest_SdkV2) SetTags(ctx context.Context, v []ListingTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ListListingsResponse_SdkV2 struct { + Listings types.List `tfsdk:"listings" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListListingsResponse_SdkV2) { +} + +func (newState *ListListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListListingsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListListingsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListListingsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listings": reflect.TypeOf(Listing_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, ListListingsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListListingsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listings": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetListings returns the value of the Listings field in ListListingsResponse_SdkV2 as +// a slice of Listing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListListingsResponse_SdkV2) GetListings(ctx context.Context) ([]Listing_SdkV2, bool) { + if o.Listings.IsNull() || o.Listings.IsUnknown() { + return nil, false + } + var v []Listing_SdkV2 + d := o.Listings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetListings sets the value of the Listings field in ListListingsResponse_SdkV2. +func (o *ListListingsResponse_SdkV2) SetListings(ctx context.Context, v []Listing_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["listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.Listings = types.ListValueMust(t, vs) +} + +type ListProviderAnalyticsDashboardResponse_SdkV2 struct { + // dashboard_id will be used to open Lakeview dashboard. + DashboardId types.String `tfsdk:"dashboard_id" tf:""` + + Id types.String `tfsdk:"id" tf:""` + + Version types.Int64 `tfsdk:"version" tf:"optional"` +} + +func (newState *ListProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderAnalyticsDashboardResponse_SdkV2) { +} + +func (newState *ListProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProviderAnalyticsDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderAnalyticsDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProviderAnalyticsDashboardResponse_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, ListProviderAnalyticsDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProviderAnalyticsDashboardResponse_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, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProviderAnalyticsDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "id": types.StringType, + "version": types.Int64Type, + }, + } +} + +// List providers +type ListProvidersRequest_SdkV2 struct { + IsFeatured types.Bool `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest_SdkV2) { +} + +func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProvidersRequest_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, ListProvidersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProvidersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_featured": o.IsFeatured, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProvidersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_featured": types.BoolType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListProvidersResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Providers types.List `tfsdk:"providers" tf:"optional"` +} + +func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse_SdkV2) { +} + +func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProvidersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "providers": reflect.TypeOf(ProviderInfo_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, ListProvidersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProvidersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "providers": o.Providers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "providers": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProviders returns the value of the Providers field in ListProvidersResponse_SdkV2 as +// a slice of ProviderInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListProvidersResponse_SdkV2) GetProviders(ctx context.Context) ([]ProviderInfo_SdkV2, bool) { + if o.Providers.IsNull() || o.Providers.IsUnknown() { + return nil, false + } + var v []ProviderInfo_SdkV2 + d := o.Providers.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProviders sets the value of the Providers field in ListProvidersResponse_SdkV2. +func (o *ListProvidersResponse_SdkV2) SetProviders(ctx context.Context, v []ProviderInfo_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["providers"] + t = t.(attr.TypeWithElementType).ElementType() + o.Providers = types.ListValueMust(t, vs) +} + +type Listing_SdkV2 struct { + Detail types.List `tfsdk:"detail" tf:"optional,object"` + + Id types.String `tfsdk:"id" tf:"optional"` + // Next Number: 26 + Summary types.List `tfsdk:"summary" tf:"object"` +} + +func (newState *Listing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Listing_SdkV2) { +} + +func (newState *Listing_SdkV2) SyncEffectiveFieldsDuringRead(existingState Listing_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Listing. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Listing_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "detail": reflect.TypeOf(ListingDetail_SdkV2{}), + "summary": reflect.TypeOf(ListingSummary_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, Listing_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Listing_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "detail": o.Detail, + "id": o.Id, + "summary": o.Summary, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Listing_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "detail": basetypes.ListType{ + ElemType: ListingDetail{}.Type(ctx), + }, + "id": types.StringType, + "summary": basetypes.ListType{ + ElemType: ListingSummary{}.Type(ctx), + }, + }, + } +} + +// GetDetail returns the value of the Detail field in Listing_SdkV2 as +// a ListingDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Listing_SdkV2) GetDetail(ctx context.Context) (ListingDetail_SdkV2, bool) { + var e ListingDetail_SdkV2 + if o.Detail.IsNull() || o.Detail.IsUnknown() { + return e, false + } + var v []ListingDetail_SdkV2 + d := o.Detail.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDetail sets the value of the Detail field in Listing_SdkV2. +func (o *Listing_SdkV2) SetDetail(ctx context.Context, v ListingDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["detail"] + o.Detail = types.ListValueMust(t, vs) +} + +// GetSummary returns the value of the Summary field in Listing_SdkV2 as +// a ListingSummary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Listing_SdkV2) GetSummary(ctx context.Context) (ListingSummary_SdkV2, bool) { + var e ListingSummary_SdkV2 + if o.Summary.IsNull() || o.Summary.IsUnknown() { + return e, false + } + var v []ListingSummary_SdkV2 + d := o.Summary.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSummary sets the value of the Summary field in Listing_SdkV2. +func (o *Listing_SdkV2) SetSummary(ctx context.Context, v ListingSummary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["summary"] + o.Summary = types.ListValueMust(t, vs) +} + +type ListingDetail_SdkV2 struct { + // Type of assets included in the listing. eg. GIT_REPO, DATA_TABLE, MODEL, + // NOTEBOOK + Assets types.List `tfsdk:"assets" tf:"optional"` + // The ending date timestamp for when the data spans + CollectionDateEnd types.Int64 `tfsdk:"collection_date_end" tf:"optional"` + // The starting date timestamp for when the data spans + CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:"optional"` + // Smallest unit of time in the dataset + CollectionGranularity types.List `tfsdk:"collection_granularity" tf:"optional,object"` + // Whether the dataset is free or paid + Cost types.String `tfsdk:"cost" tf:"optional"` + // Where/how the data is sourced + DataSource types.String `tfsdk:"data_source" tf:"optional"` + + Description types.String `tfsdk:"description" tf:"optional"` + + DocumentationLink types.String `tfsdk:"documentation_link" tf:"optional"` + + EmbeddedNotebookFileInfos types.List `tfsdk:"embedded_notebook_file_infos" tf:"optional"` + + FileIds types.List `tfsdk:"file_ids" tf:"optional"` + // Which geo region the listing data is collected from + GeographicalCoverage types.String `tfsdk:"geographical_coverage" tf:"optional"` + // ID 20, 21 removed don't use License of the data asset - Required for + // listings with model based assets + License types.String `tfsdk:"license" tf:"optional"` + // What the pricing model is (e.g. paid, subscription, paid upfront); should + // only be present if cost is paid TODO: Not used yet, should deprecate if + // we will never use it + PricingModel types.String `tfsdk:"pricing_model" tf:"optional"` + + PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:"optional"` + // size of the dataset in GB + Size types.Float64 `tfsdk:"size" tf:"optional"` + + SupportLink types.String `tfsdk:"support_link" tf:"optional"` + // Listing tags - Simple key value pair to annotate listings. When should I + // use tags vs dedicated fields? Using tags avoids the need to add new + // columns in the database for new annotations. However, this should be used + // sparingly since tags are stored as key value pair. Use tags only: 1. If + // the field is optional and won't need to have NOT NULL integrity check 2. + // The value is fairly fixed, static and low cardinality (eg. enums). 3. The + // value won't be used in filters or joins with other tables. + Tags types.List `tfsdk:"tags" tf:"optional"` + + TermsOfService types.String `tfsdk:"terms_of_service" tf:"optional"` + // How often data is updated + UpdateFrequency types.List `tfsdk:"update_frequency" tf:"optional,object"` +} + +func (newState *ListingDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingDetail_SdkV2) { +} + +func (newState *ListingDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingDetail_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingDetail. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListingDetail_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assets": reflect.TypeOf(types.String{}), + "collection_granularity": reflect.TypeOf(DataRefreshInfo_SdkV2{}), + "embedded_notebook_file_infos": reflect.TypeOf(FileInfo_SdkV2{}), + "file_ids": reflect.TypeOf(types.String{}), + "tags": reflect.TypeOf(ListingTag_SdkV2{}), + "update_frequency": reflect.TypeOf(DataRefreshInfo_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, ListingDetail_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListingDetail_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets": o.Assets, + "collection_date_end": o.CollectionDateEnd, + "collection_date_start": o.CollectionDateStart, + "collection_granularity": o.CollectionGranularity, + "cost": o.Cost, + "data_source": o.DataSource, + "description": o.Description, + "documentation_link": o.DocumentationLink, + "embedded_notebook_file_infos": o.EmbeddedNotebookFileInfos, + "file_ids": o.FileIds, + "geographical_coverage": o.GeographicalCoverage, + "license": o.License, + "pricing_model": o.PricingModel, + "privacy_policy_link": o.PrivacyPolicyLink, + "size": o.Size, + "support_link": o.SupportLink, + "tags": o.Tags, + "terms_of_service": o.TermsOfService, + "update_frequency": o.UpdateFrequency, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListingDetail_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets": basetypes.ListType{ + ElemType: types.StringType, + }, + "collection_date_end": types.Int64Type, + "collection_date_start": types.Int64Type, + "collection_granularity": basetypes.ListType{ + ElemType: DataRefreshInfo{}.Type(ctx), + }, + "cost": types.StringType, + "data_source": types.StringType, + "description": types.StringType, + "documentation_link": types.StringType, + "embedded_notebook_file_infos": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + "file_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "geographical_coverage": types.StringType, + "license": types.StringType, + "pricing_model": types.StringType, + "privacy_policy_link": types.StringType, + "size": types.Float64Type, + "support_link": types.StringType, + "tags": basetypes.ListType{ + ElemType: ListingTag{}.Type(ctx), + }, + "terms_of_service": types.StringType, + "update_frequency": basetypes.ListType{ + ElemType: DataRefreshInfo{}.Type(ctx), + }, + }, + } +} + +// GetAssets returns the value of the Assets field in ListingDetail_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetAssets(ctx context.Context) ([]types.String, bool) { + if o.Assets.IsNull() || o.Assets.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Assets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssets sets the value of the Assets field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetAssets(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["assets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Assets = types.ListValueMust(t, vs) +} + +// GetCollectionGranularity returns the value of the CollectionGranularity field in ListingDetail_SdkV2 as +// a DataRefreshInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetCollectionGranularity(ctx context.Context) (DataRefreshInfo_SdkV2, bool) { + var e DataRefreshInfo_SdkV2 + if o.CollectionGranularity.IsNull() || o.CollectionGranularity.IsUnknown() { + return e, false + } + var v []DataRefreshInfo_SdkV2 + d := o.CollectionGranularity.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCollectionGranularity sets the value of the CollectionGranularity field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetCollectionGranularity(ctx context.Context, v DataRefreshInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["collection_granularity"] + o.CollectionGranularity = types.ListValueMust(t, vs) +} + +// GetEmbeddedNotebookFileInfos returns the value of the EmbeddedNotebookFileInfos field in ListingDetail_SdkV2 as +// a slice of FileInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetEmbeddedNotebookFileInfos(ctx context.Context) ([]FileInfo_SdkV2, bool) { + if o.EmbeddedNotebookFileInfos.IsNull() || o.EmbeddedNotebookFileInfos.IsUnknown() { + return nil, false + } + var v []FileInfo_SdkV2 + d := o.EmbeddedNotebookFileInfos.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddedNotebookFileInfos sets the value of the EmbeddedNotebookFileInfos field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetEmbeddedNotebookFileInfos(ctx context.Context, v []FileInfo_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["embedded_notebook_file_infos"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddedNotebookFileInfos = types.ListValueMust(t, vs) +} + +// GetFileIds returns the value of the FileIds field in ListingDetail_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetFileIds(ctx context.Context) ([]types.String, bool) { + if o.FileIds.IsNull() || o.FileIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FileIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFileIds sets the value of the FileIds field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetFileIds(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["file_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.FileIds = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ListingDetail_SdkV2 as +// a slice of ListingTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetTags(ctx context.Context) ([]ListingTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ListingTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetTags(ctx context.Context, v []ListingTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// GetUpdateFrequency returns the value of the UpdateFrequency field in ListingDetail_SdkV2 as +// a DataRefreshInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingDetail_SdkV2) GetUpdateFrequency(ctx context.Context) (DataRefreshInfo_SdkV2, bool) { + var e DataRefreshInfo_SdkV2 + if o.UpdateFrequency.IsNull() || o.UpdateFrequency.IsUnknown() { + return e, false + } + var v []DataRefreshInfo_SdkV2 + d := o.UpdateFrequency.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUpdateFrequency sets the value of the UpdateFrequency field in ListingDetail_SdkV2. +func (o *ListingDetail_SdkV2) SetUpdateFrequency(ctx context.Context, v DataRefreshInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["update_frequency"] + o.UpdateFrequency = types.ListValueMust(t, vs) +} + +type ListingFulfillment_SdkV2 struct { + FulfillmentType types.String `tfsdk:"fulfillment_type" tf:"optional"` + + ListingId types.String `tfsdk:"listing_id" tf:""` + + RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + + RepoInfo types.List `tfsdk:"repo_info" tf:"optional,object"` + + ShareInfo types.List `tfsdk:"share_info" tf:"optional,object"` +} + +func (newState *ListingFulfillment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingFulfillment_SdkV2) { +} + +func (newState *ListingFulfillment_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingFulfillment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingFulfillment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListingFulfillment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "repo_info": reflect.TypeOf(RepoInfo_SdkV2{}), + "share_info": reflect.TypeOf(ShareInfo_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, ListingFulfillment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListingFulfillment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "fulfillment_type": o.FulfillmentType, + "listing_id": o.ListingId, + "recipient_type": o.RecipientType, + "repo_info": o.RepoInfo, + "share_info": o.ShareInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListingFulfillment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "fulfillment_type": types.StringType, + "listing_id": types.StringType, + "recipient_type": types.StringType, + "repo_info": basetypes.ListType{ + ElemType: RepoInfo{}.Type(ctx), + }, + "share_info": basetypes.ListType{ + ElemType: ShareInfo{}.Type(ctx), + }, + }, + } +} + +// GetRepoInfo returns the value of the RepoInfo field in ListingFulfillment_SdkV2 as +// a RepoInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingFulfillment_SdkV2) GetRepoInfo(ctx context.Context) (RepoInfo_SdkV2, bool) { + var e RepoInfo_SdkV2 + if o.RepoInfo.IsNull() || o.RepoInfo.IsUnknown() { + return e, false + } + var v []RepoInfo_SdkV2 + d := o.RepoInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRepoInfo sets the value of the RepoInfo field in ListingFulfillment_SdkV2. +func (o *ListingFulfillment_SdkV2) SetRepoInfo(ctx context.Context, v RepoInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["repo_info"] + o.RepoInfo = types.ListValueMust(t, vs) +} + +// GetShareInfo returns the value of the ShareInfo field in ListingFulfillment_SdkV2 as +// a ShareInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingFulfillment_SdkV2) GetShareInfo(ctx context.Context) (ShareInfo_SdkV2, bool) { + var e ShareInfo_SdkV2 + if o.ShareInfo.IsNull() || o.ShareInfo.IsUnknown() { + return e, false + } + var v []ShareInfo_SdkV2 + d := o.ShareInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetShareInfo sets the value of the ShareInfo field in ListingFulfillment_SdkV2. +func (o *ListingFulfillment_SdkV2) SetShareInfo(ctx context.Context, v ShareInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share_info"] + o.ShareInfo = types.ListValueMust(t, vs) +} + +type ListingSetting_SdkV2 struct { + Visibility types.String `tfsdk:"visibility" tf:"optional"` +} + +func (newState *ListingSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSetting_SdkV2) { +} + +func (newState *ListingSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListingSetting_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, ListingSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListingSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "visibility": o.Visibility, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListingSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "visibility": types.StringType, + }, + } +} + +// Next Number: 26 +type ListingSummary_SdkV2 struct { + Categories types.List `tfsdk:"categories" tf:"optional"` + + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + + CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + + ExchangeIds types.List `tfsdk:"exchange_ids" tf:"optional"` + // if a git repo is being created, a listing will be initialized with this + // field as opposed to a share + GitRepo types.List `tfsdk:"git_repo" tf:"optional,object"` + + ListingType types.String `tfsdk:"listingType" tf:""` + + Name types.String `tfsdk:"name" tf:""` + + ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + + ProviderRegion types.List `tfsdk:"provider_region" tf:"optional,object"` + + PublishedAt types.Int64 `tfsdk:"published_at" tf:"optional"` + + PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + + Setting types.List `tfsdk:"setting" tf:"optional,object"` + + Share types.List `tfsdk:"share" tf:"optional,object"` + // Enums + Status types.String `tfsdk:"status" tf:"optional"` + + Subtitle types.String `tfsdk:"subtitle" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` + + UpdatedById types.Int64 `tfsdk:"updated_by_id" tf:"optional"` +} + +func (newState *ListingSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingSummary_SdkV2) { +} + +func (newState *ListingSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingSummary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingSummary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListingSummary_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "categories": reflect.TypeOf(types.String{}), + "exchange_ids": reflect.TypeOf(types.String{}), + "git_repo": reflect.TypeOf(RepoInfo_SdkV2{}), + "provider_region": reflect.TypeOf(RegionInfo_SdkV2{}), + "setting": reflect.TypeOf(ListingSetting_SdkV2{}), + "share": reflect.TypeOf(ShareInfo_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, ListingSummary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListingSummary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "categories": o.Categories, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "created_by_id": o.CreatedById, + "exchange_ids": o.ExchangeIds, + "git_repo": o.GitRepo, + "listingType": o.ListingType, + "name": o.Name, + "provider_id": o.ProviderId, + "provider_region": o.ProviderRegion, + "published_at": o.PublishedAt, + "published_by": o.PublishedBy, + "setting": o.Setting, + "share": o.Share, + "status": o.Status, + "subtitle": o.Subtitle, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + "updated_by_id": o.UpdatedById, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListingSummary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "categories": basetypes.ListType{ + ElemType: types.StringType, + }, + "created_at": types.Int64Type, + "created_by": types.StringType, + "created_by_id": types.Int64Type, + "exchange_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "git_repo": basetypes.ListType{ + ElemType: RepoInfo{}.Type(ctx), + }, + "listingType": types.StringType, + "name": types.StringType, + "provider_id": types.StringType, + "provider_region": basetypes.ListType{ + ElemType: RegionInfo{}.Type(ctx), + }, + "published_at": types.Int64Type, + "published_by": types.StringType, + "setting": basetypes.ListType{ + ElemType: ListingSetting{}.Type(ctx), + }, + "share": basetypes.ListType{ + ElemType: ShareInfo{}.Type(ctx), + }, + "status": types.StringType, + "subtitle": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "updated_by_id": types.Int64Type, + }, + } +} + +// GetCategories returns the value of the Categories field in ListingSummary_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetCategories(ctx context.Context) ([]types.String, bool) { + if o.Categories.IsNull() || o.Categories.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Categories.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCategories sets the value of the Categories field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetCategories(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["categories"] + t = t.(attr.TypeWithElementType).ElementType() + o.Categories = types.ListValueMust(t, vs) +} + +// GetExchangeIds returns the value of the ExchangeIds field in ListingSummary_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetExchangeIds(ctx context.Context) ([]types.String, bool) { + if o.ExchangeIds.IsNull() || o.ExchangeIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ExchangeIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExchangeIds sets the value of the ExchangeIds field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetExchangeIds(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["exchange_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExchangeIds = types.ListValueMust(t, vs) +} + +// GetGitRepo returns the value of the GitRepo field in ListingSummary_SdkV2 as +// a RepoInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetGitRepo(ctx context.Context) (RepoInfo_SdkV2, bool) { + var e RepoInfo_SdkV2 + if o.GitRepo.IsNull() || o.GitRepo.IsUnknown() { + return e, false + } + var v []RepoInfo_SdkV2 + d := o.GitRepo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGitRepo sets the value of the GitRepo field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetGitRepo(ctx context.Context, v RepoInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_repo"] + o.GitRepo = types.ListValueMust(t, vs) +} + +// GetProviderRegion returns the value of the ProviderRegion field in ListingSummary_SdkV2 as +// a RegionInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetProviderRegion(ctx context.Context) (RegionInfo_SdkV2, bool) { + var e RegionInfo_SdkV2 + if o.ProviderRegion.IsNull() || o.ProviderRegion.IsUnknown() { + return e, false + } + var v []RegionInfo_SdkV2 + d := o.ProviderRegion.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProviderRegion sets the value of the ProviderRegion field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetProviderRegion(ctx context.Context, v RegionInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider_region"] + o.ProviderRegion = types.ListValueMust(t, vs) +} + +// GetSetting returns the value of the Setting field in ListingSummary_SdkV2 as +// a ListingSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetSetting(ctx context.Context) (ListingSetting_SdkV2, bool) { + var e ListingSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []ListingSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetSetting(ctx context.Context, v ListingSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// GetShare returns the value of the Share field in ListingSummary_SdkV2 as +// a ShareInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingSummary_SdkV2) GetShare(ctx context.Context) (ShareInfo_SdkV2, bool) { + var e ShareInfo_SdkV2 + if o.Share.IsNull() || o.Share.IsUnknown() { + return e, false + } + var v []ShareInfo_SdkV2 + d := o.Share.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetShare sets the value of the Share field in ListingSummary_SdkV2. +func (o *ListingSummary_SdkV2) SetShare(ctx context.Context, v ShareInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] + o.Share = types.ListValueMust(t, vs) +} + +type ListingTag_SdkV2 struct { + // Tag name (enum) + TagName types.String `tfsdk:"tag_name" tf:"optional"` + // String representation of the tag value. Values should be string literals + // (no complex types) + TagValues types.List `tfsdk:"tag_values" tf:"optional"` +} + +func (newState *ListingTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingTag_SdkV2) { +} + +func (newState *ListingTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListingTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListingTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListingTag_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tag_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, ListingTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListingTag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "tag_name": o.TagName, + "tag_values": o.TagValues, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListingTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "tag_name": types.StringType, + "tag_values": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetTagValues returns the value of the TagValues field in ListingTag_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListingTag_SdkV2) GetTagValues(ctx context.Context) ([]types.String, bool) { + if o.TagValues.IsNull() || o.TagValues.IsUnknown() { + return nil, false + } + var v []types.String + d := o.TagValues.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTagValues sets the value of the TagValues field in ListingTag_SdkV2. +func (o *ListingTag_SdkV2) SetTagValues(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["tag_values"] + t = t.(attr.TypeWithElementType).ElementType() + o.TagValues = types.ListValueMust(t, vs) +} + +type PersonalizationRequest_SdkV2 struct { + Comment types.String `tfsdk:"comment" tf:"optional"` + + ConsumerRegion types.List `tfsdk:"consumer_region" tf:"object"` + // contact info for the consumer requesting data or performing a listing + // installation + ContactInfo types.List `tfsdk:"contact_info" tf:"optional,object"` + + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + + IntendedUse types.String `tfsdk:"intended_use" tf:"optional"` + + IsFromLighthouse types.Bool `tfsdk:"is_from_lighthouse" tf:"optional"` + + ListingId types.String `tfsdk:"listing_id" tf:"optional"` + + ListingName types.String `tfsdk:"listing_name" tf:"optional"` + + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + + ProviderId types.String `tfsdk:"provider_id" tf:"optional"` + + RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` + + Share types.List `tfsdk:"share" tf:"optional,object"` + + Status types.String `tfsdk:"status" tf:"optional"` + + StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` +} + +func (newState *PersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalizationRequest_SdkV2) { +} + +func (newState *PersonalizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalizationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalizationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PersonalizationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "consumer_region": reflect.TypeOf(RegionInfo_SdkV2{}), + "contact_info": reflect.TypeOf(ContactInfo_SdkV2{}), + "share": reflect.TypeOf(ShareInfo_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, PersonalizationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PersonalizationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "consumer_region": o.ConsumerRegion, + "contact_info": o.ContactInfo, + "created_at": o.CreatedAt, + "id": o.Id, + "intended_use": o.IntendedUse, + "is_from_lighthouse": o.IsFromLighthouse, + "listing_id": o.ListingId, + "listing_name": o.ListingName, + "metastore_id": o.MetastoreId, + "provider_id": o.ProviderId, + "recipient_type": o.RecipientType, + "share": o.Share, + "status": o.Status, + "status_message": o.StatusMessage, + "updated_at": o.UpdatedAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PersonalizationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "consumer_region": basetypes.ListType{ + ElemType: RegionInfo{}.Type(ctx), + }, + "contact_info": basetypes.ListType{ + ElemType: ContactInfo{}.Type(ctx), + }, + "created_at": types.Int64Type, + "id": types.StringType, + "intended_use": types.StringType, + "is_from_lighthouse": types.BoolType, + "listing_id": types.StringType, + "listing_name": types.StringType, + "metastore_id": types.StringType, + "provider_id": types.StringType, + "recipient_type": types.StringType, + "share": basetypes.ListType{ + ElemType: ShareInfo{}.Type(ctx), + }, + "status": types.StringType, + "status_message": types.StringType, + "updated_at": types.Int64Type, + }, + } +} + +// GetConsumerRegion returns the value of the ConsumerRegion field in PersonalizationRequest_SdkV2 as +// a RegionInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PersonalizationRequest_SdkV2) GetConsumerRegion(ctx context.Context) (RegionInfo_SdkV2, bool) { + var e RegionInfo_SdkV2 + if o.ConsumerRegion.IsNull() || o.ConsumerRegion.IsUnknown() { + return e, false + } + var v []RegionInfo_SdkV2 + d := o.ConsumerRegion.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConsumerRegion sets the value of the ConsumerRegion field in PersonalizationRequest_SdkV2. +func (o *PersonalizationRequest_SdkV2) SetConsumerRegion(ctx context.Context, v RegionInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["consumer_region"] + o.ConsumerRegion = types.ListValueMust(t, vs) +} + +// GetContactInfo returns the value of the ContactInfo field in PersonalizationRequest_SdkV2 as +// a ContactInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PersonalizationRequest_SdkV2) GetContactInfo(ctx context.Context) (ContactInfo_SdkV2, bool) { + var e ContactInfo_SdkV2 + if o.ContactInfo.IsNull() || o.ContactInfo.IsUnknown() { + return e, false + } + var v []ContactInfo_SdkV2 + d := o.ContactInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetContactInfo sets the value of the ContactInfo field in PersonalizationRequest_SdkV2. +func (o *PersonalizationRequest_SdkV2) SetContactInfo(ctx context.Context, v ContactInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["contact_info"] + o.ContactInfo = types.ListValueMust(t, vs) +} + +// GetShare returns the value of the Share field in PersonalizationRequest_SdkV2 as +// a ShareInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PersonalizationRequest_SdkV2) GetShare(ctx context.Context) (ShareInfo_SdkV2, bool) { + var e ShareInfo_SdkV2 + if o.Share.IsNull() || o.Share.IsUnknown() { + return e, false + } + var v []ShareInfo_SdkV2 + d := o.Share.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetShare sets the value of the Share field in PersonalizationRequest_SdkV2. +func (o *PersonalizationRequest_SdkV2) SetShare(ctx context.Context, v ShareInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] + o.Share = types.ListValueMust(t, vs) +} + +type ProviderAnalyticsDashboard_SdkV2 struct { + Id types.String `tfsdk:"id" tf:""` +} + +func (newState *ProviderAnalyticsDashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderAnalyticsDashboard_SdkV2) { +} + +func (newState *ProviderAnalyticsDashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderAnalyticsDashboard_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderAnalyticsDashboard. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProviderAnalyticsDashboard_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, ProviderAnalyticsDashboard_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProviderAnalyticsDashboard_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ProviderAnalyticsDashboard_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type ProviderInfo_SdkV2 struct { + BusinessContactEmail types.String `tfsdk:"business_contact_email" tf:""` + + CompanyWebsiteLink types.String `tfsdk:"company_website_link" tf:"optional"` + + DarkModeIconFileId types.String `tfsdk:"dark_mode_icon_file_id" tf:"optional"` + + DarkModeIconFilePath types.String `tfsdk:"dark_mode_icon_file_path" tf:"optional"` + + Description types.String `tfsdk:"description" tf:"optional"` + + IconFileId types.String `tfsdk:"icon_file_id" tf:"optional"` + + IconFilePath types.String `tfsdk:"icon_file_path" tf:"optional"` + + Id types.String `tfsdk:"id" tf:"optional"` + // is_featured is accessible by consumers only + IsFeatured types.Bool `tfsdk:"is_featured" tf:"optional"` + + Name types.String `tfsdk:"name" tf:""` + + PrivacyPolicyLink types.String `tfsdk:"privacy_policy_link" tf:""` + // published_by is only applicable to data aggregators (e.g. Crux) + PublishedBy types.String `tfsdk:"published_by" tf:"optional"` + + SupportContactEmail types.String `tfsdk:"support_contact_email" tf:"optional"` + + TermOfServiceLink types.String `tfsdk:"term_of_service_link" tf:""` +} + +func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderInfo_SdkV2) { +} + +func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProviderInfo_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, ProviderInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProviderInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "business_contact_email": o.BusinessContactEmail, + "company_website_link": o.CompanyWebsiteLink, + "dark_mode_icon_file_id": o.DarkModeIconFileId, + "dark_mode_icon_file_path": o.DarkModeIconFilePath, + "description": o.Description, + "icon_file_id": o.IconFileId, + "icon_file_path": o.IconFilePath, + "id": o.Id, + "is_featured": o.IsFeatured, + "name": o.Name, + "privacy_policy_link": o.PrivacyPolicyLink, + "published_by": o.PublishedBy, + "support_contact_email": o.SupportContactEmail, + "term_of_service_link": o.TermOfServiceLink, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ProviderInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "business_contact_email": types.StringType, + "company_website_link": types.StringType, + "dark_mode_icon_file_id": types.StringType, + "dark_mode_icon_file_path": types.StringType, + "description": types.StringType, + "icon_file_id": types.StringType, + "icon_file_path": types.StringType, + "id": types.StringType, + "is_featured": types.BoolType, + "name": types.StringType, + "privacy_policy_link": types.StringType, + "published_by": types.StringType, + "support_contact_email": types.StringType, + "term_of_service_link": types.StringType, + }, + } +} + +type RegionInfo_SdkV2 struct { + Cloud types.String `tfsdk:"cloud" tf:"optional"` + + Region types.String `tfsdk:"region" tf:"optional"` +} + +func (newState *RegionInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegionInfo_SdkV2) { +} + +func (newState *RegionInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegionInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegionInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegionInfo_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, RegionInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegionInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cloud": o.Cloud, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegionInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cloud": types.StringType, + "region": types.StringType, + }, + } +} + +// Remove an exchange for listing +type RemoveExchangeForListingRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *RemoveExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveExchangeForListingRequest_SdkV2) { +} + +func (newState *RemoveExchangeForListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RemoveExchangeForListingRequest_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, RemoveExchangeForListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RemoveExchangeForListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RemoveExchangeForListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type RemoveExchangeForListingResponse_SdkV2 struct { +} + +func (newState *RemoveExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RemoveExchangeForListingResponse_SdkV2) { +} + +func (newState *RemoveExchangeForListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RemoveExchangeForListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RemoveExchangeForListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RemoveExchangeForListingResponse_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, RemoveExchangeForListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RemoveExchangeForListingResponse_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 RemoveExchangeForListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RepoInfo_SdkV2 struct { + // the git repo url e.g. https://github.com/databrickslabs/dolly.git + GitRepoUrl types.String `tfsdk:"git_repo_url" tf:""` +} + +func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo_SdkV2) { +} + +func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoInfo_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, RepoInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "git_repo_url": o.GitRepoUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "git_repo_url": types.StringType, + }, + } +} + +type RepoInstallation_SdkV2 struct { + // the user-specified repo name for their installed git repo listing + RepoName types.String `tfsdk:"repo_name" tf:""` + // refers to the full url file path that navigates the user to the repo's + // entrypoint (e.g. a README.md file, or the repo file view in the unified + // UI) should just be a relative path + RepoPath types.String `tfsdk:"repo_path" tf:""` +} + +func (newState *RepoInstallation_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInstallation_SdkV2) { +} + +func (newState *RepoInstallation_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInstallation_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInstallation. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoInstallation_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, RepoInstallation_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoInstallation_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repo_name": o.RepoName, + "repo_path": o.RepoPath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoInstallation_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repo_name": types.StringType, + "repo_path": types.StringType, + }, + } +} + +// Search listings +type SearchListingsRequest_SdkV2 struct { + // Matches any of the following asset types + Assets types.List `tfsdk:"-"` + // Matches any of the following categories + Categories types.List `tfsdk:"-"` + + IsFree types.Bool `tfsdk:"-"` + + IsPrivateExchange types.Bool `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` + // Matches any of the following provider ids + ProviderIds types.List `tfsdk:"-"` + // Fuzzy matches query + Query types.String `tfsdk:"-"` +} + +func (newState *SearchListingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsRequest_SdkV2) { +} + +func (newState *SearchListingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchListingsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchListingsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "assets": reflect.TypeOf(types.String{}), + "categories": reflect.TypeOf(types.String{}), + "provider_ids": 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, SearchListingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchListingsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "assets": o.Assets, + "categories": o.Categories, + "is_free": o.IsFree, + "is_private_exchange": o.IsPrivateExchange, + "page_size": o.PageSize, + "page_token": o.PageToken, + "provider_ids": o.ProviderIds, + "query": o.Query, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "assets": basetypes.ListType{ + ElemType: types.StringType, + }, + "categories": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_free": types.BoolType, + "is_private_exchange": types.BoolType, + "page_size": types.Int64Type, + "page_token": types.StringType, + "provider_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "query": types.StringType, + }, + } +} + +// GetAssets returns the value of the Assets field in SearchListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchListingsRequest_SdkV2) GetAssets(ctx context.Context) ([]types.String, bool) { + if o.Assets.IsNull() || o.Assets.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Assets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAssets sets the value of the Assets field in SearchListingsRequest_SdkV2. +func (o *SearchListingsRequest_SdkV2) SetAssets(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["assets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Assets = types.ListValueMust(t, vs) +} + +// GetCategories returns the value of the Categories field in SearchListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchListingsRequest_SdkV2) GetCategories(ctx context.Context) ([]types.String, bool) { + if o.Categories.IsNull() || o.Categories.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Categories.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCategories sets the value of the Categories field in SearchListingsRequest_SdkV2. +func (o *SearchListingsRequest_SdkV2) SetCategories(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["categories"] + t = t.(attr.TypeWithElementType).ElementType() + o.Categories = types.ListValueMust(t, vs) +} + +// GetProviderIds returns the value of the ProviderIds field in SearchListingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchListingsRequest_SdkV2) GetProviderIds(ctx context.Context) ([]types.String, bool) { + if o.ProviderIds.IsNull() || o.ProviderIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ProviderIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProviderIds sets the value of the ProviderIds field in SearchListingsRequest_SdkV2. +func (o *SearchListingsRequest_SdkV2) SetProviderIds(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["provider_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.ProviderIds = types.ListValueMust(t, vs) +} + +type SearchListingsResponse_SdkV2 struct { + Listings types.List `tfsdk:"listings" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *SearchListingsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchListingsResponse_SdkV2) { +} + +func (newState *SearchListingsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchListingsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchListingsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchListingsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listings": reflect.TypeOf(Listing_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, SearchListingsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchListingsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listings": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetListings returns the value of the Listings field in SearchListingsResponse_SdkV2 as +// a slice of Listing_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchListingsResponse_SdkV2) GetListings(ctx context.Context) ([]Listing_SdkV2, bool) { + if o.Listings.IsNull() || o.Listings.IsUnknown() { + return nil, false + } + var v []Listing_SdkV2 + d := o.Listings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetListings sets the value of the Listings field in SearchListingsResponse_SdkV2. +func (o *SearchListingsResponse_SdkV2) SetListings(ctx context.Context, v []Listing_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["listings"] + t = t.(attr.TypeWithElementType).ElementType() + o.Listings = types.ListValueMust(t, vs) +} + +type ShareInfo_SdkV2 struct { + Name types.String `tfsdk:"name" tf:""` + + Type_ types.String `tfsdk:"type" tf:""` +} + +func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareInfo_SdkV2) { +} + +func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ShareInfo_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, ShareInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ShareInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ShareInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "type": types.StringType, + }, + } +} + +type SharedDataObject_SdkV2 struct { + // The type of the data object. Could be one of: TABLE, SCHEMA, + // NOTEBOOK_FILE, MODEL, VOLUME + DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + // Name of the shared object + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject_SdkV2) { +} + +func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharedDataObject_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SharedDataObject_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, SharedDataObject_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SharedDataObject_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_object_type": o.DataObjectType, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SharedDataObject_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_object_type": types.StringType, + "name": types.StringType, + }, + } +} + +type TokenDetail_SdkV2 struct { + BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + + Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + + ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + // These field names must follow the delta sharing protocol. Original + // message: RetrieveToken.Response in + // managed-catalog/api/messages/recipient.proto + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` +} + +func (newState *TokenDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenDetail_SdkV2) { +} + +func (newState *TokenDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenDetail_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenDetail. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenDetail_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, TokenDetail_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenDetail_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bearerToken": o.BearerToken, + "endpoint": o.Endpoint, + "expirationTime": o.ExpirationTime, + "shareCredentialsVersion": o.ShareCredentialsVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenDetail_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bearerToken": types.StringType, + "endpoint": types.StringType, + "expirationTime": types.StringType, + "shareCredentialsVersion": types.Int64Type, + }, + } +} + +type TokenInfo_SdkV2 struct { + // Full activation url to retrieve the access token. It will be empty if the + // token is already retrieved. + ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + // Time at which this Recipient Token was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of Recipient Token creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Expiration timestamp of the token in epoch milliseconds. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + // Unique id of the Recipient Token. + Id types.String `tfsdk:"id" tf:"optional"` + // Time at which this Recipient Token was updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of Recipient Token updater. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo_SdkV2) { +} + +func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenInfo_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, TokenInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "expiration_time": o.ExpirationTime, + "id": o.Id, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activation_url": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "expiration_time": types.Int64Type, + "id": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +type UpdateExchangeFilterRequest_SdkV2 struct { + Filter types.List `tfsdk:"filter" tf:"object"` + + Id types.String `tfsdk:"-"` +} + +func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterRequest_SdkV2) { +} + +func (newState *UpdateExchangeFilterRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExchangeFilterRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filter": reflect.TypeOf(ExchangeFilter_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, UpdateExchangeFilterRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeFilterRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExchangeFilterRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": basetypes.ListType{ + ElemType: ExchangeFilter{}.Type(ctx), + }, + "id": types.StringType, + }, + } +} + +// GetFilter returns the value of the Filter field in UpdateExchangeFilterRequest_SdkV2 as +// a ExchangeFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExchangeFilterRequest_SdkV2) GetFilter(ctx context.Context) (ExchangeFilter_SdkV2, bool) { + var e ExchangeFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []ExchangeFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in UpdateExchangeFilterRequest_SdkV2. +func (o *UpdateExchangeFilterRequest_SdkV2) SetFilter(ctx context.Context, v ExchangeFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type UpdateExchangeFilterResponse_SdkV2 struct { + Filter types.List `tfsdk:"filter" tf:"optional,object"` +} + +func (newState *UpdateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterResponse_SdkV2) { +} + +func (newState *UpdateExchangeFilterResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeFilterResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeFilterResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExchangeFilterResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filter": reflect.TypeOf(ExchangeFilter_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, UpdateExchangeFilterResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeFilterResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExchangeFilterResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": basetypes.ListType{ + ElemType: ExchangeFilter{}.Type(ctx), + }, + }, + } +} + +// GetFilter returns the value of the Filter field in UpdateExchangeFilterResponse_SdkV2 as +// a ExchangeFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExchangeFilterResponse_SdkV2) GetFilter(ctx context.Context) (ExchangeFilter_SdkV2, bool) { + var e ExchangeFilter_SdkV2 + if o.Filter.IsNull() || o.Filter.IsUnknown() { + return e, false + } + var v []ExchangeFilter_SdkV2 + d := o.Filter.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilter sets the value of the Filter field in UpdateExchangeFilterResponse_SdkV2. +func (o *UpdateExchangeFilterResponse_SdkV2) SetFilter(ctx context.Context, v ExchangeFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] + o.Filter = types.ListValueMust(t, vs) +} + +type UpdateExchangeRequest_SdkV2 struct { + Exchange types.List `tfsdk:"exchange" tf:"object"` + + Id types.String `tfsdk:"-"` +} + +func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeRequest_SdkV2) { +} + +func (newState *UpdateExchangeRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExchangeRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange": reflect.TypeOf(Exchange_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, UpdateExchangeRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange": o.Exchange, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange": basetypes.ListType{ + ElemType: Exchange{}.Type(ctx), + }, + "id": types.StringType, + }, + } +} + +// GetExchange returns the value of the Exchange field in UpdateExchangeRequest_SdkV2 as +// a Exchange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExchangeRequest_SdkV2) GetExchange(ctx context.Context) (Exchange_SdkV2, bool) { + var e Exchange_SdkV2 + if o.Exchange.IsNull() || o.Exchange.IsUnknown() { + return e, false + } + var v []Exchange_SdkV2 + d := o.Exchange.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExchange sets the value of the Exchange field in UpdateExchangeRequest_SdkV2. +func (o *UpdateExchangeRequest_SdkV2) SetExchange(ctx context.Context, v Exchange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] + o.Exchange = types.ListValueMust(t, vs) +} + +type UpdateExchangeResponse_SdkV2 struct { + Exchange types.List `tfsdk:"exchange" tf:"optional,object"` +} + +func (newState *UpdateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeResponse_SdkV2) { +} + +func (newState *UpdateExchangeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExchangeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExchangeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExchangeResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exchange": reflect.TypeOf(Exchange_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, UpdateExchangeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exchange": o.Exchange, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exchange": basetypes.ListType{ + ElemType: Exchange{}.Type(ctx), + }, + }, + } +} + +// GetExchange returns the value of the Exchange field in UpdateExchangeResponse_SdkV2 as +// a Exchange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateExchangeResponse_SdkV2) GetExchange(ctx context.Context) (Exchange_SdkV2, bool) { + var e Exchange_SdkV2 + if o.Exchange.IsNull() || o.Exchange.IsUnknown() { + return e, false + } + var v []Exchange_SdkV2 + d := o.Exchange.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExchange sets the value of the Exchange field in UpdateExchangeResponse_SdkV2. +func (o *UpdateExchangeResponse_SdkV2) SetExchange(ctx context.Context, v Exchange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] + o.Exchange = types.ListValueMust(t, vs) +} + +type UpdateInstallationRequest_SdkV2 struct { + Installation types.List `tfsdk:"installation" tf:"object"` + + InstallationId types.String `tfsdk:"-"` + + ListingId types.String `tfsdk:"-"` + + RotateToken types.Bool `tfsdk:"rotate_token" tf:"optional"` +} + +func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationRequest_SdkV2) { +} + +func (newState *UpdateInstallationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateInstallationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "installation": reflect.TypeOf(InstallationDetail_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, UpdateInstallationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateInstallationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installation": o.Installation, + "installation_id": o.InstallationId, + "listing_id": o.ListingId, + "rotate_token": o.RotateToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateInstallationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installation": basetypes.ListType{ + ElemType: InstallationDetail{}.Type(ctx), + }, + "installation_id": types.StringType, + "listing_id": types.StringType, + "rotate_token": types.BoolType, + }, + } +} + +// GetInstallation returns the value of the Installation field in UpdateInstallationRequest_SdkV2 as +// a InstallationDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateInstallationRequest_SdkV2) GetInstallation(ctx context.Context) (InstallationDetail_SdkV2, bool) { + var e InstallationDetail_SdkV2 + if o.Installation.IsNull() || o.Installation.IsUnknown() { + return e, false + } + var v []InstallationDetail_SdkV2 + d := o.Installation.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInstallation sets the value of the Installation field in UpdateInstallationRequest_SdkV2. +func (o *UpdateInstallationRequest_SdkV2) SetInstallation(ctx context.Context, v InstallationDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] + o.Installation = types.ListValueMust(t, vs) +} + +type UpdateInstallationResponse_SdkV2 struct { + Installation types.List `tfsdk:"installation" tf:"optional,object"` +} + +func (newState *UpdateInstallationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationResponse_SdkV2) { +} + +func (newState *UpdateInstallationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInstallationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInstallationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateInstallationResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "installation": reflect.TypeOf(InstallationDetail_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, UpdateInstallationResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateInstallationResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "installation": o.Installation, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateInstallationResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "installation": basetypes.ListType{ + ElemType: InstallationDetail{}.Type(ctx), + }, + }, + } +} + +// GetInstallation returns the value of the Installation field in UpdateInstallationResponse_SdkV2 as +// a InstallationDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateInstallationResponse_SdkV2) GetInstallation(ctx context.Context) (InstallationDetail_SdkV2, bool) { + var e InstallationDetail_SdkV2 + if o.Installation.IsNull() || o.Installation.IsUnknown() { + return e, false + } + var v []InstallationDetail_SdkV2 + d := o.Installation.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInstallation sets the value of the Installation field in UpdateInstallationResponse_SdkV2. +func (o *UpdateInstallationResponse_SdkV2) SetInstallation(ctx context.Context, v InstallationDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] + o.Installation = types.ListValueMust(t, vs) +} + +type UpdateListingRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` + + Listing types.List `tfsdk:"listing" tf:"object"` +} + +func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingRequest_SdkV2) { +} + +func (newState *UpdateListingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateListingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateListingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listing": reflect.TypeOf(Listing_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, UpdateListingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateListingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "listing": o.Listing, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateListingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "listing": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + }, + } +} + +// GetListing returns the value of the Listing field in UpdateListingRequest_SdkV2 as +// a Listing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateListingRequest_SdkV2) GetListing(ctx context.Context) (Listing_SdkV2, bool) { + var e Listing_SdkV2 + if o.Listing.IsNull() || o.Listing.IsUnknown() { + return e, false + } + var v []Listing_SdkV2 + d := o.Listing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetListing sets the value of the Listing field in UpdateListingRequest_SdkV2. +func (o *UpdateListingRequest_SdkV2) SetListing(ctx context.Context, v Listing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] + o.Listing = types.ListValueMust(t, vs) +} + +type UpdateListingResponse_SdkV2 struct { + Listing types.List `tfsdk:"listing" tf:"optional,object"` +} + +func (newState *UpdateListingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingResponse_SdkV2) { +} + +func (newState *UpdateListingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateListingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateListingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateListingResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "listing": reflect.TypeOf(Listing_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, UpdateListingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateListingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing": o.Listing, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateListingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing": basetypes.ListType{ + ElemType: Listing{}.Type(ctx), + }, + }, + } +} + +// GetListing returns the value of the Listing field in UpdateListingResponse_SdkV2 as +// a Listing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateListingResponse_SdkV2) GetListing(ctx context.Context) (Listing_SdkV2, bool) { + var e Listing_SdkV2 + if o.Listing.IsNull() || o.Listing.IsUnknown() { + return e, false + } + var v []Listing_SdkV2 + d := o.Listing.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetListing sets the value of the Listing field in UpdateListingResponse_SdkV2. +func (o *UpdateListingResponse_SdkV2) SetListing(ctx context.Context, v Listing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] + o.Listing = types.ListValueMust(t, vs) +} + +type UpdatePersonalizationRequestRequest_SdkV2 struct { + ListingId types.String `tfsdk:"-"` + + Reason types.String `tfsdk:"reason" tf:"optional"` + + RequestId types.String `tfsdk:"-"` + + Share types.List `tfsdk:"share" tf:"optional,object"` + + Status types.String `tfsdk:"status" tf:""` +} + +func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestRequest_SdkV2) { +} + +func (newState *UpdatePersonalizationRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePersonalizationRequestRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "share": reflect.TypeOf(ShareInfo_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, UpdatePersonalizationRequestRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalizationRequestRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "listing_id": o.ListingId, + "reason": o.Reason, + "request_id": o.RequestId, + "share": o.Share, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdatePersonalizationRequestRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "listing_id": types.StringType, + "reason": types.StringType, + "request_id": types.StringType, + "share": basetypes.ListType{ + ElemType: ShareInfo{}.Type(ctx), + }, + "status": types.StringType, + }, + } +} + +// GetShare returns the value of the Share field in UpdatePersonalizationRequestRequest_SdkV2 as +// a ShareInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdatePersonalizationRequestRequest_SdkV2) GetShare(ctx context.Context) (ShareInfo_SdkV2, bool) { + var e ShareInfo_SdkV2 + if o.Share.IsNull() || o.Share.IsUnknown() { + return e, false + } + var v []ShareInfo_SdkV2 + d := o.Share.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetShare sets the value of the Share field in UpdatePersonalizationRequestRequest_SdkV2. +func (o *UpdatePersonalizationRequestRequest_SdkV2) SetShare(ctx context.Context, v ShareInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] + o.Share = types.ListValueMust(t, vs) +} + +type UpdatePersonalizationRequestResponse_SdkV2 struct { + Request types.List `tfsdk:"request" tf:"optional,object"` +} + +func (newState *UpdatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestResponse_SdkV2) { +} + +func (newState *UpdatePersonalizationRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalizationRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePersonalizationRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePersonalizationRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "request": reflect.TypeOf(PersonalizationRequest_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, UpdatePersonalizationRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalizationRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "request": o.Request, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdatePersonalizationRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "request": basetypes.ListType{ + ElemType: PersonalizationRequest{}.Type(ctx), + }, + }, + } +} + +// GetRequest returns the value of the Request field in UpdatePersonalizationRequestResponse_SdkV2 as +// a PersonalizationRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdatePersonalizationRequestResponse_SdkV2) GetRequest(ctx context.Context) (PersonalizationRequest_SdkV2, bool) { + var e PersonalizationRequest_SdkV2 + if o.Request.IsNull() || o.Request.IsUnknown() { + return e, false + } + var v []PersonalizationRequest_SdkV2 + d := o.Request.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRequest sets the value of the Request field in UpdatePersonalizationRequestResponse_SdkV2. +func (o *UpdatePersonalizationRequestResponse_SdkV2) SetRequest(ctx context.Context, v PersonalizationRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["request"] + o.Request = types.ListValueMust(t, vs) +} + +type UpdateProviderAnalyticsDashboardRequest_SdkV2 struct { + // id is immutable property and can't be updated. + Id types.String `tfsdk:"-"` + // this is the version of the dashboard template we want to update our user + // to current expectation is that it should be equal to latest version of + // the dashboard template + Version types.Int64 `tfsdk:"version" tf:"optional"` +} + +func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardRequest_SdkV2) { +} + +func (newState *UpdateProviderAnalyticsDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateProviderAnalyticsDashboardRequest_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, UpdateProviderAnalyticsDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderAnalyticsDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateProviderAnalyticsDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "version": types.Int64Type, + }, + } +} + +type UpdateProviderAnalyticsDashboardResponse_SdkV2 struct { + // this is newly created Lakeview dashboard for the user + DashboardId types.String `tfsdk:"dashboard_id" tf:""` + // id & version should be the same as the request + Id types.String `tfsdk:"id" tf:""` + + Version types.Int64 `tfsdk:"version" tf:"optional"` +} + +func (newState *UpdateProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderAnalyticsDashboardResponse_SdkV2) { +} + +func (newState *UpdateProviderAnalyticsDashboardResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderAnalyticsDashboardResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderAnalyticsDashboardResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateProviderAnalyticsDashboardResponse_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, UpdateProviderAnalyticsDashboardResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderAnalyticsDashboardResponse_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, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateProviderAnalyticsDashboardResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "id": types.StringType, + "version": types.Int64Type, + }, + } +} + +type UpdateProviderRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` + + Provider types.List `tfsdk:"provider" tf:"object"` +} + +func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderRequest_SdkV2) { +} + +func (newState *UpdateProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateProviderRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "provider": reflect.TypeOf(ProviderInfo_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, UpdateProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "provider": o.Provider, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "provider": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProvider returns the value of the Provider field in UpdateProviderRequest_SdkV2 as +// a ProviderInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateProviderRequest_SdkV2) GetProvider(ctx context.Context) (ProviderInfo_SdkV2, bool) { + var e ProviderInfo_SdkV2 + if o.Provider.IsNull() || o.Provider.IsUnknown() { + return e, false + } + var v []ProviderInfo_SdkV2 + d := o.Provider.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvider sets the value of the Provider field in UpdateProviderRequest_SdkV2. +func (o *UpdateProviderRequest_SdkV2) SetProvider(ctx context.Context, v ProviderInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] + o.Provider = types.ListValueMust(t, vs) +} + +type UpdateProviderResponse_SdkV2 struct { + Provider types.List `tfsdk:"provider" tf:"optional,object"` +} + +func (newState *UpdateProviderResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderResponse_SdkV2) { +} + +func (newState *UpdateProviderResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProviderResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateProviderResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateProviderResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "provider": reflect.TypeOf(ProviderInfo_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, UpdateProviderResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "provider": o.Provider, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "provider": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProvider returns the value of the Provider field in UpdateProviderResponse_SdkV2 as +// a ProviderInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateProviderResponse_SdkV2) GetProvider(ctx context.Context) (ProviderInfo_SdkV2, bool) { + var e ProviderInfo_SdkV2 + if o.Provider.IsNull() || o.Provider.IsUnknown() { + return e, false + } + var v []ProviderInfo_SdkV2 + d := o.Provider.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetProvider sets the value of the Provider field in UpdateProviderResponse_SdkV2. +func (o *UpdateProviderResponse_SdkV2) SetProvider(ctx context.Context, v ProviderInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] + o.Provider = types.ListValueMust(t, vs) +} diff --git a/internal/service/marketplace_tf/model.go b/internal/service/marketplace_tf/model.go index 8d04b4a04..dbd7a512c 100755 --- a/internal/service/marketplace_tf/model.go +++ b/internal/service/marketplace_tf/model.go @@ -67,7 +67,7 @@ func (o AddExchangeForListingRequest) Type(ctx context.Context) attr.Type { } type AddExchangeForListingResponse struct { - ExchangeForListing types.List `tfsdk:"exchange_for_listing" tf:"optional,object"` + ExchangeForListing types.Object `tfsdk:"exchange_for_listing" tf:"optional,object"` } func (newState *AddExchangeForListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan AddExchangeForListingResponse) { @@ -104,9 +104,7 @@ func (o AddExchangeForListingResponse) ToObjectValue(ctx context.Context) basety func (o AddExchangeForListingResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "exchange_for_listing": basetypes.ListType{ - ElemType: ExchangeListing{}.Type(ctx), - }, + "exchange_for_listing": ExchangeListing{}.Type(ctx), }, } } @@ -120,7 +118,10 @@ func (o *AddExchangeForListingResponse) GetExchangeForListing(ctx context.Contex return e, false } var v []ExchangeListing - d := o.ExchangeForListing.ElementsAs(ctx, &v, true) + d := o.ExchangeForListing.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -132,9 +133,8 @@ func (o *AddExchangeForListingResponse) GetExchangeForListing(ctx context.Contex // SetExchangeForListing sets the value of the ExchangeForListing field in AddExchangeForListingResponse. func (o *AddExchangeForListingResponse) SetExchangeForListing(ctx context.Context, v ExchangeListing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange_for_listing"] - o.ExchangeForListing = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExchangeForListing = vs } // Get one batch of listings. One may specify up to 50 IDs per request. @@ -520,7 +520,7 @@ func (o ContactInfo) Type(ctx context.Context) attr.Type { } type CreateExchangeFilterRequest struct { - Filter types.List `tfsdk:"filter" tf:"object"` + Filter types.Object `tfsdk:"filter" tf:"object"` } func (newState *CreateExchangeFilterRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeFilterRequest) { @@ -557,9 +557,7 @@ func (o CreateExchangeFilterRequest) ToObjectValue(ctx context.Context) basetype func (o CreateExchangeFilterRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), - }, + "filter": ExchangeFilter{}.Type(ctx), }, } } @@ -573,7 +571,10 @@ func (o *CreateExchangeFilterRequest) GetFilter(ctx context.Context) (ExchangeFi return e, false } var v []ExchangeFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -585,9 +586,8 @@ func (o *CreateExchangeFilterRequest) GetFilter(ctx context.Context) (ExchangeFi // SetFilter sets the value of the Filter field in CreateExchangeFilterRequest. func (o *CreateExchangeFilterRequest) SetFilter(ctx context.Context, v ExchangeFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type CreateExchangeFilterResponse struct { @@ -632,7 +632,7 @@ func (o CreateExchangeFilterResponse) Type(ctx context.Context) attr.Type { } type CreateExchangeRequest struct { - Exchange types.List `tfsdk:"exchange" tf:"object"` + Exchange types.Object `tfsdk:"exchange" tf:"object"` } func (newState *CreateExchangeRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExchangeRequest) { @@ -669,9 +669,7 @@ func (o CreateExchangeRequest) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateExchangeRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), - }, + "exchange": Exchange{}.Type(ctx), }, } } @@ -685,7 +683,10 @@ func (o *CreateExchangeRequest) GetExchange(ctx context.Context) (Exchange, bool return e, false } var v []Exchange - d := o.Exchange.ElementsAs(ctx, &v, true) + d := o.Exchange.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -697,9 +698,8 @@ func (o *CreateExchangeRequest) GetExchange(ctx context.Context) (Exchange, bool // SetExchange sets the value of the Exchange field in CreateExchangeRequest. func (o *CreateExchangeRequest) SetExchange(ctx context.Context, v Exchange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] - o.Exchange = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Exchange = vs } type CreateExchangeResponse struct { @@ -746,7 +746,7 @@ func (o CreateExchangeResponse) Type(ctx context.Context) attr.Type { type CreateFileRequest struct { DisplayName types.String `tfsdk:"display_name" tf:"optional"` - FileParent types.List `tfsdk:"file_parent" tf:"object"` + FileParent types.Object `tfsdk:"file_parent" tf:"object"` MarketplaceFileType types.String `tfsdk:"marketplace_file_type" tf:""` @@ -790,10 +790,8 @@ func (o CreateFileRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o CreateFileRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "display_name": types.StringType, - "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), - }, + "display_name": types.StringType, + "file_parent": FileParent{}.Type(ctx), "marketplace_file_type": types.StringType, "mime_type": types.StringType, }, @@ -809,7 +807,10 @@ func (o *CreateFileRequest) GetFileParent(ctx context.Context) (FileParent, bool return e, false } var v []FileParent - d := o.FileParent.ElementsAs(ctx, &v, true) + d := o.FileParent.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -821,13 +822,12 @@ func (o *CreateFileRequest) GetFileParent(ctx context.Context) (FileParent, bool // SetFileParent sets the value of the FileParent field in CreateFileRequest. func (o *CreateFileRequest) SetFileParent(ctx context.Context, v FileParent) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] - o.FileParent = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileParent = vs } type CreateFileResponse struct { - FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.Object `tfsdk:"file_info" tf:"optional,object"` // Pre-signed POST URL to blob storage UploadUrl types.String `tfsdk:"upload_url" tf:"optional"` } @@ -867,9 +867,7 @@ func (o CreateFileResponse) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CreateFileResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_info": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), - }, + "file_info": FileInfo{}.Type(ctx), "upload_url": types.StringType, }, } @@ -884,7 +882,10 @@ func (o *CreateFileResponse) GetFileInfo(ctx context.Context) (FileInfo, bool) { return e, false } var v []FileInfo - d := o.FileInfo.ElementsAs(ctx, &v, true) + d := o.FileInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -896,13 +897,12 @@ func (o *CreateFileResponse) GetFileInfo(ctx context.Context) (FileInfo, bool) { // SetFileInfo sets the value of the FileInfo field in CreateFileResponse. func (o *CreateFileResponse) SetFileInfo(ctx context.Context, v FileInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_info"] - o.FileInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileInfo = vs } type CreateInstallationRequest struct { - AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"optional,object"` + AcceptedConsumerTerms types.Object `tfsdk:"accepted_consumer_terms" tf:"optional,object"` CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` @@ -910,7 +910,7 @@ type CreateInstallationRequest struct { RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` // for git repo installations - RepoDetail types.List `tfsdk:"repo_detail" tf:"optional,object"` + RepoDetail types.Object `tfsdk:"repo_detail" tf:"optional,object"` ShareName types.String `tfsdk:"share_name" tf:"optional"` } @@ -955,16 +955,12 @@ func (o CreateInstallationRequest) ToObjectValue(ctx context.Context) basetypes. func (o CreateInstallationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "accepted_consumer_terms": basetypes.ListType{ - ElemType: ConsumerTerms{}.Type(ctx), - }, - "catalog_name": types.StringType, - "listing_id": types.StringType, - "recipient_type": types.StringType, - "repo_detail": basetypes.ListType{ - ElemType: RepoInstallation{}.Type(ctx), - }, - "share_name": types.StringType, + "accepted_consumer_terms": ConsumerTerms{}.Type(ctx), + "catalog_name": types.StringType, + "listing_id": types.StringType, + "recipient_type": types.StringType, + "repo_detail": RepoInstallation{}.Type(ctx), + "share_name": types.StringType, }, } } @@ -978,7 +974,10 @@ func (o *CreateInstallationRequest) GetAcceptedConsumerTerms(ctx context.Context return e, false } var v []ConsumerTerms - d := o.AcceptedConsumerTerms.ElementsAs(ctx, &v, true) + d := o.AcceptedConsumerTerms.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -990,9 +989,8 @@ func (o *CreateInstallationRequest) GetAcceptedConsumerTerms(ctx context.Context // SetAcceptedConsumerTerms sets the value of the AcceptedConsumerTerms field in CreateInstallationRequest. func (o *CreateInstallationRequest) SetAcceptedConsumerTerms(ctx context.Context, v ConsumerTerms) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["accepted_consumer_terms"] - o.AcceptedConsumerTerms = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AcceptedConsumerTerms = vs } // GetRepoDetail returns the value of the RepoDetail field in CreateInstallationRequest as @@ -1004,7 +1002,10 @@ func (o *CreateInstallationRequest) GetRepoDetail(ctx context.Context) (RepoInst return e, false } var v []RepoInstallation - d := o.RepoDetail.ElementsAs(ctx, &v, true) + d := o.RepoDetail.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1016,13 +1017,12 @@ func (o *CreateInstallationRequest) GetRepoDetail(ctx context.Context) (RepoInst // SetRepoDetail sets the value of the RepoDetail field in CreateInstallationRequest. func (o *CreateInstallationRequest) SetRepoDetail(ctx context.Context, v RepoInstallation) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["repo_detail"] - o.RepoDetail = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RepoDetail = vs } type CreateListingRequest struct { - Listing types.List `tfsdk:"listing" tf:"object"` + Listing types.Object `tfsdk:"listing" tf:"object"` } func (newState *CreateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateListingRequest) { @@ -1059,9 +1059,7 @@ func (o CreateListingRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o CreateListingRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), - }, + "listing": Listing{}.Type(ctx), }, } } @@ -1075,7 +1073,10 @@ func (o *CreateListingRequest) GetListing(ctx context.Context) (Listing, bool) { return e, false } var v []Listing - d := o.Listing.ElementsAs(ctx, &v, true) + d := o.Listing.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1087,9 +1088,8 @@ func (o *CreateListingRequest) GetListing(ctx context.Context) (Listing, bool) { // SetListing sets the value of the Listing field in CreateListingRequest. func (o *CreateListingRequest) SetListing(ctx context.Context, v Listing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] - o.Listing = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Listing = vs } type CreateListingResponse struct { @@ -1135,7 +1135,7 @@ func (o CreateListingResponse) Type(ctx context.Context) attr.Type { // Data request messages also creates a lead (maybe) type CreatePersonalizationRequest struct { - AcceptedConsumerTerms types.List `tfsdk:"accepted_consumer_terms" tf:"object"` + AcceptedConsumerTerms types.Object `tfsdk:"accepted_consumer_terms" tf:"object"` Comment types.String `tfsdk:"comment" tf:"optional"` @@ -1196,17 +1196,15 @@ func (o CreatePersonalizationRequest) ToObjectValue(ctx context.Context) basetyp func (o CreatePersonalizationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "accepted_consumer_terms": basetypes.ListType{ - ElemType: ConsumerTerms{}.Type(ctx), - }, - "comment": types.StringType, - "company": types.StringType, - "first_name": types.StringType, - "intended_use": types.StringType, - "is_from_lighthouse": types.BoolType, - "last_name": types.StringType, - "listing_id": types.StringType, - "recipient_type": types.StringType, + "accepted_consumer_terms": ConsumerTerms{}.Type(ctx), + "comment": types.StringType, + "company": types.StringType, + "first_name": types.StringType, + "intended_use": types.StringType, + "is_from_lighthouse": types.BoolType, + "last_name": types.StringType, + "listing_id": types.StringType, + "recipient_type": types.StringType, }, } } @@ -1220,7 +1218,10 @@ func (o *CreatePersonalizationRequest) GetAcceptedConsumerTerms(ctx context.Cont return e, false } var v []ConsumerTerms - d := o.AcceptedConsumerTerms.ElementsAs(ctx, &v, true) + d := o.AcceptedConsumerTerms.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1232,9 +1233,8 @@ func (o *CreatePersonalizationRequest) GetAcceptedConsumerTerms(ctx context.Cont // SetAcceptedConsumerTerms sets the value of the AcceptedConsumerTerms field in CreatePersonalizationRequest. func (o *CreatePersonalizationRequest) SetAcceptedConsumerTerms(ctx context.Context, v ConsumerTerms) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["accepted_consumer_terms"] - o.AcceptedConsumerTerms = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AcceptedConsumerTerms = vs } type CreatePersonalizationRequestResponse struct { @@ -1279,7 +1279,7 @@ func (o CreatePersonalizationRequestResponse) Type(ctx context.Context) attr.Typ } type CreateProviderRequest struct { - Provider types.List `tfsdk:"provider" tf:"object"` + Provider types.Object `tfsdk:"provider" tf:"object"` } func (newState *CreateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProviderRequest) { @@ -1316,9 +1316,7 @@ func (o CreateProviderRequest) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateProviderRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), - }, + "provider": ProviderInfo{}.Type(ctx), }, } } @@ -1332,7 +1330,10 @@ func (o *CreateProviderRequest) GetProvider(ctx context.Context) (ProviderInfo, return e, false } var v []ProviderInfo - d := o.Provider.ElementsAs(ctx, &v, true) + d := o.Provider.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1344,9 +1345,8 @@ func (o *CreateProviderRequest) GetProvider(ctx context.Context) (ProviderInfo, // SetProvider sets the value of the Provider field in CreateProviderRequest. func (o *CreateProviderRequest) SetProvider(ctx context.Context, v ProviderInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] - o.Provider = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Provider = vs } type CreateProviderResponse struct { @@ -2184,7 +2184,7 @@ type FileInfo struct { DownloadLink types.String `tfsdk:"download_link" tf:"optional"` - FileParent types.List `tfsdk:"file_parent" tf:"optional,object"` + FileParent types.Object `tfsdk:"file_parent" tf:"optional,object"` Id types.String `tfsdk:"id" tf:"optional"` @@ -2243,12 +2243,10 @@ func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o FileInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "created_at": types.Int64Type, - "display_name": types.StringType, - "download_link": types.StringType, - "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), - }, + "created_at": types.Int64Type, + "display_name": types.StringType, + "download_link": types.StringType, + "file_parent": FileParent{}.Type(ctx), "id": types.StringType, "marketplace_file_type": types.StringType, "mime_type": types.StringType, @@ -2268,7 +2266,10 @@ func (o *FileInfo) GetFileParent(ctx context.Context) (FileParent, bool) { return e, false } var v []FileParent - d := o.FileParent.ElementsAs(ctx, &v, true) + d := o.FileParent.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2280,9 +2281,8 @@ func (o *FileInfo) GetFileParent(ctx context.Context) (FileParent, bool) { // SetFileParent sets the value of the FileParent field in FileInfo. func (o *FileInfo) SetFileParent(ctx context.Context, v FileParent) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] - o.FileParent = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileParent = vs } type FileParent struct { @@ -2373,7 +2373,7 @@ func (o GetExchangeRequest) Type(ctx context.Context) attr.Type { } type GetExchangeResponse struct { - Exchange types.List `tfsdk:"exchange" tf:"optional,object"` + Exchange types.Object `tfsdk:"exchange" tf:"optional,object"` } func (newState *GetExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExchangeResponse) { @@ -2410,9 +2410,7 @@ func (o GetExchangeResponse) ToObjectValue(ctx context.Context) basetypes.Object func (o GetExchangeResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), - }, + "exchange": Exchange{}.Type(ctx), }, } } @@ -2426,7 +2424,10 @@ func (o *GetExchangeResponse) GetExchange(ctx context.Context) (Exchange, bool) return e, false } var v []Exchange - d := o.Exchange.ElementsAs(ctx, &v, true) + d := o.Exchange.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2438,9 +2439,8 @@ func (o *GetExchangeResponse) GetExchange(ctx context.Context) (Exchange, bool) // SetExchange sets the value of the Exchange field in GetExchangeResponse. func (o *GetExchangeResponse) SetExchange(ctx context.Context, v Exchange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] - o.Exchange = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Exchange = vs } // Get a file @@ -2486,7 +2486,7 @@ func (o GetFileRequest) Type(ctx context.Context) attr.Type { } type GetFileResponse struct { - FileInfo types.List `tfsdk:"file_info" tf:"optional,object"` + FileInfo types.Object `tfsdk:"file_info" tf:"optional,object"` } func (newState *GetFileResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetFileResponse) { @@ -2523,9 +2523,7 @@ func (o GetFileResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o GetFileResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_info": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), - }, + "file_info": FileInfo{}.Type(ctx), }, } } @@ -2539,7 +2537,10 @@ func (o *GetFileResponse) GetFileInfo(ctx context.Context) (FileInfo, bool) { return e, false } var v []FileInfo - d := o.FileInfo.ElementsAs(ctx, &v, true) + d := o.FileInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2551,9 +2552,8 @@ func (o *GetFileResponse) GetFileInfo(ctx context.Context) (FileInfo, bool) { // SetFileInfo sets the value of the FileInfo field in GetFileResponse. func (o *GetFileResponse) SetFileInfo(ctx context.Context, v FileInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_info"] - o.FileInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileInfo = vs } type GetLatestVersionProviderAnalyticsDashboardResponse struct { @@ -2766,7 +2766,7 @@ func (o GetListingRequest) Type(ctx context.Context) attr.Type { } type GetListingResponse struct { - Listing types.List `tfsdk:"listing" tf:"optional,object"` + Listing types.Object `tfsdk:"listing" tf:"optional,object"` } func (newState *GetListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetListingResponse) { @@ -2803,9 +2803,7 @@ func (o GetListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o GetListingResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), - }, + "listing": Listing{}.Type(ctx), }, } } @@ -2819,7 +2817,10 @@ func (o *GetListingResponse) GetListing(ctx context.Context) (Listing, bool) { return e, false } var v []Listing - d := o.Listing.ElementsAs(ctx, &v, true) + d := o.Listing.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2831,9 +2832,8 @@ func (o *GetListingResponse) GetListing(ctx context.Context) (Listing, bool) { // SetListing sets the value of the Listing field in GetListingResponse. func (o *GetListingResponse) SetListing(ctx context.Context, v Listing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] - o.Listing = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Listing = vs } // List listings @@ -3113,7 +3113,7 @@ func (o GetProviderRequest) Type(ctx context.Context) attr.Type { } type GetProviderResponse struct { - Provider types.List `tfsdk:"provider" tf:"optional,object"` + Provider types.Object `tfsdk:"provider" tf:"optional,object"` } func (newState *GetProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderResponse) { @@ -3150,9 +3150,7 @@ func (o GetProviderResponse) ToObjectValue(ctx context.Context) basetypes.Object func (o GetProviderResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), - }, + "provider": ProviderInfo{}.Type(ctx), }, } } @@ -3166,7 +3164,10 @@ func (o *GetProviderResponse) GetProvider(ctx context.Context) (ProviderInfo, bo return e, false } var v []ProviderInfo - d := o.Provider.ElementsAs(ctx, &v, true) + d := o.Provider.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3178,13 +3179,12 @@ func (o *GetProviderResponse) GetProvider(ctx context.Context) (ProviderInfo, bo // SetProvider sets the value of the Provider field in GetProviderResponse. func (o *GetProviderResponse) SetProvider(ctx context.Context, v ProviderInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] - o.Provider = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Provider = vs } type Installation struct { - Installation types.List `tfsdk:"installation" tf:"optional,object"` + Installation types.Object `tfsdk:"installation" tf:"optional,object"` } func (newState *Installation) SyncEffectiveFieldsDuringCreateOrUpdate(plan Installation) { @@ -3221,9 +3221,7 @@ func (o Installation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Installation) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), - }, + "installation": InstallationDetail{}.Type(ctx), }, } } @@ -3237,7 +3235,10 @@ func (o *Installation) GetInstallation(ctx context.Context) (InstallationDetail, return e, false } var v []InstallationDetail - d := o.Installation.ElementsAs(ctx, &v, true) + d := o.Installation.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3249,9 +3250,8 @@ func (o *Installation) GetInstallation(ctx context.Context) (InstallationDetail, // SetInstallation sets the value of the Installation field in Installation. func (o *Installation) SetInstallation(ctx context.Context, v InstallationDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] - o.Installation = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Installation = vs } type InstallationDetail struct { @@ -3277,7 +3277,7 @@ type InstallationDetail struct { Status types.String `tfsdk:"status" tf:"optional"` - TokenDetail types.List `tfsdk:"token_detail" tf:"optional,object"` + TokenDetail types.Object `tfsdk:"token_detail" tf:"optional,object"` Tokens types.List `tfsdk:"tokens" tf:"optional"` } @@ -3340,9 +3340,7 @@ func (o InstallationDetail) Type(ctx context.Context) attr.Type { "repo_path": types.StringType, "share_name": types.StringType, "status": types.StringType, - "token_detail": basetypes.ListType{ - ElemType: TokenDetail{}.Type(ctx), - }, + "token_detail": TokenDetail{}.Type(ctx), "tokens": basetypes.ListType{ ElemType: TokenInfo{}.Type(ctx), }, @@ -3359,7 +3357,10 @@ func (o *InstallationDetail) GetTokenDetail(ctx context.Context) (TokenDetail, b return e, false } var v []TokenDetail - d := o.TokenDetail.ElementsAs(ctx, &v, true) + d := o.TokenDetail.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3371,9 +3372,8 @@ func (o *InstallationDetail) GetTokenDetail(ctx context.Context) (TokenDetail, b // SetTokenDetail sets the value of the TokenDetail field in InstallationDetail. func (o *InstallationDetail) SetTokenDetail(ctx context.Context, v TokenDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_detail"] - o.TokenDetail = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenDetail = vs } // GetTokens returns the value of the Tokens field in InstallationDetail as @@ -4017,7 +4017,7 @@ func (o *ListExchangesResponse) SetExchanges(ctx context.Context, v []Exchange) // List files type ListFilesRequest struct { - FileParent types.List `tfsdk:"-"` + FileParent types.Object `tfsdk:"-"` PageSize types.Int64 `tfsdk:"-"` @@ -4060,11 +4060,9 @@ func (o ListFilesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o ListFilesRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), - }, - "page_size": types.Int64Type, - "page_token": types.StringType, + "file_parent": FileParent{}.Type(ctx), + "page_size": types.Int64Type, + "page_token": types.StringType, }, } } @@ -4078,7 +4076,10 @@ func (o *ListFilesRequest) GetFileParent(ctx context.Context) (FileParent, bool) return e, false } var v []FileParent - d := o.FileParent.ElementsAs(ctx, &v, true) + d := o.FileParent.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4090,9 +4091,8 @@ func (o *ListFilesRequest) GetFileParent(ctx context.Context) (FileParent, bool) // SetFileParent sets the value of the FileParent field in ListFilesRequest. func (o *ListFilesRequest) SetFileParent(ctx context.Context, v FileParent) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file_parent"] - o.FileParent = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FileParent = vs } type ListFilesResponse struct { @@ -4988,11 +4988,11 @@ func (o *ListProvidersResponse) SetProviders(ctx context.Context, v []ProviderIn } type Listing struct { - Detail types.List `tfsdk:"detail" tf:"optional,object"` + Detail types.Object `tfsdk:"detail" tf:"optional,object"` Id types.String `tfsdk:"id" tf:"optional"` // Next Number: 26 - Summary types.List `tfsdk:"summary" tf:"object"` + Summary types.Object `tfsdk:"summary" tf:"object"` } func (newState *Listing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Listing) { @@ -5032,13 +5032,9 @@ func (o Listing) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Listing) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "detail": basetypes.ListType{ - ElemType: ListingDetail{}.Type(ctx), - }, - "id": types.StringType, - "summary": basetypes.ListType{ - ElemType: ListingSummary{}.Type(ctx), - }, + "detail": ListingDetail{}.Type(ctx), + "id": types.StringType, + "summary": ListingSummary{}.Type(ctx), }, } } @@ -5052,7 +5048,10 @@ func (o *Listing) GetDetail(ctx context.Context) (ListingDetail, bool) { return e, false } var v []ListingDetail - d := o.Detail.ElementsAs(ctx, &v, true) + d := o.Detail.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5064,9 +5063,8 @@ func (o *Listing) GetDetail(ctx context.Context) (ListingDetail, bool) { // SetDetail sets the value of the Detail field in Listing. func (o *Listing) SetDetail(ctx context.Context, v ListingDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["detail"] - o.Detail = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Detail = vs } // GetSummary returns the value of the Summary field in Listing as @@ -5078,7 +5076,10 @@ func (o *Listing) GetSummary(ctx context.Context) (ListingSummary, bool) { return e, false } var v []ListingSummary - d := o.Summary.ElementsAs(ctx, &v, true) + d := o.Summary.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5090,9 +5091,8 @@ func (o *Listing) GetSummary(ctx context.Context) (ListingSummary, bool) { // SetSummary sets the value of the Summary field in Listing. func (o *Listing) SetSummary(ctx context.Context, v ListingSummary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["summary"] - o.Summary = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Summary = vs } type ListingDetail struct { @@ -5104,7 +5104,7 @@ type ListingDetail struct { // The starting date timestamp for when the data spans CollectionDateStart types.Int64 `tfsdk:"collection_date_start" tf:"optional"` // Smallest unit of time in the dataset - CollectionGranularity types.List `tfsdk:"collection_granularity" tf:"optional,object"` + CollectionGranularity types.Object `tfsdk:"collection_granularity" tf:"optional,object"` // Whether the dataset is free or paid Cost types.String `tfsdk:"cost" tf:"optional"` // Where/how the data is sourced @@ -5143,7 +5143,7 @@ type ListingDetail struct { TermsOfService types.String `tfsdk:"terms_of_service" tf:"optional"` // How often data is updated - UpdateFrequency types.List `tfsdk:"update_frequency" tf:"optional,object"` + UpdateFrequency types.Object `tfsdk:"update_frequency" tf:"optional,object"` } func (newState *ListingDetail) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingDetail) { @@ -5206,15 +5206,13 @@ func (o ListingDetail) Type(ctx context.Context) attr.Type { "assets": basetypes.ListType{ ElemType: types.StringType, }, - "collection_date_end": types.Int64Type, - "collection_date_start": types.Int64Type, - "collection_granularity": basetypes.ListType{ - ElemType: DataRefreshInfo{}.Type(ctx), - }, - "cost": types.StringType, - "data_source": types.StringType, - "description": types.StringType, - "documentation_link": types.StringType, + "collection_date_end": types.Int64Type, + "collection_date_start": types.Int64Type, + "collection_granularity": DataRefreshInfo{}.Type(ctx), + "cost": types.StringType, + "data_source": types.StringType, + "description": types.StringType, + "documentation_link": types.StringType, "embedded_notebook_file_infos": basetypes.ListType{ ElemType: FileInfo{}.Type(ctx), }, @@ -5231,9 +5229,7 @@ func (o ListingDetail) Type(ctx context.Context) attr.Type { ElemType: ListingTag{}.Type(ctx), }, "terms_of_service": types.StringType, - "update_frequency": basetypes.ListType{ - ElemType: DataRefreshInfo{}.Type(ctx), - }, + "update_frequency": DataRefreshInfo{}.Type(ctx), }, } } @@ -5273,7 +5269,10 @@ func (o *ListingDetail) GetCollectionGranularity(ctx context.Context) (DataRefre return e, false } var v []DataRefreshInfo - d := o.CollectionGranularity.ElementsAs(ctx, &v, true) + d := o.CollectionGranularity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5285,9 +5284,8 @@ func (o *ListingDetail) GetCollectionGranularity(ctx context.Context) (DataRefre // SetCollectionGranularity sets the value of the CollectionGranularity field in ListingDetail. func (o *ListingDetail) SetCollectionGranularity(ctx context.Context, v DataRefreshInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["collection_granularity"] - o.CollectionGranularity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CollectionGranularity = vs } // GetEmbeddedNotebookFileInfos returns the value of the EmbeddedNotebookFileInfos field in ListingDetail as @@ -5377,7 +5375,10 @@ func (o *ListingDetail) GetUpdateFrequency(ctx context.Context) (DataRefreshInfo return e, false } var v []DataRefreshInfo - d := o.UpdateFrequency.ElementsAs(ctx, &v, true) + d := o.UpdateFrequency.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5389,9 +5390,8 @@ func (o *ListingDetail) GetUpdateFrequency(ctx context.Context) (DataRefreshInfo // SetUpdateFrequency sets the value of the UpdateFrequency field in ListingDetail. func (o *ListingDetail) SetUpdateFrequency(ctx context.Context, v DataRefreshInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["update_frequency"] - o.UpdateFrequency = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.UpdateFrequency = vs } type ListingFulfillment struct { @@ -5401,9 +5401,9 @@ type ListingFulfillment struct { RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` - RepoInfo types.List `tfsdk:"repo_info" tf:"optional,object"` + RepoInfo types.Object `tfsdk:"repo_info" tf:"optional,object"` - ShareInfo types.List `tfsdk:"share_info" tf:"optional,object"` + ShareInfo types.Object `tfsdk:"share_info" tf:"optional,object"` } func (newState *ListingFulfillment) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListingFulfillment) { @@ -5448,12 +5448,8 @@ func (o ListingFulfillment) Type(ctx context.Context) attr.Type { "fulfillment_type": types.StringType, "listing_id": types.StringType, "recipient_type": types.StringType, - "repo_info": basetypes.ListType{ - ElemType: RepoInfo{}.Type(ctx), - }, - "share_info": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), - }, + "repo_info": RepoInfo{}.Type(ctx), + "share_info": ShareInfo{}.Type(ctx), }, } } @@ -5467,7 +5463,10 @@ func (o *ListingFulfillment) GetRepoInfo(ctx context.Context) (RepoInfo, bool) { return e, false } var v []RepoInfo - d := o.RepoInfo.ElementsAs(ctx, &v, true) + d := o.RepoInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5479,9 +5478,8 @@ func (o *ListingFulfillment) GetRepoInfo(ctx context.Context) (RepoInfo, bool) { // SetRepoInfo sets the value of the RepoInfo field in ListingFulfillment. func (o *ListingFulfillment) SetRepoInfo(ctx context.Context, v RepoInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["repo_info"] - o.RepoInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RepoInfo = vs } // GetShareInfo returns the value of the ShareInfo field in ListingFulfillment as @@ -5493,7 +5491,10 @@ func (o *ListingFulfillment) GetShareInfo(ctx context.Context) (ShareInfo, bool) return e, false } var v []ShareInfo - d := o.ShareInfo.ElementsAs(ctx, &v, true) + d := o.ShareInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5505,9 +5506,8 @@ func (o *ListingFulfillment) GetShareInfo(ctx context.Context) (ShareInfo, bool) // SetShareInfo sets the value of the ShareInfo field in ListingFulfillment. func (o *ListingFulfillment) SetShareInfo(ctx context.Context, v ShareInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share_info"] - o.ShareInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ShareInfo = vs } type ListingSetting struct { @@ -5564,7 +5564,7 @@ type ListingSummary struct { ExchangeIds types.List `tfsdk:"exchange_ids" tf:"optional"` // if a git repo is being created, a listing will be initialized with this // field as opposed to a share - GitRepo types.List `tfsdk:"git_repo" tf:"optional,object"` + GitRepo types.Object `tfsdk:"git_repo" tf:"optional,object"` ListingType types.String `tfsdk:"listingType" tf:""` @@ -5572,15 +5572,15 @@ type ListingSummary struct { ProviderId types.String `tfsdk:"provider_id" tf:"optional"` - ProviderRegion types.List `tfsdk:"provider_region" tf:"optional,object"` + ProviderRegion types.Object `tfsdk:"provider_region" tf:"optional,object"` PublishedAt types.Int64 `tfsdk:"published_at" tf:"optional"` PublishedBy types.String `tfsdk:"published_by" tf:"optional"` - Setting types.List `tfsdk:"setting" tf:"optional,object"` + Setting types.Object `tfsdk:"setting" tf:"optional,object"` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"optional,object"` // Enums Status types.String `tfsdk:"status" tf:"optional"` @@ -5659,28 +5659,20 @@ func (o ListingSummary) Type(ctx context.Context) attr.Type { "exchange_ids": basetypes.ListType{ ElemType: types.StringType, }, - "git_repo": basetypes.ListType{ - ElemType: RepoInfo{}.Type(ctx), - }, - "listingType": types.StringType, - "name": types.StringType, - "provider_id": types.StringType, - "provider_region": basetypes.ListType{ - ElemType: RegionInfo{}.Type(ctx), - }, - "published_at": types.Int64Type, - "published_by": types.StringType, - "setting": basetypes.ListType{ - ElemType: ListingSetting{}.Type(ctx), - }, - "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), - }, - "status": types.StringType, - "subtitle": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, - "updated_by_id": types.Int64Type, + "git_repo": RepoInfo{}.Type(ctx), + "listingType": types.StringType, + "name": types.StringType, + "provider_id": types.StringType, + "provider_region": RegionInfo{}.Type(ctx), + "published_at": types.Int64Type, + "published_by": types.StringType, + "setting": ListingSetting{}.Type(ctx), + "share": ShareInfo{}.Type(ctx), + "status": types.StringType, + "subtitle": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + "updated_by_id": types.Int64Type, }, } } @@ -5746,7 +5738,10 @@ func (o *ListingSummary) GetGitRepo(ctx context.Context) (RepoInfo, bool) { return e, false } var v []RepoInfo - d := o.GitRepo.ElementsAs(ctx, &v, true) + d := o.GitRepo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5758,9 +5753,8 @@ func (o *ListingSummary) GetGitRepo(ctx context.Context) (RepoInfo, bool) { // SetGitRepo sets the value of the GitRepo field in ListingSummary. func (o *ListingSummary) SetGitRepo(ctx context.Context, v RepoInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["git_repo"] - o.GitRepo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GitRepo = vs } // GetProviderRegion returns the value of the ProviderRegion field in ListingSummary as @@ -5772,7 +5766,10 @@ func (o *ListingSummary) GetProviderRegion(ctx context.Context) (RegionInfo, boo return e, false } var v []RegionInfo - d := o.ProviderRegion.ElementsAs(ctx, &v, true) + d := o.ProviderRegion.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5784,9 +5781,8 @@ func (o *ListingSummary) GetProviderRegion(ctx context.Context) (RegionInfo, boo // SetProviderRegion sets the value of the ProviderRegion field in ListingSummary. func (o *ListingSummary) SetProviderRegion(ctx context.Context, v RegionInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider_region"] - o.ProviderRegion = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ProviderRegion = vs } // GetSetting returns the value of the Setting field in ListingSummary as @@ -5798,7 +5794,10 @@ func (o *ListingSummary) GetSetting(ctx context.Context) (ListingSetting, bool) return e, false } var v []ListingSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5810,9 +5809,8 @@ func (o *ListingSummary) GetSetting(ctx context.Context) (ListingSetting, bool) // SetSetting sets the value of the Setting field in ListingSummary. func (o *ListingSummary) SetSetting(ctx context.Context, v ListingSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // GetShare returns the value of the Share field in ListingSummary as @@ -5824,7 +5822,10 @@ func (o *ListingSummary) GetShare(ctx context.Context) (ShareInfo, bool) { return e, false } var v []ShareInfo - d := o.Share.ElementsAs(ctx, &v, true) + d := o.Share.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5836,9 +5837,8 @@ func (o *ListingSummary) GetShare(ctx context.Context) (ShareInfo, bool) { // SetShare sets the value of the Share field in ListingSummary. func (o *ListingSummary) SetShare(ctx context.Context, v ShareInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] - o.Share = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Share = vs } type ListingTag struct { @@ -5921,10 +5921,10 @@ func (o *ListingTag) SetTagValues(ctx context.Context, v []types.String) { type PersonalizationRequest struct { Comment types.String `tfsdk:"comment" tf:"optional"` - ConsumerRegion types.List `tfsdk:"consumer_region" tf:"object"` + ConsumerRegion types.Object `tfsdk:"consumer_region" tf:"object"` // contact info for the consumer requesting data or performing a listing // installation - ContactInfo types.List `tfsdk:"contact_info" tf:"optional,object"` + ContactInfo types.Object `tfsdk:"contact_info" tf:"optional,object"` CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` @@ -5944,7 +5944,7 @@ type PersonalizationRequest struct { RecipientType types.String `tfsdk:"recipient_type" tf:"optional"` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"optional,object"` Status types.String `tfsdk:"status" tf:"optional"` @@ -6004,13 +6004,9 @@ func (o PersonalizationRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o PersonalizationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": types.StringType, - "consumer_region": basetypes.ListType{ - ElemType: RegionInfo{}.Type(ctx), - }, - "contact_info": basetypes.ListType{ - ElemType: ContactInfo{}.Type(ctx), - }, + "comment": types.StringType, + "consumer_region": RegionInfo{}.Type(ctx), + "contact_info": ContactInfo{}.Type(ctx), "created_at": types.Int64Type, "id": types.StringType, "intended_use": types.StringType, @@ -6020,12 +6016,10 @@ func (o PersonalizationRequest) Type(ctx context.Context) attr.Type { "metastore_id": types.StringType, "provider_id": types.StringType, "recipient_type": types.StringType, - "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), - }, - "status": types.StringType, - "status_message": types.StringType, - "updated_at": types.Int64Type, + "share": ShareInfo{}.Type(ctx), + "status": types.StringType, + "status_message": types.StringType, + "updated_at": types.Int64Type, }, } } @@ -6039,7 +6033,10 @@ func (o *PersonalizationRequest) GetConsumerRegion(ctx context.Context) (RegionI return e, false } var v []RegionInfo - d := o.ConsumerRegion.ElementsAs(ctx, &v, true) + d := o.ConsumerRegion.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6051,9 +6048,8 @@ func (o *PersonalizationRequest) GetConsumerRegion(ctx context.Context) (RegionI // SetConsumerRegion sets the value of the ConsumerRegion field in PersonalizationRequest. func (o *PersonalizationRequest) SetConsumerRegion(ctx context.Context, v RegionInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["consumer_region"] - o.ConsumerRegion = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConsumerRegion = vs } // GetContactInfo returns the value of the ContactInfo field in PersonalizationRequest as @@ -6065,7 +6061,10 @@ func (o *PersonalizationRequest) GetContactInfo(ctx context.Context) (ContactInf return e, false } var v []ContactInfo - d := o.ContactInfo.ElementsAs(ctx, &v, true) + d := o.ContactInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6077,9 +6076,8 @@ func (o *PersonalizationRequest) GetContactInfo(ctx context.Context) (ContactInf // SetContactInfo sets the value of the ContactInfo field in PersonalizationRequest. func (o *PersonalizationRequest) SetContactInfo(ctx context.Context, v ContactInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["contact_info"] - o.ContactInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ContactInfo = vs } // GetShare returns the value of the Share field in PersonalizationRequest as @@ -6091,7 +6089,10 @@ func (o *PersonalizationRequest) GetShare(ctx context.Context) (ShareInfo, bool) return e, false } var v []ShareInfo - d := o.Share.ElementsAs(ctx, &v, true) + d := o.Share.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6103,9 +6104,8 @@ func (o *PersonalizationRequest) GetShare(ctx context.Context) (ShareInfo, bool) // SetShare sets the value of the Share field in PersonalizationRequest. func (o *PersonalizationRequest) SetShare(ctx context.Context, v ShareInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] - o.Share = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Share = vs } type ProviderAnalyticsDashboard struct { @@ -6904,7 +6904,7 @@ func (o TokenInfo) Type(ctx context.Context) attr.Type { } type UpdateExchangeFilterRequest struct { - Filter types.List `tfsdk:"filter" tf:"object"` + Filter types.Object `tfsdk:"filter" tf:"object"` Id types.String `tfsdk:"-"` } @@ -6944,10 +6944,8 @@ func (o UpdateExchangeFilterRequest) ToObjectValue(ctx context.Context) basetype func (o UpdateExchangeFilterRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), - }, - "id": types.StringType, + "filter": ExchangeFilter{}.Type(ctx), + "id": types.StringType, }, } } @@ -6961,7 +6959,10 @@ func (o *UpdateExchangeFilterRequest) GetFilter(ctx context.Context) (ExchangeFi return e, false } var v []ExchangeFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6973,13 +6974,12 @@ func (o *UpdateExchangeFilterRequest) GetFilter(ctx context.Context) (ExchangeFi // SetFilter sets the value of the Filter field in UpdateExchangeFilterRequest. func (o *UpdateExchangeFilterRequest) SetFilter(ctx context.Context, v ExchangeFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type UpdateExchangeFilterResponse struct { - Filter types.List `tfsdk:"filter" tf:"optional,object"` + Filter types.Object `tfsdk:"filter" tf:"optional,object"` } func (newState *UpdateExchangeFilterResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeFilterResponse) { @@ -7016,9 +7016,7 @@ func (o UpdateExchangeFilterResponse) ToObjectValue(ctx context.Context) basetyp func (o UpdateExchangeFilterResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), - }, + "filter": ExchangeFilter{}.Type(ctx), }, } } @@ -7032,7 +7030,10 @@ func (o *UpdateExchangeFilterResponse) GetFilter(ctx context.Context) (ExchangeF return e, false } var v []ExchangeFilter - d := o.Filter.ElementsAs(ctx, &v, true) + d := o.Filter.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7044,13 +7045,12 @@ func (o *UpdateExchangeFilterResponse) GetFilter(ctx context.Context) (ExchangeF // SetFilter sets the value of the Filter field in UpdateExchangeFilterResponse. func (o *UpdateExchangeFilterResponse) SetFilter(ctx context.Context, v ExchangeFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter"] - o.Filter = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filter = vs } type UpdateExchangeRequest struct { - Exchange types.List `tfsdk:"exchange" tf:"object"` + Exchange types.Object `tfsdk:"exchange" tf:"object"` Id types.String `tfsdk:"-"` } @@ -7090,10 +7090,8 @@ func (o UpdateExchangeRequest) ToObjectValue(ctx context.Context) basetypes.Obje func (o UpdateExchangeRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), - }, - "id": types.StringType, + "exchange": Exchange{}.Type(ctx), + "id": types.StringType, }, } } @@ -7107,7 +7105,10 @@ func (o *UpdateExchangeRequest) GetExchange(ctx context.Context) (Exchange, bool return e, false } var v []Exchange - d := o.Exchange.ElementsAs(ctx, &v, true) + d := o.Exchange.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7119,13 +7120,12 @@ func (o *UpdateExchangeRequest) GetExchange(ctx context.Context) (Exchange, bool // SetExchange sets the value of the Exchange field in UpdateExchangeRequest. func (o *UpdateExchangeRequest) SetExchange(ctx context.Context, v Exchange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] - o.Exchange = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Exchange = vs } type UpdateExchangeResponse struct { - Exchange types.List `tfsdk:"exchange" tf:"optional,object"` + Exchange types.Object `tfsdk:"exchange" tf:"optional,object"` } func (newState *UpdateExchangeResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExchangeResponse) { @@ -7162,9 +7162,7 @@ func (o UpdateExchangeResponse) ToObjectValue(ctx context.Context) basetypes.Obj func (o UpdateExchangeResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), - }, + "exchange": Exchange{}.Type(ctx), }, } } @@ -7178,7 +7176,10 @@ func (o *UpdateExchangeResponse) GetExchange(ctx context.Context) (Exchange, boo return e, false } var v []Exchange - d := o.Exchange.ElementsAs(ctx, &v, true) + d := o.Exchange.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7190,13 +7191,12 @@ func (o *UpdateExchangeResponse) GetExchange(ctx context.Context) (Exchange, boo // SetExchange sets the value of the Exchange field in UpdateExchangeResponse. func (o *UpdateExchangeResponse) SetExchange(ctx context.Context, v Exchange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["exchange"] - o.Exchange = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Exchange = vs } type UpdateInstallationRequest struct { - Installation types.List `tfsdk:"installation" tf:"object"` + Installation types.Object `tfsdk:"installation" tf:"object"` InstallationId types.String `tfsdk:"-"` @@ -7242,9 +7242,7 @@ func (o UpdateInstallationRequest) ToObjectValue(ctx context.Context) basetypes. func (o UpdateInstallationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), - }, + "installation": InstallationDetail{}.Type(ctx), "installation_id": types.StringType, "listing_id": types.StringType, "rotate_token": types.BoolType, @@ -7261,7 +7259,10 @@ func (o *UpdateInstallationRequest) GetInstallation(ctx context.Context) (Instal return e, false } var v []InstallationDetail - d := o.Installation.ElementsAs(ctx, &v, true) + d := o.Installation.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7273,13 +7274,12 @@ func (o *UpdateInstallationRequest) GetInstallation(ctx context.Context) (Instal // SetInstallation sets the value of the Installation field in UpdateInstallationRequest. func (o *UpdateInstallationRequest) SetInstallation(ctx context.Context, v InstallationDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] - o.Installation = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Installation = vs } type UpdateInstallationResponse struct { - Installation types.List `tfsdk:"installation" tf:"optional,object"` + Installation types.Object `tfsdk:"installation" tf:"optional,object"` } func (newState *UpdateInstallationResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInstallationResponse) { @@ -7316,9 +7316,7 @@ func (o UpdateInstallationResponse) ToObjectValue(ctx context.Context) basetypes func (o UpdateInstallationResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), - }, + "installation": InstallationDetail{}.Type(ctx), }, } } @@ -7332,7 +7330,10 @@ func (o *UpdateInstallationResponse) GetInstallation(ctx context.Context) (Insta return e, false } var v []InstallationDetail - d := o.Installation.ElementsAs(ctx, &v, true) + d := o.Installation.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7344,15 +7345,14 @@ func (o *UpdateInstallationResponse) GetInstallation(ctx context.Context) (Insta // SetInstallation sets the value of the Installation field in UpdateInstallationResponse. func (o *UpdateInstallationResponse) SetInstallation(ctx context.Context, v InstallationDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["installation"] - o.Installation = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Installation = vs } type UpdateListingRequest struct { Id types.String `tfsdk:"-"` - Listing types.List `tfsdk:"listing" tf:"object"` + Listing types.Object `tfsdk:"listing" tf:"object"` } func (newState *UpdateListingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingRequest) { @@ -7390,10 +7390,8 @@ func (o UpdateListingRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o UpdateListingRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), - }, + "id": types.StringType, + "listing": Listing{}.Type(ctx), }, } } @@ -7407,7 +7405,10 @@ func (o *UpdateListingRequest) GetListing(ctx context.Context) (Listing, bool) { return e, false } var v []Listing - d := o.Listing.ElementsAs(ctx, &v, true) + d := o.Listing.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7419,13 +7420,12 @@ func (o *UpdateListingRequest) GetListing(ctx context.Context) (Listing, bool) { // SetListing sets the value of the Listing field in UpdateListingRequest. func (o *UpdateListingRequest) SetListing(ctx context.Context, v Listing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] - o.Listing = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Listing = vs } type UpdateListingResponse struct { - Listing types.List `tfsdk:"listing" tf:"optional,object"` + Listing types.Object `tfsdk:"listing" tf:"optional,object"` } func (newState *UpdateListingResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateListingResponse) { @@ -7462,9 +7462,7 @@ func (o UpdateListingResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o UpdateListingResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), - }, + "listing": Listing{}.Type(ctx), }, } } @@ -7478,7 +7476,10 @@ func (o *UpdateListingResponse) GetListing(ctx context.Context) (Listing, bool) return e, false } var v []Listing - d := o.Listing.ElementsAs(ctx, &v, true) + d := o.Listing.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7490,9 +7491,8 @@ func (o *UpdateListingResponse) GetListing(ctx context.Context) (Listing, bool) // SetListing sets the value of the Listing field in UpdateListingResponse. func (o *UpdateListingResponse) SetListing(ctx context.Context, v Listing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["listing"] - o.Listing = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Listing = vs } type UpdatePersonalizationRequestRequest struct { @@ -7502,7 +7502,7 @@ type UpdatePersonalizationRequestRequest struct { RequestId types.String `tfsdk:"-"` - Share types.List `tfsdk:"share" tf:"optional,object"` + Share types.Object `tfsdk:"share" tf:"optional,object"` Status types.String `tfsdk:"status" tf:""` } @@ -7548,10 +7548,8 @@ func (o UpdatePersonalizationRequestRequest) Type(ctx context.Context) attr.Type "listing_id": types.StringType, "reason": types.StringType, "request_id": types.StringType, - "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), - }, - "status": types.StringType, + "share": ShareInfo{}.Type(ctx), + "status": types.StringType, }, } } @@ -7565,7 +7563,10 @@ func (o *UpdatePersonalizationRequestRequest) GetShare(ctx context.Context) (Sha return e, false } var v []ShareInfo - d := o.Share.ElementsAs(ctx, &v, true) + d := o.Share.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7577,13 +7578,12 @@ func (o *UpdatePersonalizationRequestRequest) GetShare(ctx context.Context) (Sha // SetShare sets the value of the Share field in UpdatePersonalizationRequestRequest. func (o *UpdatePersonalizationRequestRequest) SetShare(ctx context.Context, v ShareInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["share"] - o.Share = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Share = vs } type UpdatePersonalizationRequestResponse struct { - Request types.List `tfsdk:"request" tf:"optional,object"` + Request types.Object `tfsdk:"request" tf:"optional,object"` } func (newState *UpdatePersonalizationRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalizationRequestResponse) { @@ -7620,9 +7620,7 @@ func (o UpdatePersonalizationRequestResponse) ToObjectValue(ctx context.Context) func (o UpdatePersonalizationRequestResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "request": basetypes.ListType{ - ElemType: PersonalizationRequest{}.Type(ctx), - }, + "request": PersonalizationRequest{}.Type(ctx), }, } } @@ -7636,7 +7634,10 @@ func (o *UpdatePersonalizationRequestResponse) GetRequest(ctx context.Context) ( return e, false } var v []PersonalizationRequest - d := o.Request.ElementsAs(ctx, &v, true) + d := o.Request.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7648,9 +7649,8 @@ func (o *UpdatePersonalizationRequestResponse) GetRequest(ctx context.Context) ( // SetRequest sets the value of the Request field in UpdatePersonalizationRequestResponse. func (o *UpdatePersonalizationRequestResponse) SetRequest(ctx context.Context, v PersonalizationRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["request"] - o.Request = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Request = vs } type UpdateProviderAnalyticsDashboardRequest struct { @@ -7754,7 +7754,7 @@ func (o UpdateProviderAnalyticsDashboardResponse) Type(ctx context.Context) attr type UpdateProviderRequest struct { Id types.String `tfsdk:"-"` - Provider types.List `tfsdk:"provider" tf:"object"` + Provider types.Object `tfsdk:"provider" tf:"object"` } func (newState *UpdateProviderRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderRequest) { @@ -7792,10 +7792,8 @@ func (o UpdateProviderRequest) ToObjectValue(ctx context.Context) basetypes.Obje func (o UpdateProviderRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), - }, + "id": types.StringType, + "provider": ProviderInfo{}.Type(ctx), }, } } @@ -7809,7 +7807,10 @@ func (o *UpdateProviderRequest) GetProvider(ctx context.Context) (ProviderInfo, return e, false } var v []ProviderInfo - d := o.Provider.ElementsAs(ctx, &v, true) + d := o.Provider.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7821,13 +7822,12 @@ func (o *UpdateProviderRequest) GetProvider(ctx context.Context) (ProviderInfo, // SetProvider sets the value of the Provider field in UpdateProviderRequest. func (o *UpdateProviderRequest) SetProvider(ctx context.Context, v ProviderInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] - o.Provider = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Provider = vs } type UpdateProviderResponse struct { - Provider types.List `tfsdk:"provider" tf:"optional,object"` + Provider types.Object `tfsdk:"provider" tf:"optional,object"` } func (newState *UpdateProviderResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProviderResponse) { @@ -7864,9 +7864,7 @@ func (o UpdateProviderResponse) ToObjectValue(ctx context.Context) basetypes.Obj func (o UpdateProviderResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), - }, + "provider": ProviderInfo{}.Type(ctx), }, } } @@ -7880,7 +7878,10 @@ func (o *UpdateProviderResponse) GetProvider(ctx context.Context) (ProviderInfo, return e, false } var v []ProviderInfo - d := o.Provider.ElementsAs(ctx, &v, true) + d := o.Provider.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7892,7 +7893,6 @@ func (o *UpdateProviderResponse) GetProvider(ctx context.Context) (ProviderInfo, // SetProvider sets the value of the Provider field in UpdateProviderResponse. func (o *UpdateProviderResponse) SetProvider(ctx context.Context, v ProviderInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["provider"] - o.Provider = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Provider = vs } diff --git a/internal/service/ml_tf/legacy_model.go b/internal/service/ml_tf/legacy_model.go new file mode 100755 index 000000000..595442009 --- /dev/null +++ b/internal/service/ml_tf/legacy_model.go @@ -0,0 +1,10435 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package ml_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +// Activity recorded for the action. +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" tf:"optional"` + // User-provided comment associated with the activity. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Source stage of the transition (if the activity is stage transition + // related). Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + FromStage types.String `tfsdk:"from_stage" tf:"optional"` + // Unique identifier for the object. + Id types.String `tfsdk:"id" tf:"optional"` + // Time of the object at last update, as a Unix timestamp in milliseconds. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Comment made by system, for example explaining an activity of type + // `SYSTEM_TRANSITION`. It usually describes a side effect, such as a + // version being archived as part of another version's stage transition, and + // may not be returned for some activity types. + SystemComment types.String `tfsdk:"system_comment" tf:"optional"` + // Target stage of the transition (if the activity is stage transition + // related). Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + ToStage types.String `tfsdk:"to_stage" tf:"optional"` + // The username of the user that created the object. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *Activity_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Activity_SdkV2) { +} + +func (newState *Activity_SdkV2) SyncEffectiveFieldsDuringRead(existingState Activity_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Activity. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Activity_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, Activity_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Activity_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activity_type": o.ActivityType, + "comment": o.Comment, + "creation_timestamp": o.CreationTimestamp, + "from_stage": o.FromStage, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "system_comment": o.SystemComment, + "to_stage": o.ToStage, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Activity_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activity_type": types.StringType, + "comment": types.StringType, + "creation_timestamp": types.Int64Type, + "from_stage": types.StringType, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "system_comment": types.StringType, + "to_stage": types.StringType, + "user_id": types.StringType, + }, + } +} + +type ApproveTransitionRequest_SdkV2 struct { + // Specifies whether to archive all current model versions in the target + // stage. + ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:""` + // Target stage of the transition. Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + Stage types.String `tfsdk:"stage" tf:""` + // Version of the model. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequest_SdkV2) { +} + +func (newState *ApproveTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ApproveTransitionRequest_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, ApproveTransitionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ApproveTransitionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "archive_existing_versions": o.ArchiveExistingVersions, + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ApproveTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "archive_existing_versions": types.BoolType, + "comment": types.StringType, + "name": types.StringType, + "stage": types.StringType, + "version": types.StringType, + }, + } +} + +type ApproveTransitionRequestResponse_SdkV2 struct { + // Activity recorded for the action. + Activity types.List `tfsdk:"activity" tf:"optional,object"` +} + +func (newState *ApproveTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequestResponse_SdkV2) { +} + +func (newState *ApproveTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ApproveTransitionRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ApproveTransitionRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ApproveTransitionRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, ApproveTransitionRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ApproveTransitionRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activity": o.Activity, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ApproveTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activity": basetypes.ListType{ + ElemType: Activity{}.Type(ctx), + }, + }, + } +} + +// GetActivity returns the value of the Activity field in ApproveTransitionRequestResponse_SdkV2 as +// a Activity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ApproveTransitionRequestResponse_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 ApproveTransitionRequestResponse_SdkV2. +func (o *ApproveTransitionRequestResponse_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) +} + +// Comment details. +type CommentObject_SdkV2 struct { + // Array of actions on the activity allowed for the current viewer. + AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Comment ID + Id types.String `tfsdk:"id" tf:"optional"` + // Time of the object at last update, as a Unix timestamp in milliseconds. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // The username of the user that created the object. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *CommentObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CommentObject_SdkV2) { +} + +func (newState *CommentObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState CommentObject_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CommentObject. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CommentObject_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "available_actions": 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, CommentObject_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CommentObject_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "available_actions": o.AvailableActions, + "comment": o.Comment, + "creation_timestamp": o.CreationTimestamp, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CommentObject_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "available_actions": basetypes.ListType{ + ElemType: types.StringType, + }, + "comment": types.StringType, + "creation_timestamp": types.Int64Type, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "user_id": types.StringType, + }, + } +} + +// GetAvailableActions returns the value of the AvailableActions field in CommentObject_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CommentObject_SdkV2) GetAvailableActions(ctx context.Context) ([]types.String, bool) { + if o.AvailableActions.IsNull() || o.AvailableActions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AvailableActions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAvailableActions sets the value of the AvailableActions field in CommentObject_SdkV2. +func (o *CommentObject_SdkV2) SetAvailableActions(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["available_actions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AvailableActions = types.ListValueMust(t, vs) +} + +type CreateComment_SdkV2 struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:""` + // Name of the model. + Name types.String `tfsdk:"name" tf:""` + // Version of the model. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateComment_SdkV2) { +} + +func (newState *CreateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateComment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateComment_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, CreateComment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateComment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateComment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type CreateCommentResponse_SdkV2 struct { + // Comment details. + Comment types.List `tfsdk:"comment" tf:"optional,object"` +} + +func (newState *CreateCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCommentResponse_SdkV2) { +} + +func (newState *CreateCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCommentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCommentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCommentResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "comment": reflect.TypeOf(CommentObject_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, CreateCommentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCommentResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCommentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": basetypes.ListType{ + ElemType: CommentObject{}.Type(ctx), + }, + }, + } +} + +// GetComment returns the value of the Comment field in CreateCommentResponse_SdkV2 as +// a CommentObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCommentResponse_SdkV2) GetComment(ctx context.Context) (CommentObject_SdkV2, bool) { + var e CommentObject_SdkV2 + if o.Comment.IsNull() || o.Comment.IsUnknown() { + return e, false + } + var v []CommentObject_SdkV2 + d := o.Comment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetComment sets the value of the Comment field in CreateCommentResponse_SdkV2. +func (o *CreateCommentResponse_SdkV2) SetComment(ctx context.Context, v CommentObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["comment"] + o.Comment = types.ListValueMust(t, vs) +} + +type CreateExperiment_SdkV2 struct { + // Location where all artifacts for the experiment are stored. If not + // provided, the remote server will select an appropriate default. + ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + // Experiment name. + Name types.String `tfsdk:"name" tf:""` + // A collection of tags to set on the experiment. Maximum tag size and + // number of tags per request depends on the storage backend. All storage + // backends are guaranteed to support tag keys up to 250 bytes in size and + // tag values up to 5000 bytes in size. All storage backends are also + // guaranteed to support up to 20 tags per request. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperiment_SdkV2) { +} + +func (newState *CreateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExperiment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExperiment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ExperimentTag_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, CreateExperiment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExperiment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_location": o.ArtifactLocation, + "name": o.Name, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExperiment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_location": types.StringType, + "name": types.StringType, + "tags": basetypes.ListType{ + ElemType: ExperimentTag{}.Type(ctx), + }, + }, + } +} + +// GetTags returns the value of the Tags field in CreateExperiment_SdkV2 as +// a slice of ExperimentTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateExperiment_SdkV2) GetTags(ctx context.Context) ([]ExperimentTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ExperimentTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateExperiment_SdkV2. +func (o *CreateExperiment_SdkV2) SetTags(ctx context.Context, v []ExperimentTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type CreateExperimentResponse_SdkV2 struct { + // Unique identifier for the experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` +} + +func (newState *CreateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateExperimentResponse_SdkV2) { +} + +func (newState *CreateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateExperimentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateExperimentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateExperimentResponse_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, CreateExperimentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateExperimentResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +type CreateModelRequest_SdkV2 struct { + // Optional description for registered model. + Description types.String `tfsdk:"description" tf:"optional"` + // Register models under this name + Name types.String `tfsdk:"name" tf:""` + // Additional metadata for registered model. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelRequest_SdkV2) { +} + +func (newState *CreateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateModelRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ModelTag_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, CreateModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "name": types.StringType, + "tags": basetypes.ListType{ + ElemType: ModelTag{}.Type(ctx), + }, + }, + } +} + +// GetTags returns the value of the Tags field in CreateModelRequest_SdkV2 as +// a slice of ModelTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateModelRequest_SdkV2) GetTags(ctx context.Context) ([]ModelTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateModelRequest_SdkV2. +func (o *CreateModelRequest_SdkV2) SetTags(ctx context.Context, v []ModelTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type CreateModelResponse_SdkV2 struct { + RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` +} + +func (newState *CreateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelResponse_SdkV2) { +} + +func (newState *CreateModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, CreateModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "registered_model": basetypes.ListType{ + ElemType: Model{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModel returns the value of the RegisteredModel field in CreateModelResponse_SdkV2 as +// a Model_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateModelResponse_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 CreateModelResponse_SdkV2. +func (o *CreateModelResponse_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 CreateModelVersionRequest_SdkV2 struct { + // Optional description for model version. + Description types.String `tfsdk:"description" tf:"optional"` + // Register model under this name + Name types.String `tfsdk:"name" tf:""` + // MLflow run ID for correlation, if `source` was generated by an experiment + // run in MLflow tracking server + RunId types.String `tfsdk:"run_id" tf:"optional"` + // MLflow run link - this is the exact link of the run that generated this + // model version, potentially hosted at another instance of MLflow. + RunLink types.String `tfsdk:"run_link" tf:"optional"` + // URI indicating the location of the model artifacts. + Source types.String `tfsdk:"source" tf:""` + // Additional metadata for model version. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionRequest_SdkV2) { +} + +func (newState *CreateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateModelVersionRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ModelVersionTag_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, CreateModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateModelVersionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "run_id": o.RunId, + "run_link": o.RunLink, + "source": o.Source, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "name": types.StringType, + "run_id": types.StringType, + "run_link": types.StringType, + "source": types.StringType, + "tags": basetypes.ListType{ + ElemType: ModelVersionTag{}.Type(ctx), + }, + }, + } +} + +// GetTags returns the value of the Tags field in CreateModelVersionRequest_SdkV2 as +// a slice of ModelVersionTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateModelVersionRequest_SdkV2) GetTags(ctx context.Context) ([]ModelVersionTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelVersionTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateModelVersionRequest_SdkV2. +func (o *CreateModelVersionRequest_SdkV2) SetTags(ctx context.Context, v []ModelVersionTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type CreateModelVersionResponse_SdkV2 struct { + // Return new version number generated for this model in registry. + ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` +} + +func (newState *CreateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionResponse_SdkV2) { +} + +func (newState *CreateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateModelVersionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateModelVersionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateModelVersionResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, CreateModelVersionResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateModelVersionResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_version": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + }, + } +} + +// GetModelVersion returns the value of the ModelVersion field in CreateModelVersionResponse_SdkV2 as +// a ModelVersion_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateModelVersionResponse_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 CreateModelVersionResponse_SdkV2. +func (o *CreateModelVersionResponse_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 CreateRegistryWebhook_SdkV2 struct { + // User-specified description for the webhook. + Description types.String `tfsdk:"description" tf:"optional"` + // Events that can trigger a registry 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. + Events types.List `tfsdk:"events" tf:""` + + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + + JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + // Name of the model whose events would trigger this webhook. + ModelName types.String `tfsdk:"model_name" tf:"optional"` + // 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" tf:"optional"` +} + +func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRegistryWebhook_SdkV2) { +} + +func (newState *CreateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRegistryWebhook_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRegistryWebhook_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": reflect.TypeOf(types.String{}), + "http_url_spec": reflect.TypeOf(HttpUrlSpec_SdkV2{}), + "job_spec": reflect.TypeOf(JobSpec_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, CreateRegistryWebhook_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRegistryWebhook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "events": o.Events, + "http_url_spec": o.HttpUrlSpec, + "job_spec": o.JobSpec, + "model_name": o.ModelName, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "events": basetypes.ListType{ + ElemType: types.StringType, + }, + "http_url_spec": basetypes.ListType{ + ElemType: HttpUrlSpec{}.Type(ctx), + }, + "job_spec": basetypes.ListType{ + ElemType: JobSpec{}.Type(ctx), + }, + "model_name": types.StringType, + "status": types.StringType, + }, + } +} + +// GetEvents returns the value of the Events field in CreateRegistryWebhook_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRegistryWebhook_SdkV2) GetEvents(ctx context.Context) ([]types.String, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in CreateRegistryWebhook_SdkV2. +func (o *CreateRegistryWebhook_SdkV2) SetEvents(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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +// GetHttpUrlSpec returns the value of the HttpUrlSpec field in CreateRegistryWebhook_SdkV2 as +// a HttpUrlSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRegistryWebhook_SdkV2) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec_SdkV2, bool) { + var e HttpUrlSpec_SdkV2 + if o.HttpUrlSpec.IsNull() || o.HttpUrlSpec.IsUnknown() { + return e, false + } + var v []HttpUrlSpec_SdkV2 + d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHttpUrlSpec sets the value of the HttpUrlSpec field in CreateRegistryWebhook_SdkV2. +func (o *CreateRegistryWebhook_SdkV2) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] + o.HttpUrlSpec = types.ListValueMust(t, vs) +} + +// GetJobSpec returns the value of the JobSpec field in CreateRegistryWebhook_SdkV2 as +// a JobSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRegistryWebhook_SdkV2) GetJobSpec(ctx context.Context) (JobSpec_SdkV2, bool) { + var e JobSpec_SdkV2 + if o.JobSpec.IsNull() || o.JobSpec.IsUnknown() { + return e, false + } + var v []JobSpec_SdkV2 + d := o.JobSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetJobSpec sets the value of the JobSpec field in CreateRegistryWebhook_SdkV2. +func (o *CreateRegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] + o.JobSpec = types.ListValueMust(t, vs) +} + +type CreateRun_SdkV2 struct { + // ID of the associated experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + // Unix timestamp in milliseconds of when the run started. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Additional metadata for run. + Tags types.List `tfsdk:"tags" tf:"optional"` + // ID of the user executing the run. This field is deprecated as of MLflow + // 1.0, and will be removed in a future MLflow release. Use 'mlflow.user' + // tag instead. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRun_SdkV2) { +} + +func (newState *CreateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRun_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(RunTag_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, CreateRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "start_time": o.StartTime, + "tags": o.Tags, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + "start_time": types.Int64Type, + "tags": basetypes.ListType{ + ElemType: RunTag{}.Type(ctx), + }, + "user_id": types.StringType, + }, + } +} + +// GetTags returns the value of the Tags field in CreateRun_SdkV2 as +// a slice of RunTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRun_SdkV2) GetTags(ctx context.Context) ([]RunTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []RunTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateRun_SdkV2. +func (o *CreateRun_SdkV2) SetTags(ctx context.Context, v []RunTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type CreateRunResponse_SdkV2 struct { + // The newly created run. + Run types.List `tfsdk:"run" tf:"optional,object"` +} + +func (newState *CreateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRunResponse_SdkV2) { +} + +func (newState *CreateRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRunResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "run": reflect.TypeOf(Run_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, CreateRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRunResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run": o.Run, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run": basetypes.ListType{ + ElemType: Run{}.Type(ctx), + }, + }, + } +} + +// GetRun returns the value of the Run field in CreateRunResponse_SdkV2 as +// a Run_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRunResponse_SdkV2) GetRun(ctx context.Context) (Run_SdkV2, bool) { + var e Run_SdkV2 + if o.Run.IsNull() || o.Run.IsUnknown() { + return e, false + } + var v []Run_SdkV2 + d := o.Run.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRun sets the value of the Run field in CreateRunResponse_SdkV2. +func (o *CreateRunResponse_SdkV2) SetRun(ctx context.Context, v Run_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run"] + o.Run = types.ListValueMust(t, vs) +} + +type CreateTransitionRequest_SdkV2 struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:""` + // Target stage of the transition. Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + Stage types.String `tfsdk:"stage" tf:""` + // Version of the model. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequest_SdkV2) { +} + +func (newState *CreateTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateTransitionRequest_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, CreateTransitionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateTransitionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "stage": types.StringType, + "version": types.StringType, + }, + } +} + +type CreateTransitionRequestResponse_SdkV2 struct { + // Transition request details. + Request types.List `tfsdk:"request" tf:"optional,object"` +} + +func (newState *CreateTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequestResponse_SdkV2) { +} + +func (newState *CreateTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTransitionRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTransitionRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateTransitionRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "request": reflect.TypeOf(TransitionRequest_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, CreateTransitionRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateTransitionRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "request": o.Request, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "request": basetypes.ListType{ + ElemType: TransitionRequest{}.Type(ctx), + }, + }, + } +} + +// GetRequest returns the value of the Request field in CreateTransitionRequestResponse_SdkV2 as +// a TransitionRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateTransitionRequestResponse_SdkV2) GetRequest(ctx context.Context) (TransitionRequest_SdkV2, bool) { + var e TransitionRequest_SdkV2 + if o.Request.IsNull() || o.Request.IsUnknown() { + return e, false + } + var v []TransitionRequest_SdkV2 + d := o.Request.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRequest sets the value of the Request field in CreateTransitionRequestResponse_SdkV2. +func (o *CreateTransitionRequestResponse_SdkV2) SetRequest(ctx context.Context, v TransitionRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["request"] + o.Request = types.ListValueMust(t, vs) +} + +type CreateWebhookResponse_SdkV2 struct { + Webhook types.List `tfsdk:"webhook" tf:"optional,object"` +} + +func (newState *CreateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWebhookResponse_SdkV2) { +} + +func (newState *CreateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWebhookResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWebhookResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateWebhookResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, CreateWebhookResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateWebhookResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "webhook": o.Webhook, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "webhook": basetypes.ListType{ + ElemType: RegistryWebhook{}.Type(ctx), + }, + }, + } +} + +// GetWebhook returns the value of the Webhook field in CreateWebhookResponse_SdkV2 as +// a RegistryWebhook_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWebhookResponse_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 CreateWebhookResponse_SdkV2. +func (o *CreateWebhookResponse_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) +} + +type Dataset_SdkV2 struct { + // Dataset digest, e.g. an md5 hash of the dataset that uniquely identifies + // it within datasets of the same name. + Digest types.String `tfsdk:"digest" tf:"optional"` + // The name of the dataset. E.g. “my.uc.table@2” “nyc-taxi-dataset”, + // “fantastic-elk-3” + Name types.String `tfsdk:"name" tf:"optional"` + // The profile of the dataset. Summary statistics for the dataset, such as + // the number of rows in a table, the mean / std / mode of each column in a + // table, or the number of elements in an array. + Profile types.String `tfsdk:"profile" tf:"optional"` + // The schema of the dataset. E.g., MLflow ColSpec JSON for a dataframe, + // MLflow TensorSpec JSON for an ndarray, or another schema format. + Schema types.String `tfsdk:"schema" tf:"optional"` + // The type of the dataset source, e.g. ‘databricks-uc-table’, + // ‘DBFS’, ‘S3’, ... + Source types.String `tfsdk:"source" tf:"optional"` + // Source information for the dataset. Note that the source may not exactly + // reproduce the dataset if it was transformed / modified before use with + // MLflow. + SourceType types.String `tfsdk:"source_type" tf:"optional"` +} + +func (newState *Dataset_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dataset_SdkV2) { +} + +func (newState *Dataset_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dataset_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Dataset. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Dataset_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, Dataset_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Dataset_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "digest": o.Digest, + "name": o.Name, + "profile": o.Profile, + "schema": o.Schema, + "source": o.Source, + "source_type": o.SourceType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Dataset_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "digest": types.StringType, + "name": types.StringType, + "profile": types.StringType, + "schema": types.StringType, + "source": types.StringType, + "source_type": types.StringType, + }, + } +} + +type DatasetInput_SdkV2 struct { + // The dataset being used as a Run input. + Dataset types.List `tfsdk:"dataset" tf:"optional,object"` + // A list of tags for the dataset input, e.g. a “context” tag with value + // “training” + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *DatasetInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatasetInput_SdkV2) { +} + +func (newState *DatasetInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatasetInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatasetInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DatasetInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dataset": reflect.TypeOf(Dataset_SdkV2{}), + "tags": reflect.TypeOf(InputTag_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, DatasetInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatasetInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dataset": o.Dataset, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatasetInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dataset": basetypes.ListType{ + ElemType: Dataset{}.Type(ctx), + }, + "tags": basetypes.ListType{ + ElemType: InputTag{}.Type(ctx), + }, + }, + } +} + +// GetDataset returns the value of the Dataset field in DatasetInput_SdkV2 as +// a Dataset_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DatasetInput_SdkV2) GetDataset(ctx context.Context) (Dataset_SdkV2, bool) { + var e Dataset_SdkV2 + if o.Dataset.IsNull() || o.Dataset.IsUnknown() { + return e, false + } + var v []Dataset_SdkV2 + d := o.Dataset.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataset sets the value of the Dataset field in DatasetInput_SdkV2. +func (o *DatasetInput_SdkV2) SetDataset(ctx context.Context, v Dataset_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dataset"] + o.Dataset = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in DatasetInput_SdkV2 as +// a slice of InputTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DatasetInput_SdkV2) GetTags(ctx context.Context) ([]InputTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []InputTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in DatasetInput_SdkV2. +func (o *DatasetInput_SdkV2) SetTags(ctx context.Context, v []InputTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// Delete a comment +type DeleteCommentRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteCommentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentRequest_SdkV2) { +} + +func (newState *DeleteCommentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCommentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCommentRequest_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, DeleteCommentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCommentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCommentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteCommentResponse_SdkV2 struct { +} + +func (newState *DeleteCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCommentResponse_SdkV2) { +} + +func (newState *DeleteCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCommentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCommentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCommentResponse_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, DeleteCommentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCommentResponse_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 DeleteCommentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeleteExperiment_SdkV2 struct { + // ID of the associated experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` +} + +func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExperiment_SdkV2) { +} + +func (newState *DeleteExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExperiment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExperiment_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, DeleteExperiment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExperiment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteExperiment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +type DeleteExperimentResponse_SdkV2 struct { +} + +func (newState *DeleteExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteExperimentResponse_SdkV2) { +} + +func (newState *DeleteExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteExperimentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteExperimentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteExperimentResponse_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, DeleteExperimentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteExperimentResponse_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 DeleteExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a model +type DeleteModelRequest_SdkV2 struct { + // Registered model unique name identifier. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelRequest_SdkV2) { +} + +func (newState *DeleteModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelRequest_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, DeleteModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelRequest_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 DeleteModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type DeleteModelResponse_SdkV2 struct { +} + +func (newState *DeleteModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelResponse_SdkV2) { +} + +func (newState *DeleteModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelResponse_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, DeleteModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelResponse_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 DeleteModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a model tag +type DeleteModelTagRequest_SdkV2 struct { + // Name of the tag. The name must be an exact match; wild-card deletion is + // not supported. Maximum size is 250 bytes. + Key types.String `tfsdk:"-"` + // Name of the registered model that the tag was logged under. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteModelTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagRequest_SdkV2) { +} + +func (newState *DeleteModelTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelTagRequest_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, DeleteModelTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteModelTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "name": types.StringType, + }, + } +} + +type DeleteModelTagResponse_SdkV2 struct { +} + +func (newState *DeleteModelTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelTagResponse_SdkV2) { +} + +func (newState *DeleteModelTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelTagResponse_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, DeleteModelTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelTagResponse_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 DeleteModelTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a model version. +type DeleteModelVersionRequest_SdkV2 struct { + // Name of the registered model + Name types.String `tfsdk:"-"` + // Model version number + Version types.String `tfsdk:"-"` +} + +func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionRequest_SdkV2) { +} + +func (newState *DeleteModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelVersionRequest_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, DeleteModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionRequest_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 DeleteModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type DeleteModelVersionResponse_SdkV2 struct { +} + +func (newState *DeleteModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionResponse_SdkV2) { +} + +func (newState *DeleteModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelVersionResponse_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, DeleteModelVersionResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionResponse_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 DeleteModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a model version tag +type DeleteModelVersionTagRequest_SdkV2 struct { + // Name of the tag. The name must be an exact match; wild-card deletion is + // not supported. Maximum size is 250 bytes. + Key types.String `tfsdk:"-"` + // Name of the registered model that the tag was logged under. + Name types.String `tfsdk:"-"` + // Model version number that the tag was logged under. + Version types.String `tfsdk:"-"` +} + +func (newState *DeleteModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagRequest_SdkV2) { +} + +func (newState *DeleteModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelVersionTagRequest_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, DeleteModelVersionTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteModelVersionTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type DeleteModelVersionTagResponse_SdkV2 struct { +} + +func (newState *DeleteModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteModelVersionTagResponse_SdkV2) { +} + +func (newState *DeleteModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteModelVersionTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteModelVersionTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteModelVersionTagResponse_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, DeleteModelVersionTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionTagResponse_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 DeleteModelVersionTagResponse_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" tf:""` +} + +func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRun_SdkV2) { +} + +func (newState *DeleteRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRun_SdkV2) { +} + +// 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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.StringType, + }, + } +} + +type DeleteRunResponse_SdkV2 struct { +} + +func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunResponse_SdkV2) { +} + +func (newState *DeleteRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRunResponse_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, DeleteRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRunResponse_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 DeleteRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeleteRuns_SdkV2 struct { + // The ID of the experiment containing the runs to delete. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` + // An optional positive integer indicating the maximum number of runs to + // delete. The maximum allowed value for max_runs is 10000. + MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + // The maximum creation timestamp in milliseconds since the UNIX epoch for + // deleting runs. Only runs created prior to or at this timestamp are + // deleted. + MaxTimestampMillis types.Int64 `tfsdk:"max_timestamp_millis" tf:""` +} + +func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRuns_SdkV2) { +} + +func (newState *DeleteRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRuns_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRuns_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, DeleteRuns_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRuns_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "max_runs": o.MaxRuns, + "max_timestamp_millis": o.MaxTimestampMillis, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRuns_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + "max_runs": types.Int64Type, + "max_timestamp_millis": types.Int64Type, + }, + } +} + +type DeleteRunsResponse_SdkV2 struct { + // The number of runs deleted. + RunsDeleted types.Int64 `tfsdk:"runs_deleted" tf:"optional"` +} + +func (newState *DeleteRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRunsResponse_SdkV2) { +} + +func (newState *DeleteRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRunsResponse_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, DeleteRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRunsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "runs_deleted": o.RunsDeleted, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "runs_deleted": types.Int64Type, + }, + } +} + +type DeleteTag_SdkV2 struct { + // Name of the tag. Maximum size is 255 bytes. Must be provided. + Key types.String `tfsdk:"key" tf:""` + // ID of the run that the tag was logged under. Must be provided. + RunId types.String `tfsdk:"run_id" tf:""` +} + +func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTag_SdkV2) { +} + +func (newState *DeleteTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTag_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTag_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, DeleteTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "run_id": types.StringType, + }, + } +} + +type DeleteTagResponse_SdkV2 struct { +} + +func (newState *DeleteTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTagResponse_SdkV2) { +} + +func (newState *DeleteTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTagResponse_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, DeleteTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTagResponse_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 DeleteTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a transition request +type DeleteTransitionRequestRequest_SdkV2 struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"-"` + // Username of the user who created this request. Of the transition requests + // matching the specified details, only the one transition created by this + // user will be deleted. + Creator types.String `tfsdk:"-"` + // Name of the model. + Name types.String `tfsdk:"-"` + // Target stage of the transition request. Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + Stage types.String `tfsdk:"-"` + // Version of the model. + Version types.String `tfsdk:"-"` +} + +func (newState *DeleteTransitionRequestRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestRequest_SdkV2) { +} + +func (newState *DeleteTransitionRequestRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTransitionRequestRequest_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, DeleteTransitionRequestRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTransitionRequestRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "creator": o.Creator, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteTransitionRequestRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "creator": types.StringType, + "name": types.StringType, + "stage": types.StringType, + "version": types.StringType, + }, + } +} + +type DeleteTransitionRequestResponse_SdkV2 struct { +} + +func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTransitionRequestResponse_SdkV2) { +} + +func (newState *DeleteTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTransitionRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTransitionRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteTransitionRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTransitionRequestResponse_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 DeleteTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a webhook +type DeleteWebhookRequest_SdkV2 struct { + // Webhook ID required to delete a registry webhook. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteWebhookRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookRequest_SdkV2) { +} + +func (newState *DeleteWebhookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWebhookRequest_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, DeleteWebhookRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWebhookRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteWebhookRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteWebhookResponse_SdkV2 struct { +} + +func (newState *DeleteWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWebhookResponse_SdkV2) { +} + +func (newState *DeleteWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWebhookResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWebhookResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWebhookResponse_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, DeleteWebhookResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWebhookResponse_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 DeleteWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Experiment_SdkV2 struct { + // Location where artifacts for the experiment are stored. + ArtifactLocation types.String `tfsdk:"artifact_location" tf:"optional"` + // Creation time + CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + // Unique identifier for the experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + // Last update time + LastUpdateTime types.Int64 `tfsdk:"last_update_time" tf:"optional"` + // Current life cycle stage of the experiment: "active" or "deleted". + // Deleted experiments are not returned by APIs. + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + // Human readable name that identifies the experiment. + Name types.String `tfsdk:"name" tf:"optional"` + // Tags: Additional metadata key-value pairs. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *Experiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Experiment_SdkV2) { +} + +func (newState *Experiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState Experiment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Experiment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Experiment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ExperimentTag_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, Experiment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Experiment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_location": o.ArtifactLocation, + "creation_time": o.CreationTime, + "experiment_id": o.ExperimentId, + "last_update_time": o.LastUpdateTime, + "lifecycle_stage": o.LifecycleStage, + "name": o.Name, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Experiment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_location": types.StringType, + "creation_time": types.Int64Type, + "experiment_id": types.StringType, + "last_update_time": types.Int64Type, + "lifecycle_stage": types.StringType, + "name": types.StringType, + "tags": basetypes.ListType{ + ElemType: ExperimentTag{}.Type(ctx), + }, + }, + } +} + +// GetTags returns the value of the Tags field in Experiment_SdkV2 as +// a slice of ExperimentTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Experiment_SdkV2) GetTags(ctx context.Context) ([]ExperimentTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ExperimentTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in Experiment_SdkV2. +func (o *Experiment_SdkV2) SetTags(ctx context.Context, v []ExperimentTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ExperimentAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ExperimentAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlRequest_SdkV2) { +} + +func (newState *ExperimentAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentAccessControlRequest_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, ExperimentAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type ExperimentAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ExperimentAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentAccessControlResponse_SdkV2) { +} + +func (newState *ExperimentAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(ExperimentPermission_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, ExperimentAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: ExperimentPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in ExperimentAccessControlResponse_SdkV2 as +// a slice of ExperimentPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExperimentAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]ExperimentPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []ExperimentPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in ExperimentAccessControlResponse_SdkV2. +func (o *ExperimentAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []ExperimentPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type ExperimentPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ExperimentPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermission_SdkV2) { +} + +func (newState *ExperimentPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, ExperimentPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in ExperimentPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExperimentPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in ExperimentPermission_SdkV2. +func (o *ExperimentPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type ExperimentPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *ExperimentPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissions_SdkV2) { +} + +func (newState *ExperimentPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ExperimentAccessControlResponse_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, ExperimentPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ExperimentAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ExperimentPermissions_SdkV2 as +// a slice of ExperimentAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExperimentPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]ExperimentAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ExperimentAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ExperimentPermissions_SdkV2. +func (o *ExperimentPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []ExperimentAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ExperimentPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ExperimentPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsDescription_SdkV2) { +} + +func (newState *ExperimentPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentPermissionsDescription_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, ExperimentPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type ExperimentPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The experiment for which to get or manage permissions. + ExperimentId types.String `tfsdk:"-"` +} + +func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentPermissionsRequest_SdkV2) { +} + +func (newState *ExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ExperimentAccessControlRequest_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, ExperimentPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExperimentPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ExperimentAccessControlRequest{}.Type(ctx), + }, + "experiment_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ExperimentPermissionsRequest_SdkV2 as +// a slice of ExperimentAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExperimentPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]ExperimentAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ExperimentAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ExperimentPermissionsRequest_SdkV2. +func (o *ExperimentPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []ExperimentAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ExperimentTag_SdkV2 struct { + // The tag key. + Key types.String `tfsdk:"key" tf:"optional"` + // The tag value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *ExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExperimentTag_SdkV2) { +} + +func (newState *ExperimentTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExperimentTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExperimentTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExperimentTag_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, ExperimentTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExperimentTag_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 ExperimentTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type FileInfo_SdkV2 struct { + // Size in bytes. Unset for directories. + FileSize types.Int64 `tfsdk:"file_size" tf:"optional"` + // Whether the path is a directory. + IsDir types.Bool `tfsdk:"is_dir" tf:"optional"` + // Path relative to the root artifact directory run. + Path types.String `tfsdk:"path" tf:"optional"` +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileInfo_SdkV2) { +} + +func (newState *FileInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileInfo_SdkV2) { +} + +// 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, + }, + } +} + +// Get metadata +type GetByNameRequest_SdkV2 struct { + // Name of the associated experiment. + ExperimentName types.String `tfsdk:"-"` +} + +func (newState *GetByNameRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetByNameRequest_SdkV2) { +} + +func (newState *GetByNameRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetByNameRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetByNameRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetByNameRequest_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, GetByNameRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetByNameRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_name": o.ExperimentName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetByNameRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_name": types.StringType, + }, + } +} + +// Get experiment permission levels +type GetExperimentPermissionLevelsRequest_SdkV2 struct { + // The experiment for which to get or manage permissions. + ExperimentId types.String `tfsdk:"-"` +} + +func (newState *GetExperimentPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetExperimentPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExperimentPermissionLevelsRequest_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, GetExperimentPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExperimentPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +type GetExperimentPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetExperimentPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetExperimentPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExperimentPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(ExperimentPermissionsDescription_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, GetExperimentPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExperimentPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: ExperimentPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetExperimentPermissionLevelsResponse_SdkV2 as +// a slice of ExperimentPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetExperimentPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]ExperimentPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []ExperimentPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetExperimentPermissionLevelsResponse_SdkV2. +func (o *GetExperimentPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []ExperimentPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get experiment permissions +type GetExperimentPermissionsRequest_SdkV2 struct { + // The experiment for which to get or manage permissions. + ExperimentId types.String `tfsdk:"-"` +} + +func (newState *GetExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentPermissionsRequest_SdkV2) { +} + +func (newState *GetExperimentPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExperimentPermissionsRequest_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, GetExperimentPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExperimentPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +// Get an experiment +type GetExperimentRequest_SdkV2 struct { + // ID of the associated experiment. + ExperimentId types.String `tfsdk:"-"` +} + +func (newState *GetExperimentRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentRequest_SdkV2) { +} + +func (newState *GetExperimentRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExperimentRequest_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, GetExperimentRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExperimentRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExperimentRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +type GetExperimentResponse_SdkV2 struct { + // Experiment details. + Experiment types.List `tfsdk:"experiment" tf:"optional,object"` +} + +func (newState *GetExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentResponse_SdkV2) { +} + +func (newState *GetExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetExperimentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetExperimentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetExperimentResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "experiment": 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, GetExperimentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetExperimentResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment": o.Experiment, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment": basetypes.ListType{ + ElemType: Experiment{}.Type(ctx), + }, + }, + } +} + +// GetExperiment returns the value of the Experiment field in GetExperimentResponse_SdkV2 as +// a Experiment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetExperimentResponse_SdkV2) GetExperiment(ctx context.Context) (Experiment_SdkV2, bool) { + var e Experiment_SdkV2 + if o.Experiment.IsNull() || o.Experiment.IsUnknown() { + return e, false + } + var v []Experiment_SdkV2 + d := o.Experiment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExperiment sets the value of the Experiment field in GetExperimentResponse_SdkV2. +func (o *GetExperimentResponse_SdkV2) SetExperiment(ctx context.Context, v Experiment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiment"] + o.Experiment = types.ListValueMust(t, vs) +} + +// Get history of a given metric within a run +type GetHistoryRequest_SdkV2 struct { + // Maximum number of Metric records to return per paginated request. Default + // is set to 25,000. If set higher than 25,000, a request Exception will be + // raised. + MaxResults types.Int64 `tfsdk:"-"` + // Name of the metric. + MetricKey types.String `tfsdk:"-"` + // Token indicating the page of metric histories to fetch. + PageToken types.String `tfsdk:"-"` + // ID of the run from which to fetch metric values. Must be provided. + RunId types.String `tfsdk:"-"` + // [Deprecated, use run_id instead] ID of the run from which to fetch metric + // values. This field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"-"` +} + +func (newState *GetHistoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetHistoryRequest_SdkV2) { +} + +func (newState *GetHistoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetHistoryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetHistoryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetHistoryRequest_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, GetHistoryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetHistoryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "metric_key": o.MetricKey, + "page_token": o.PageToken, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetHistoryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "metric_key": types.StringType, + "page_token": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + }, + } +} + +type GetLatestVersionsRequest_SdkV2 struct { + // Registered model unique name identifier. + Name types.String `tfsdk:"name" tf:""` + // List of stages. + Stages types.List `tfsdk:"stages" tf:"optional"` +} + +func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsRequest_SdkV2) { +} + +func (newState *GetLatestVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetLatestVersionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "stages": 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, GetLatestVersionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "stages": o.Stages, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLatestVersionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "stages": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetStages returns the value of the Stages field in GetLatestVersionsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetLatestVersionsRequest_SdkV2) GetStages(ctx context.Context) ([]types.String, bool) { + if o.Stages.IsNull() || o.Stages.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Stages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStages sets the value of the Stages field in GetLatestVersionsRequest_SdkV2. +func (o *GetLatestVersionsRequest_SdkV2) SetStages(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["stages"] + t = t.(attr.TypeWithElementType).ElementType() + o.Stages = types.ListValueMust(t, vs) +} + +type GetLatestVersionsResponse_SdkV2 struct { + // Latest version models for each requests stage. Only return models with + // current `READY` status. If no `stages` provided, returns the latest + // version for each stage, including `"None"`. + ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` +} + +func (newState *GetLatestVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetLatestVersionsResponse_SdkV2) { +} + +func (newState *GetLatestVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetLatestVersionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetLatestVersionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetLatestVersionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "model_versions": reflect.TypeOf(ModelVersion_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, GetLatestVersionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_versions": o.ModelVersions, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetLatestVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_versions": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + }, + } +} + +// GetModelVersions returns the value of the ModelVersions field in GetLatestVersionsResponse_SdkV2 as +// a slice of ModelVersion_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetLatestVersionsResponse_SdkV2) GetModelVersions(ctx context.Context) ([]ModelVersion_SdkV2, bool) { + if o.ModelVersions.IsNull() || o.ModelVersions.IsUnknown() { + return nil, false + } + var v []ModelVersion_SdkV2 + d := o.ModelVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetModelVersions sets the value of the ModelVersions field in GetLatestVersionsResponse_SdkV2. +func (o *GetLatestVersionsResponse_SdkV2) SetModelVersions(ctx context.Context, v []ModelVersion_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["model_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.ModelVersions = types.ListValueMust(t, vs) +} + +type GetMetricHistoryResponse_SdkV2 struct { + // All logged values for this metric. + Metrics types.List `tfsdk:"metrics" tf:"optional"` + // Token that can be used to retrieve the next page of metric history + // results + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *GetMetricHistoryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetMetricHistoryResponse_SdkV2) { +} + +func (newState *GetMetricHistoryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetMetricHistoryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetMetricHistoryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetMetricHistoryResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metrics": reflect.TypeOf(Metric_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, GetMetricHistoryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetMetricHistoryResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metrics": o.Metrics, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetMetricHistoryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metrics": basetypes.ListType{ + ElemType: Metric{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetMetrics returns the value of the Metrics field in GetMetricHistoryResponse_SdkV2 as +// a slice of Metric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetMetricHistoryResponse_SdkV2) GetMetrics(ctx context.Context) ([]Metric_SdkV2, bool) { + if o.Metrics.IsNull() || o.Metrics.IsUnknown() { + return nil, false + } + var v []Metric_SdkV2 + d := o.Metrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMetrics sets the value of the Metrics field in GetMetricHistoryResponse_SdkV2. +func (o *GetMetricHistoryResponse_SdkV2) SetMetrics(ctx context.Context, v []Metric_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["metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.Metrics = types.ListValueMust(t, vs) +} + +// Get model +type GetModelRequest_SdkV2 struct { + // Registered model unique name identifier. + Name types.String `tfsdk:"-"` +} + +func (newState *GetModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelRequest_SdkV2) { +} + +func (newState *GetModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelRequest_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, GetModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelRequest_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 GetModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetModelResponse_SdkV2 struct { + RegisteredModelDatabricks types.List `tfsdk:"registered_model_databricks" tf:"optional,object"` +} + +func (newState *GetModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelResponse_SdkV2) { +} + +func (newState *GetModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "registered_model_databricks": reflect.TypeOf(ModelDatabricks_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, GetModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "registered_model_databricks": o.RegisteredModelDatabricks, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "registered_model_databricks": basetypes.ListType{ + ElemType: ModelDatabricks{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModelDatabricks returns the value of the RegisteredModelDatabricks field in GetModelResponse_SdkV2 as +// a ModelDatabricks_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetModelResponse_SdkV2) GetRegisteredModelDatabricks(ctx context.Context) (ModelDatabricks_SdkV2, bool) { + var e ModelDatabricks_SdkV2 + if o.RegisteredModelDatabricks.IsNull() || o.RegisteredModelDatabricks.IsUnknown() { + return e, false + } + var v []ModelDatabricks_SdkV2 + d := o.RegisteredModelDatabricks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRegisteredModelDatabricks sets the value of the RegisteredModelDatabricks field in GetModelResponse_SdkV2. +func (o *GetModelResponse_SdkV2) SetRegisteredModelDatabricks(ctx context.Context, v ModelDatabricks_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["registered_model_databricks"] + o.RegisteredModelDatabricks = types.ListValueMust(t, vs) +} + +// Get a model version URI +type GetModelVersionDownloadUriRequest_SdkV2 struct { + // Name of the registered model + Name types.String `tfsdk:"-"` + // Model version number + Version types.String `tfsdk:"-"` +} + +func (newState *GetModelVersionDownloadUriRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriRequest_SdkV2) { +} + +func (newState *GetModelVersionDownloadUriRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelVersionDownloadUriRequest_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, GetModelVersionDownloadUriRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionDownloadUriRequest_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 GetModelVersionDownloadUriRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type GetModelVersionDownloadUriResponse_SdkV2 struct { + // URI corresponding to where artifacts for this model version are stored. + ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` +} + +func (newState *GetModelVersionDownloadUriResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionDownloadUriResponse_SdkV2) { +} + +func (newState *GetModelVersionDownloadUriResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionDownloadUriResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionDownloadUriResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelVersionDownloadUriResponse_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, GetModelVersionDownloadUriResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionDownloadUriResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_uri": o.ArtifactUri, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetModelVersionDownloadUriResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_uri": types.StringType, + }, + } +} + +// Get a model version +type GetModelVersionRequest_SdkV2 struct { + // Name of the registered model + Name types.String `tfsdk:"-"` + // Model version number + Version types.String `tfsdk:"-"` +} + +func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionRequest_SdkV2) { +} + +func (newState *GetModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelVersionRequest_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, GetModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionRequest_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 GetModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type GetModelVersionResponse_SdkV2 struct { + ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` +} + +func (newState *GetModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionResponse_SdkV2) { +} + +func (newState *GetModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetModelVersionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetModelVersionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetModelVersionResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetModelVersionResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_version": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + }, + } +} + +// GetModelVersion returns the value of the ModelVersion field in GetModelVersionResponse_SdkV2 as +// a ModelVersion_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetModelVersionResponse_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 GetModelVersionResponse_SdkV2. +func (o *GetModelVersionResponse_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) +} + +// Get registered model permission levels +type GetRegisteredModelPermissionLevelsRequest_SdkV2 struct { + // The registered model for which to get or manage permissions. + RegisteredModelId types.String `tfsdk:"-"` +} + +func (newState *GetRegisteredModelPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetRegisteredModelPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRegisteredModelPermissionLevelsRequest_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, GetRegisteredModelPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "registered_model_id": o.RegisteredModelId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRegisteredModelPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "registered_model_id": types.StringType, + }, + } +} + +type GetRegisteredModelPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetRegisteredModelPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetRegisteredModelPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRegisteredModelPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(RegisteredModelPermissionsDescription_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, GetRegisteredModelPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRegisteredModelPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: RegisteredModelPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetRegisteredModelPermissionLevelsResponse_SdkV2 as +// a slice of RegisteredModelPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetRegisteredModelPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]RegisteredModelPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []RegisteredModelPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetRegisteredModelPermissionLevelsResponse_SdkV2. +func (o *GetRegisteredModelPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []RegisteredModelPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get registered model permissions +type GetRegisteredModelPermissionsRequest_SdkV2 struct { + // The registered model for which to get or manage permissions. + RegisteredModelId types.String `tfsdk:"-"` +} + +func (newState *GetRegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRegisteredModelPermissionsRequest_SdkV2) { +} + +func (newState *GetRegisteredModelPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRegisteredModelPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRegisteredModelPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRegisteredModelPermissionsRequest_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, GetRegisteredModelPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "registered_model_id": o.RegisteredModelId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRegisteredModelPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "registered_model_id": types.StringType, + }, + } +} + +// Get a run +type GetRunRequest_SdkV2 struct { + // ID of the run to fetch. Must be provided. + RunId types.String `tfsdk:"-"` + // [Deprecated, use run_id instead] ID of the run to fetch. This field will + // be removed in a future MLflow version. + RunUuid types.String `tfsdk:"-"` +} + +func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunRequest_SdkV2) { +} + +func (newState *GetRunRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRunRequest_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, GetRunRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRunRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + "run_uuid": o.RunUuid, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRunRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.StringType, + "run_uuid": types.StringType, + }, + } +} + +type GetRunResponse_SdkV2 struct { + // Run metadata (name, start time, etc) and data (metrics, params, and + // tags). + Run types.List `tfsdk:"run" tf:"optional,object"` +} + +func (newState *GetRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunResponse_SdkV2) { +} + +func (newState *GetRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRunResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "run": reflect.TypeOf(Run_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, GetRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRunResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run": o.Run, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run": basetypes.ListType{ + ElemType: Run{}.Type(ctx), + }, + }, + } +} + +// GetRun returns the value of the Run field in GetRunResponse_SdkV2 as +// a Run_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetRunResponse_SdkV2) GetRun(ctx context.Context) (Run_SdkV2, bool) { + var e Run_SdkV2 + if o.Run.IsNull() || o.Run.IsUnknown() { + return e, false + } + var v []Run_SdkV2 + d := o.Run.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRun sets the value of the Run field in GetRunResponse_SdkV2. +func (o *GetRunResponse_SdkV2) SetRun(ctx context.Context, v Run_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run"] + o.Run = types.ListValueMust(t, vs) +} + +type HttpUrlSpec_SdkV2 struct { + // Value of the authorization header that should be sent in the request sent + // by the wehbook. It should be of the form `" "`. + // If set to an empty string, no authorization header will be included in + // the request. + Authorization types.String `tfsdk:"authorization" tf:"optional"` + // Enable/disable SSL certificate validation. Default is true. For + // self-signed certificates, this field must be false AND the destination + // server must disable certificate validation as well. For security + // purposes, it is encouraged to perform secret validation with the + // HMAC-encoded portion of the payload and acknowledge the risk associated + // with disabling hostname validation whereby it becomes more likely that + // requests can be maliciously routed to an unintended host. + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + // Shared secret required for HMAC encoding payload. The HMAC-encoded + // payload will be sent in the header as: { "X-Databricks-Signature": + // $encoded_payload }. + Secret types.String `tfsdk:"secret" tf:"optional"` + // External HTTPS URL called on event trigger (by using a POST request). + Url types.String `tfsdk:"url" tf:""` +} + +func (newState *HttpUrlSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan HttpUrlSpec_SdkV2) { +} + +func (newState *HttpUrlSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a HttpUrlSpec_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, HttpUrlSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o HttpUrlSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authorization": o.Authorization, + "enable_ssl_verification": o.EnableSslVerification, + "secret": o.Secret, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o HttpUrlSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authorization": types.StringType, + "enable_ssl_verification": types.BoolType, + "secret": types.StringType, + "url": types.StringType, + }, + } +} + +type HttpUrlSpecWithoutSecret_SdkV2 struct { + // Enable/disable SSL certificate validation. Default is true. For + // self-signed certificates, this field must be false AND the destination + // server must disable certificate validation as well. For security + // purposes, it is encouraged to perform secret validation with the + // HMAC-encoded portion of the payload and acknowledge the risk associated + // with disabling hostname validation whereby it becomes more likely that + // requests can be maliciously routed to an unintended host. + EnableSslVerification types.Bool `tfsdk:"enable_ssl_verification" tf:"optional"` + // External HTTPS URL called on event trigger (by using a POST request). + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *HttpUrlSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan HttpUrlSpecWithoutSecret_SdkV2) { +} + +func (newState *HttpUrlSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState HttpUrlSpecWithoutSecret_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in HttpUrlSpecWithoutSecret. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a HttpUrlSpecWithoutSecret_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, HttpUrlSpecWithoutSecret_SdkV2 +// only implements ToObjectValue() and Type(). +func (o HttpUrlSpecWithoutSecret_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enable_ssl_verification": o.EnableSslVerification, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o HttpUrlSpecWithoutSecret_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enable_ssl_verification": types.BoolType, + "url": types.StringType, + }, + } +} + +type InputTag_SdkV2 struct { + // The tag key. + Key types.String `tfsdk:"key" tf:"optional"` + // The tag value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *InputTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan InputTag_SdkV2) { +} + +func (newState *InputTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState InputTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in InputTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a InputTag_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, InputTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o InputTag_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 InputTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type JobSpec_SdkV2 struct { + // The personal access token used to authorize webhook's job runs. + AccessToken types.String `tfsdk:"access_token" tf:""` + // ID of the job that the webhook runs. + JobId types.String `tfsdk:"job_id" tf:""` + // URL of the workspace containing the job that this webhook runs. If not + // specified, the job’s workspace URL is assumed to be the same as the + // workspace where the webhook is created. + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` +} + +func (newState *JobSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpec_SdkV2) { +} + +func (newState *JobSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobSpec_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, JobSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_token": o.AccessToken, + "job_id": o.JobId, + "workspace_url": o.WorkspaceUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_token": types.StringType, + "job_id": types.StringType, + "workspace_url": types.StringType, + }, + } +} + +type JobSpecWithoutSecret_SdkV2 struct { + // ID of the job that the webhook runs. + JobId types.String `tfsdk:"job_id" tf:"optional"` + // URL of the workspace containing the job that this webhook runs. Defaults + // to the workspace URL in which the webhook is created. If not specified, + // the job’s workspace is assumed to be the same as the webhook’s. + WorkspaceUrl types.String `tfsdk:"workspace_url" tf:"optional"` +} + +func (newState *JobSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobSpecWithoutSecret_SdkV2) { +} + +func (newState *JobSpecWithoutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState JobSpecWithoutSecret_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in JobSpecWithoutSecret. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a JobSpecWithoutSecret_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, JobSpecWithoutSecret_SdkV2 +// only implements ToObjectValue() and Type(). +func (o JobSpecWithoutSecret_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "job_id": o.JobId, + "workspace_url": o.WorkspaceUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o JobSpecWithoutSecret_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "job_id": types.StringType, + "workspace_url": types.StringType, + }, + } +} + +// Get all artifacts +type ListArtifactsRequest_SdkV2 struct { + // Token indicating the page of artifact results to fetch. `page_token` is + // not supported when listing artifacts in UC Volumes. A maximum of 1000 + // artifacts will be retrieved for UC Volumes. Please call + // `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC + // Volumes, which supports pagination. See [List directory contents | Files + // API](/api/workspace/files/listdirectorycontents). + PageToken types.String `tfsdk:"-"` + // Filter artifacts matching this path (a relative path from the root + // artifact directory). + Path types.String `tfsdk:"-"` + // ID of the run whose artifacts to list. Must be provided. + RunId types.String `tfsdk:"-"` + // [Deprecated, use run_id instead] ID of the run whose artifacts to list. + // This field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"-"` +} + +func (newState *ListArtifactsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsRequest_SdkV2) { +} + +func (newState *ListArtifactsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListArtifactsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListArtifactsRequest_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, ListArtifactsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListArtifactsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_token": o.PageToken, + "path": o.Path, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListArtifactsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_token": types.StringType, + "path": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + }, + } +} + +type ListArtifactsResponse_SdkV2 struct { + // File location and metadata for artifacts. + Files types.List `tfsdk:"files" tf:"optional"` + // Token that can be used to retrieve the next page of artifact results + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Root artifact directory for the run. + RootUri types.String `tfsdk:"root_uri" tf:"optional"` +} + +func (newState *ListArtifactsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListArtifactsResponse_SdkV2) { +} + +func (newState *ListArtifactsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListArtifactsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListArtifactsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListArtifactsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "files": reflect.TypeOf(FileInfo_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, ListArtifactsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListArtifactsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "files": o.Files, + "next_page_token": o.NextPageToken, + "root_uri": o.RootUri, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListArtifactsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "files": basetypes.ListType{ + ElemType: FileInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + "root_uri": types.StringType, + }, + } +} + +// GetFiles returns the value of the Files field in ListArtifactsResponse_SdkV2 as +// a slice of FileInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListArtifactsResponse_SdkV2) GetFiles(ctx context.Context) ([]FileInfo_SdkV2, bool) { + if o.Files.IsNull() || o.Files.IsUnknown() { + return nil, false + } + var v []FileInfo_SdkV2 + d := o.Files.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFiles sets the value of the Files field in ListArtifactsResponse_SdkV2. +func (o *ListArtifactsResponse_SdkV2) SetFiles(ctx context.Context, v []FileInfo_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["files"] + t = t.(attr.TypeWithElementType).ElementType() + o.Files = types.ListValueMust(t, vs) +} + +// List experiments +type ListExperimentsRequest_SdkV2 struct { + // Maximum number of experiments desired. If `max_results` is unspecified, + // return all experiments. If `max_results` is too large, it'll be + // automatically capped at 1000. Callers of this endpoint are encouraged to + // pass max_results explicitly and leverage page_token to iterate through + // experiments. + MaxResults types.Int64 `tfsdk:"-"` + // Token indicating the page of experiments to fetch + PageToken types.String `tfsdk:"-"` + // Qualifier for type of experiments to be returned. If unspecified, return + // only active experiments. + ViewType types.String `tfsdk:"-"` +} + +func (newState *ListExperimentsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsRequest_SdkV2) { +} + +func (newState *ListExperimentsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListExperimentsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListExperimentsRequest_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, ListExperimentsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListExperimentsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "view_type": o.ViewType, + }) +} + +// Type implements basetypes.ObjectValuable. +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" tf:"optional"` + // Token that can be used to retrieve the next page of experiments. Empty + // token means no more experiment is available for retrieval. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListExperimentsResponse_SdkV2) { +} + +func (newState *ListExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListExperimentsResponse_SdkV2) { +} + +// 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{}.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) +} + +// List models +type ListModelsRequest_SdkV2 struct { + // Maximum number of registered models desired. Max threshold is 1000. + MaxResults types.Int64 `tfsdk:"-"` + // Pagination token to go to the next page based on a previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsRequest_SdkV2) { +} + +func (newState *ListModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListModelsRequest_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, ListModelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListModelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListModelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListModelsResponse_SdkV2 struct { + // Pagination token to request next page of models for the same query. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` +} + +func (newState *ListModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListModelsResponse_SdkV2) { +} + +func (newState *ListModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListModelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListModelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListModelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "registered_models": reflect.TypeOf(Model_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, ListModelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListModelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListModelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "registered_models": basetypes.ListType{ + ElemType: Model{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModels returns the value of the RegisteredModels field in ListModelsResponse_SdkV2 as +// a slice of Model_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListModelsResponse_SdkV2) GetRegisteredModels(ctx context.Context) ([]Model_SdkV2, bool) { + if o.RegisteredModels.IsNull() || o.RegisteredModels.IsUnknown() { + return nil, false + } + var v []Model_SdkV2 + d := o.RegisteredModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRegisteredModels sets the value of the RegisteredModels field in ListModelsResponse_SdkV2. +func (o *ListModelsResponse_SdkV2) SetRegisteredModels(ctx context.Context, v []Model_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["registered_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.RegisteredModels = types.ListValueMust(t, vs) +} + +type ListRegistryWebhooks_SdkV2 struct { + // Token that can be used to retrieve the next page of artifact results + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Array of registry webhooks. + Webhooks types.List `tfsdk:"webhooks" tf:"optional"` +} + +func (newState *ListRegistryWebhooks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRegistryWebhooks_SdkV2) { +} + +func (newState *ListRegistryWebhooks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRegistryWebhooks_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRegistryWebhooks. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRegistryWebhooks_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "webhooks": reflect.TypeOf(RegistryWebhook_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, ListRegistryWebhooks_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRegistryWebhooks_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "webhooks": o.Webhooks, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRegistryWebhooks_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "webhooks": basetypes.ListType{ + ElemType: RegistryWebhook{}.Type(ctx), + }, + }, + } +} + +// GetWebhooks returns the value of the Webhooks field in ListRegistryWebhooks_SdkV2 as +// a slice of RegistryWebhook_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListRegistryWebhooks_SdkV2) GetWebhooks(ctx context.Context) ([]RegistryWebhook_SdkV2, bool) { + if o.Webhooks.IsNull() || o.Webhooks.IsUnknown() { + return nil, false + } + var v []RegistryWebhook_SdkV2 + d := o.Webhooks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWebhooks sets the value of the Webhooks field in ListRegistryWebhooks_SdkV2. +func (o *ListRegistryWebhooks_SdkV2) SetWebhooks(ctx context.Context, v []RegistryWebhook_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["webhooks"] + t = t.(attr.TypeWithElementType).ElementType() + o.Webhooks = types.ListValueMust(t, vs) +} + +// List transition requests +type ListTransitionRequestsRequest_SdkV2 struct { + // Name of the model. + Name types.String `tfsdk:"-"` + // Version of the model. + Version types.String `tfsdk:"-"` +} + +func (newState *ListTransitionRequestsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsRequest_SdkV2) { +} + +func (newState *ListTransitionRequestsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTransitionRequestsRequest_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, ListTransitionRequestsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTransitionRequestsRequest_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 ListTransitionRequestsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type ListTransitionRequestsResponse_SdkV2 struct { + // Array of open transition requests. + Requests types.List `tfsdk:"requests" tf:"optional"` +} + +func (newState *ListTransitionRequestsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTransitionRequestsResponse_SdkV2) { +} + +func (newState *ListTransitionRequestsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTransitionRequestsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTransitionRequestsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTransitionRequestsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "requests": reflect.TypeOf(Activity_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, ListTransitionRequestsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTransitionRequestsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "requests": o.Requests, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTransitionRequestsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "requests": basetypes.ListType{ + ElemType: Activity{}.Type(ctx), + }, + }, + } +} + +// GetRequests returns the value of the Requests field in ListTransitionRequestsResponse_SdkV2 as +// a slice of Activity_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListTransitionRequestsResponse_SdkV2) GetRequests(ctx context.Context) ([]Activity_SdkV2, bool) { + if o.Requests.IsNull() || o.Requests.IsUnknown() { + return nil, false + } + var v []Activity_SdkV2 + d := o.Requests.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRequests sets the value of the Requests field in ListTransitionRequestsResponse_SdkV2. +func (o *ListTransitionRequestsResponse_SdkV2) SetRequests(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["requests"] + t = t.(attr.TypeWithElementType).ElementType() + o.Requests = types.ListValueMust(t, vs) +} + +// List registry webhooks +type ListWebhooksRequest_SdkV2 struct { + // 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. + ModelName types.String `tfsdk:"-"` + // Token indicating the page of artifact results to fetch + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListWebhooksRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWebhooksRequest_SdkV2) { +} + +func (newState *ListWebhooksRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWebhooksRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWebhooksRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListWebhooksRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": 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, ListWebhooksRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWebhooksRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "events": o.Events, + "model_name": o.ModelName, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWebhooksRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "events": basetypes.ListType{ + ElemType: types.StringType, + }, + "model_name": types.StringType, + "page_token": types.StringType, + }, + } +} + +// GetEvents returns the value of the Events field in ListWebhooksRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListWebhooksRequest_SdkV2) GetEvents(ctx context.Context) ([]types.String, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in ListWebhooksRequest_SdkV2. +func (o *ListWebhooksRequest_SdkV2) SetEvents(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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +type LogBatch_SdkV2 struct { + // Metrics to log. A single request can contain up to 1000 metrics, and up + // to 1000 metrics, params, and tags in total. + Metrics types.List `tfsdk:"metrics" tf:"optional"` + // Params to log. A single request can contain up to 100 params, and up to + // 1000 metrics, params, and tags in total. + Params types.List `tfsdk:"params" tf:"optional"` + // ID of the run to log under + RunId types.String `tfsdk:"run_id" tf:"optional"` + // Tags to log. A single request can contain up to 100 tags, and up to 1000 + // metrics, params, and tags in total. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatch_SdkV2) { +} + +func (newState *LogBatch_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogBatch_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogBatch_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metrics": reflect.TypeOf(Metric_SdkV2{}), + "params": reflect.TypeOf(Param_SdkV2{}), + "tags": reflect.TypeOf(RunTag_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, LogBatch_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogBatch_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metrics": o.Metrics, + "params": o.Params, + "run_id": o.RunId, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogBatch_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metrics": basetypes.ListType{ + ElemType: Metric{}.Type(ctx), + }, + "params": basetypes.ListType{ + ElemType: Param{}.Type(ctx), + }, + "run_id": types.StringType, + "tags": basetypes.ListType{ + ElemType: RunTag{}.Type(ctx), + }, + }, + } +} + +// GetMetrics returns the value of the Metrics field in LogBatch_SdkV2 as +// a slice of Metric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LogBatch_SdkV2) GetMetrics(ctx context.Context) ([]Metric_SdkV2, bool) { + if o.Metrics.IsNull() || o.Metrics.IsUnknown() { + return nil, false + } + var v []Metric_SdkV2 + d := o.Metrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMetrics sets the value of the Metrics field in LogBatch_SdkV2. +func (o *LogBatch_SdkV2) SetMetrics(ctx context.Context, v []Metric_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["metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.Metrics = types.ListValueMust(t, vs) +} + +// GetParams returns the value of the Params field in LogBatch_SdkV2 as +// a slice of Param_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LogBatch_SdkV2) GetParams(ctx context.Context) ([]Param_SdkV2, bool) { + if o.Params.IsNull() || o.Params.IsUnknown() { + return nil, false + } + var v []Param_SdkV2 + d := o.Params.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParams sets the value of the Params field in LogBatch_SdkV2. +func (o *LogBatch_SdkV2) SetParams(ctx context.Context, v []Param_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["params"] + t = t.(attr.TypeWithElementType).ElementType() + o.Params = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in LogBatch_SdkV2 as +// a slice of RunTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LogBatch_SdkV2) GetTags(ctx context.Context) ([]RunTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []RunTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in LogBatch_SdkV2. +func (o *LogBatch_SdkV2) SetTags(ctx context.Context, v []RunTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type LogBatchResponse_SdkV2 struct { +} + +func (newState *LogBatchResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogBatchResponse_SdkV2) { +} + +func (newState *LogBatchResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogBatchResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogBatchResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogBatchResponse_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, LogBatchResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogBatchResponse_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 LogBatchResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type LogInputs_SdkV2 struct { + // Dataset inputs + Datasets types.List `tfsdk:"datasets" tf:"optional"` + // ID of the run to log under + RunId types.String `tfsdk:"run_id" tf:"optional"` +} + +func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputs_SdkV2) { +} + +func (newState *LogInputs_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputs_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogInputs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "datasets": reflect.TypeOf(DatasetInput_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, LogInputs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogInputs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "datasets": o.Datasets, + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogInputs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "datasets": basetypes.ListType{ + ElemType: DatasetInput{}.Type(ctx), + }, + "run_id": types.StringType, + }, + } +} + +// GetDatasets returns the value of the Datasets field in LogInputs_SdkV2 as +// a slice of DatasetInput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LogInputs_SdkV2) GetDatasets(ctx context.Context) ([]DatasetInput_SdkV2, bool) { + if o.Datasets.IsNull() || o.Datasets.IsUnknown() { + return nil, false + } + var v []DatasetInput_SdkV2 + d := o.Datasets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDatasets sets the value of the Datasets field in LogInputs_SdkV2. +func (o *LogInputs_SdkV2) SetDatasets(ctx context.Context, v []DatasetInput_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["datasets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Datasets = types.ListValueMust(t, vs) +} + +type LogInputsResponse_SdkV2 struct { +} + +func (newState *LogInputsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogInputsResponse_SdkV2) { +} + +func (newState *LogInputsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogInputsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogInputsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogInputsResponse_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, LogInputsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogInputsResponse_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 LogInputsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type LogMetric_SdkV2 struct { + // Name of the metric. + Key types.String `tfsdk:"key" tf:""` + // ID of the run under which to log the metric. Must be provided. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // [Deprecated, use run_id instead] ID of the run under which to log the + // metric. This field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + // Step at which to log the metric + Step types.Int64 `tfsdk:"step" tf:"optional"` + // Unix timestamp in milliseconds at the time metric was logged. + Timestamp types.Int64 `tfsdk:"timestamp" tf:""` + // Double value of the metric being logged. + Value types.Float64 `tfsdk:"value" tf:""` +} + +func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogMetric_SdkV2) { +} + +func (newState *LogMetric_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogMetric_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogMetric_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, LogMetric_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogMetric_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "step": o.Step, + "timestamp": o.Timestamp, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogMetric_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + "step": types.Int64Type, + "timestamp": types.Int64Type, + "value": types.Float64Type, + }, + } +} + +type LogMetricResponse_SdkV2 struct { +} + +func (newState *LogMetricResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogMetricResponse_SdkV2) { +} + +func (newState *LogMetricResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogMetricResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogMetricResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogMetricResponse_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, LogMetricResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogMetricResponse_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 LogMetricResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type LogModel_SdkV2 struct { + // MLmodel file in json format. + ModelJson types.String `tfsdk:"model_json" tf:"optional"` + // ID of the run to log under + RunId types.String `tfsdk:"run_id" tf:"optional"` +} + +func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModel_SdkV2) { +} + +func (newState *LogModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogModel_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogModel_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, LogModel_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogModel_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_json": o.ModelJson, + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogModel_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_json": types.StringType, + "run_id": types.StringType, + }, + } +} + +type LogModelResponse_SdkV2 struct { +} + +func (newState *LogModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogModelResponse_SdkV2) { +} + +func (newState *LogModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogModelResponse_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, LogModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogModelResponse_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 LogModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type LogParam_SdkV2 struct { + // Name of the param. Maximum size is 255 bytes. + Key types.String `tfsdk:"key" tf:""` + // ID of the run under which to log the param. Must be provided. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // [Deprecated, use run_id instead] ID of the run under which to log the + // param. This field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + // String value of the param being logged. Maximum size is 500 bytes. + Value types.String `tfsdk:"value" tf:""` +} + +func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogParam_SdkV2) { +} + +func (newState *LogParam_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogParam_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogParam_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, LogParam_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogParam_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogParam_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + "value": types.StringType, + }, + } +} + +type LogParamResponse_SdkV2 struct { +} + +func (newState *LogParamResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogParamResponse_SdkV2) { +} + +func (newState *LogParamResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogParamResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogParamResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogParamResponse_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, LogParamResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogParamResponse_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 LogParamResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Metric_SdkV2 struct { + // Key identifying this metric. + Key types.String `tfsdk:"key" tf:"optional"` + // Step at which to log the metric. + Step types.Int64 `tfsdk:"step" tf:"optional"` + // The timestamp at which this metric was recorded. + Timestamp types.Int64 `tfsdk:"timestamp" tf:"optional"` + // Value associated with this metric. + Value types.Float64 `tfsdk:"value" tf:"optional"` +} + +func (newState *Metric_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Metric_SdkV2) { +} + +func (newState *Metric_SdkV2) SyncEffectiveFieldsDuringRead(existingState Metric_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Metric. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Metric_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, Metric_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Metric_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "step": o.Step, + "timestamp": o.Timestamp, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Metric_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "step": types.Int64Type, + "timestamp": types.Int64Type, + "value": types.Float64Type, + }, + } +} + +type Model_SdkV2 struct { + // Timestamp recorded when this `registered_model` was created. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Description of this `registered_model`. + Description types.String `tfsdk:"description" tf:"optional"` + // Timestamp recorded when metadata for this `registered_model` was last + // updated. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Collection of latest model versions for each stage. Only contains models + // with current `READY` status. + LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + // Unique name for the model. + Name types.String `tfsdk:"name" tf:"optional"` + // Tags: Additional metadata key-value pairs for this `registered_model`. + Tags types.List `tfsdk:"tags" tf:"optional"` + // User that created this `registered_model` + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *Model_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Model_SdkV2) { +} + +func (newState *Model_SdkV2) SyncEffectiveFieldsDuringRead(existingState Model_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Model. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Model_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "latest_versions": reflect.TypeOf(ModelVersion_SdkV2{}), + "tags": reflect.TypeOf(ModelTag_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, Model_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Model_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "description": o.Description, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "latest_versions": o.LatestVersions, + "name": o.Name, + "tags": o.Tags, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Model_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "description": types.StringType, + "last_updated_timestamp": types.Int64Type, + "latest_versions": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + "name": types.StringType, + "tags": basetypes.ListType{ + ElemType: ModelTag{}.Type(ctx), + }, + "user_id": types.StringType, + }, + } +} + +// GetLatestVersions returns the value of the LatestVersions field in Model_SdkV2 as +// a slice of ModelVersion_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Model_SdkV2) GetLatestVersions(ctx context.Context) ([]ModelVersion_SdkV2, bool) { + if o.LatestVersions.IsNull() || o.LatestVersions.IsUnknown() { + return nil, false + } + var v []ModelVersion_SdkV2 + d := o.LatestVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLatestVersions sets the value of the LatestVersions field in Model_SdkV2. +func (o *Model_SdkV2) SetLatestVersions(ctx context.Context, v []ModelVersion_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["latest_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.LatestVersions = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in Model_SdkV2 as +// a slice of ModelTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Model_SdkV2) GetTags(ctx context.Context) ([]ModelTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in Model_SdkV2. +func (o *Model_SdkV2) SetTags(ctx context.Context, v []ModelTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ModelDatabricks_SdkV2 struct { + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // User-specified description for the object. + Description types.String `tfsdk:"description" tf:"optional"` + // Unique identifier for the object. + Id types.String `tfsdk:"id" tf:"optional"` + // Time of the object at last update, as a Unix timestamp in milliseconds. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Array of model versions, each the latest version for its stage. + LatestVersions types.List `tfsdk:"latest_versions" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:"optional"` + // Permission level of the requesting user on the object. For what is + // allowed at each level, see [MLflow Model permissions](..). + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // Array of tags associated with the model. + Tags types.List `tfsdk:"tags" tf:"optional"` + // The username of the user that created the object. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *ModelDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDatabricks_SdkV2) { +} + +func (newState *ModelDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelDatabricks_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDatabricks. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelDatabricks_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "latest_versions": reflect.TypeOf(ModelVersion_SdkV2{}), + "tags": reflect.TypeOf(ModelTag_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, ModelDatabricks_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelDatabricks_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "description": o.Description, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "latest_versions": o.LatestVersions, + "name": o.Name, + "permission_level": o.PermissionLevel, + "tags": o.Tags, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ModelDatabricks_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "description": types.StringType, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "latest_versions": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + "name": types.StringType, + "permission_level": types.StringType, + "tags": basetypes.ListType{ + ElemType: ModelTag{}.Type(ctx), + }, + "user_id": types.StringType, + }, + } +} + +// GetLatestVersions returns the value of the LatestVersions field in ModelDatabricks_SdkV2 as +// a slice of ModelVersion_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelDatabricks_SdkV2) GetLatestVersions(ctx context.Context) ([]ModelVersion_SdkV2, bool) { + if o.LatestVersions.IsNull() || o.LatestVersions.IsUnknown() { + return nil, false + } + var v []ModelVersion_SdkV2 + d := o.LatestVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLatestVersions sets the value of the LatestVersions field in ModelDatabricks_SdkV2. +func (o *ModelDatabricks_SdkV2) SetLatestVersions(ctx context.Context, v []ModelVersion_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["latest_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.LatestVersions = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ModelDatabricks_SdkV2 as +// a slice of ModelTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelDatabricks_SdkV2) GetTags(ctx context.Context) ([]ModelTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ModelDatabricks_SdkV2. +func (o *ModelDatabricks_SdkV2) SetTags(ctx context.Context, v []ModelTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ModelTag_SdkV2 struct { + // The tag key. + Key types.String `tfsdk:"key" tf:"optional"` + // The tag value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *ModelTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelTag_SdkV2) { +} + +func (newState *ModelTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelTag_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, ModelTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelTag_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 ModelTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type ModelVersion_SdkV2 struct { + // Timestamp recorded when this `model_version` was created. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Current stage for this `model_version`. + CurrentStage types.String `tfsdk:"current_stage" tf:"optional"` + // Description of this `model_version`. + Description types.String `tfsdk:"description" tf:"optional"` + // Timestamp recorded when metadata for this `model_version` was last + // updated. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Unique name of the model + Name types.String `tfsdk:"name" tf:"optional"` + // MLflow run ID used when creating `model_version`, if `source` was + // generated by an experiment run stored in MLflow tracking server. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // Run Link: Direct link to the run that generated this version + RunLink types.String `tfsdk:"run_link" tf:"optional"` + // URI indicating the location of the source model artifacts, used when + // creating `model_version` + Source types.String `tfsdk:"source" tf:"optional"` + // Current status of `model_version` + Status types.String `tfsdk:"status" tf:"optional"` + // Details on current `status`, if it is pending or failed. + StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + // Tags: Additional metadata key-value pairs for this `model_version`. + Tags types.List `tfsdk:"tags" tf:"optional"` + // User that created this `model_version`. + UserId types.String `tfsdk:"user_id" tf:"optional"` + // Model's version number. + Version types.String `tfsdk:"version" tf:"optional"` +} + +func (newState *ModelVersion_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersion_SdkV2) { +} + +func (newState *ModelVersion_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersion_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersion. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelVersion_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ModelVersionTag_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, ModelVersion_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelVersion_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + 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, + "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, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ModelVersion_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, + "last_updated_timestamp": types.Int64Type, + "name": 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), + }, + "user_id": types.StringType, + "version": types.StringType, + }, + } +} + +// GetTags returns the value of the Tags field in ModelVersion_SdkV2 as +// a slice of ModelVersionTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelVersion_SdkV2) GetTags(ctx context.Context) ([]ModelVersionTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelVersionTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ModelVersion_SdkV2. +func (o *ModelVersion_SdkV2) SetTags(ctx context.Context, v []ModelVersionTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ModelVersionDatabricks_SdkV2 struct { + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // 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" tf:"optional"` + // User-specified description for the object. + Description types.String `tfsdk:"description" tf:"optional"` + // Time of the object at last update, as a Unix timestamp in milliseconds. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:"optional"` + // Permission level of the requesting user on the object. For what is + // allowed at each level, see [MLflow Model permissions](..). + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // Unique identifier for the MLflow tracking run associated with the source + // model artifacts. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // URL of the run associated with the model artifacts. This field is set at + // model version creation time only for model versions whose source run is + // from a tracking server that is different from the registry server. + RunLink types.String `tfsdk:"run_link" tf:"optional"` + // URI that indicates the location of the source model artifacts. This is + // used when creating the model version. + Source types.String `tfsdk:"source" tf:"optional"` + // 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" tf:"optional"` + // Details on the current status, for example why registration failed. + StatusMessage types.String `tfsdk:"status_message" tf:"optional"` + // Array of tags that are associated with the model version. + Tags types.List `tfsdk:"tags" tf:"optional"` + // The username of the user that created the object. + UserId types.String `tfsdk:"user_id" tf:"optional"` + // Version of the model. + Version types.String `tfsdk:"version" tf:"optional"` +} + +func (newState *ModelVersionDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionDatabricks_SdkV2) { +} + +func (newState *ModelVersionDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionDatabricks_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionDatabricks. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelVersionDatabricks_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": reflect.TypeOf(ModelVersionTag_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, ModelVersionDatabricks_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelVersionDatabricks_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + 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, + }) +} + +// Type implements basetypes.ObjectValuable. +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, + "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, + "tags": basetypes.ListType{ + ElemType: ModelVersionTag{}.Type(ctx), + }, + "user_id": types.StringType, + "version": types.StringType, + }, + } +} + +// 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. +func (o *ModelVersionDatabricks_SdkV2) GetTags(ctx context.Context) ([]ModelVersionTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []ModelVersionTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ModelVersionDatabricks_SdkV2. +func (o *ModelVersionDatabricks_SdkV2) SetTags(ctx context.Context, v []ModelVersionTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ModelVersionTag_SdkV2 struct { + // The tag key. + Key types.String `tfsdk:"key" tf:"optional"` + // The tag value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *ModelVersionTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelVersionTag_SdkV2) { +} + +func (newState *ModelVersionTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelVersionTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelVersionTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelVersionTag_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, ModelVersionTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelVersionTag_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 ModelVersionTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type Param_SdkV2 struct { + // Key identifying this param. + Key types.String `tfsdk:"key" tf:"optional"` + // Value associated with this param. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *Param_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Param_SdkV2) { +} + +func (newState *Param_SdkV2) SyncEffectiveFieldsDuringRead(existingState Param_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Param. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Param_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, Param_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Param_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 Param_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type RegisteredModelAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *RegisteredModelAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlRequest_SdkV2) { +} + +func (newState *RegisteredModelAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelAccessControlRequest_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, RegisteredModelAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type RegisteredModelAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *RegisteredModelAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelAccessControlResponse_SdkV2) { +} + +func (newState *RegisteredModelAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(RegisteredModelPermission_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, RegisteredModelAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: RegisteredModelPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in RegisteredModelAccessControlResponse_SdkV2 as +// a slice of RegisteredModelPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegisteredModelAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]RegisteredModelPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []RegisteredModelPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in RegisteredModelAccessControlResponse_SdkV2. +func (o *RegisteredModelAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []RegisteredModelPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type RegisteredModelPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *RegisteredModelPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermission_SdkV2) { +} + +func (newState *RegisteredModelPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, RegisteredModelPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in RegisteredModelPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegisteredModelPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in RegisteredModelPermission_SdkV2. +func (o *RegisteredModelPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type RegisteredModelPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *RegisteredModelPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissions_SdkV2) { +} + +func (newState *RegisteredModelPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(RegisteredModelAccessControlResponse_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, RegisteredModelPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: RegisteredModelAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in RegisteredModelPermissions_SdkV2 as +// a slice of RegisteredModelAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegisteredModelPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]RegisteredModelAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []RegisteredModelAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in RegisteredModelPermissions_SdkV2. +func (o *RegisteredModelPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []RegisteredModelAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type RegisteredModelPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *RegisteredModelPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegisteredModelPermissionsDescription_SdkV2) { +} + +func (newState *RegisteredModelPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegisteredModelPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelPermissionsDescription_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, RegisteredModelPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type RegisteredModelPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // 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) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegisteredModelPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegisteredModelPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(RegisteredModelAccessControlRequest_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, RegisteredModelPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "registered_model_id": o.RegisteredModelId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegisteredModelPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: RegisteredModelAccessControlRequest{}.Type(ctx), + }, + "registered_model_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in RegisteredModelPermissionsRequest_SdkV2 as +// a slice of RegisteredModelAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegisteredModelPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]RegisteredModelAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []RegisteredModelAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in RegisteredModelPermissionsRequest_SdkV2. +func (o *RegisteredModelPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []RegisteredModelAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type RegistryWebhook_SdkV2 struct { + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // User-specified description for the webhook. + Description types.String `tfsdk:"description" tf:"optional"` + // Events that can trigger a registry 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. + Events types.List `tfsdk:"events" tf:"optional"` + + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + // Webhook ID + Id types.String `tfsdk:"id" tf:"optional"` + + JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + // Time of the object at last update, as a Unix timestamp in milliseconds. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // Name of the model whose events would trigger this webhook. + ModelName types.String `tfsdk:"model_name" tf:"optional"` + // 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" tf:"optional"` +} + +func (newState *RegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RegistryWebhook_SdkV2) { +} + +func (newState *RegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState RegistryWebhook_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RegistryWebhook. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RegistryWebhook_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": reflect.TypeOf(types.String{}), + "http_url_spec": reflect.TypeOf(HttpUrlSpecWithoutSecret_SdkV2{}), + "job_spec": reflect.TypeOf(JobSpecWithoutSecret_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, RegistryWebhook_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RegistryWebhook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "description": o.Description, + "events": o.Events, + "http_url_spec": o.HttpUrlSpec, + "id": o.Id, + "job_spec": o.JobSpec, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "model_name": o.ModelName, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "description": types.StringType, + "events": basetypes.ListType{ + ElemType: types.StringType, + }, + "http_url_spec": basetypes.ListType{ + ElemType: HttpUrlSpecWithoutSecret{}.Type(ctx), + }, + "id": types.StringType, + "job_spec": basetypes.ListType{ + ElemType: JobSpecWithoutSecret{}.Type(ctx), + }, + "last_updated_timestamp": types.Int64Type, + "model_name": types.StringType, + "status": types.StringType, + }, + } +} + +// GetEvents returns the value of the Events field in RegistryWebhook_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RegistryWebhook_SdkV2) GetEvents(ctx context.Context) ([]types.String, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in RegistryWebhook_SdkV2. +func (o *RegistryWebhook_SdkV2) SetEvents(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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +// GetHttpUrlSpec returns the value of the HttpUrlSpec field in RegistryWebhook_SdkV2 as +// a HttpUrlSpecWithoutSecret_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RegistryWebhook_SdkV2) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpecWithoutSecret_SdkV2, bool) { + var e HttpUrlSpecWithoutSecret_SdkV2 + if o.HttpUrlSpec.IsNull() || o.HttpUrlSpec.IsUnknown() { + return e, false + } + var v []HttpUrlSpecWithoutSecret_SdkV2 + d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHttpUrlSpec sets the value of the HttpUrlSpec field in RegistryWebhook_SdkV2. +func (o *RegistryWebhook_SdkV2) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpecWithoutSecret_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] + o.HttpUrlSpec = types.ListValueMust(t, vs) +} + +// GetJobSpec returns the value of the JobSpec field in RegistryWebhook_SdkV2 as +// a JobSpecWithoutSecret_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RegistryWebhook_SdkV2) GetJobSpec(ctx context.Context) (JobSpecWithoutSecret_SdkV2, bool) { + var e JobSpecWithoutSecret_SdkV2 + if o.JobSpec.IsNull() || o.JobSpec.IsUnknown() { + return e, false + } + var v []JobSpecWithoutSecret_SdkV2 + d := o.JobSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetJobSpec sets the value of the JobSpec field in RegistryWebhook_SdkV2. +func (o *RegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpecWithoutSecret_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] + o.JobSpec = types.ListValueMust(t, vs) +} + +type RejectTransitionRequest_SdkV2 struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:""` + // Target stage of the transition. Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + Stage types.String `tfsdk:"stage" tf:""` + // Version of the model. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequest_SdkV2) { +} + +func (newState *RejectTransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RejectTransitionRequest_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, RejectTransitionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RejectTransitionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RejectTransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "stage": types.StringType, + "version": types.StringType, + }, + } +} + +type RejectTransitionRequestResponse_SdkV2 struct { + // Activity recorded for the action. + Activity types.List `tfsdk:"activity" tf:"optional,object"` +} + +func (newState *RejectTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequestResponse_SdkV2) { +} + +func (newState *RejectTransitionRequestResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RejectTransitionRequestResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RejectTransitionRequestResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RejectTransitionRequestResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, RejectTransitionRequestResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RejectTransitionRequestResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activity": o.Activity, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RejectTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activity": basetypes.ListType{ + ElemType: Activity{}.Type(ctx), + }, + }, + } +} + +// GetActivity returns the value of the Activity field in RejectTransitionRequestResponse_SdkV2 as +// a Activity_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RejectTransitionRequestResponse_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 RejectTransitionRequestResponse_SdkV2. +func (o *RejectTransitionRequestResponse_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 RenameModelRequest_SdkV2 struct { + // Registered model unique name identifier. + Name types.String `tfsdk:"name" tf:""` + // If provided, updates the name for this `registered_model`. + NewName types.String `tfsdk:"new_name" tf:"optional"` +} + +func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelRequest_SdkV2) { +} + +func (newState *RenameModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RenameModelRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RenameModelRequest_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, RenameModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RenameModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "new_name": o.NewName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RenameModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "new_name": types.StringType, + }, + } +} + +type RenameModelResponse_SdkV2 struct { + RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` +} + +func (newState *RenameModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelResponse_SdkV2) { +} + +func (newState *RenameModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RenameModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RenameModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RenameModelResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) 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 +// interfere with how the plugin framework retrieves and sets values in state. Thus, RenameModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RenameModelResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RenameModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "registered_model": basetypes.ListType{ + ElemType: Model{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModel returns the value of the RegisteredModel field in RenameModelResponse_SdkV2 as +// a Model_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RenameModelResponse_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 RenameModelResponse_SdkV2. +func (o *RenameModelResponse_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 RestoreExperiment_SdkV2 struct { + // ID of the associated experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` +} + +func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreExperiment_SdkV2) { +} + +func (newState *RestoreExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreExperiment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreExperiment_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, RestoreExperiment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreExperiment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreExperiment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + }, + } +} + +type RestoreExperimentResponse_SdkV2 struct { +} + +func (newState *RestoreExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreExperimentResponse_SdkV2) { +} + +func (newState *RestoreExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreExperimentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreExperimentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreExperimentResponse_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, RestoreExperimentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreExperimentResponse_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 RestoreExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RestoreRun_SdkV2 struct { + // ID of the run to restore. + RunId types.String `tfsdk:"run_id" tf:""` +} + +func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRun_SdkV2) { +} + +func (newState *RestoreRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreRun_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, RestoreRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_id": o.RunId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_id": types.StringType, + }, + } +} + +type RestoreRunResponse_SdkV2 struct { +} + +func (newState *RestoreRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRunResponse_SdkV2) { +} + +func (newState *RestoreRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreRunResponse_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, RestoreRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreRunResponse_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 RestoreRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RestoreRuns_SdkV2 struct { + // The ID of the experiment containing the runs to restore. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` + // An optional positive integer indicating the maximum number of runs to + // restore. The maximum allowed value for max_runs is 10000. + MaxRuns types.Int64 `tfsdk:"max_runs" tf:"optional"` + // The minimum deletion timestamp in milliseconds since the UNIX epoch for + // restoring runs. Only runs deleted no earlier than this timestamp are + // restored. + MinTimestampMillis types.Int64 `tfsdk:"min_timestamp_millis" tf:""` +} + +func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRuns_SdkV2) { +} + +func (newState *RestoreRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRuns_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreRuns_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, RestoreRuns_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreRuns_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "max_runs": o.MaxRuns, + "min_timestamp_millis": o.MinTimestampMillis, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreRuns_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + "max_runs": types.Int64Type, + "min_timestamp_millis": types.Int64Type, + }, + } +} + +type RestoreRunsResponse_SdkV2 struct { + // The number of runs restored. + RunsRestored types.Int64 `tfsdk:"runs_restored" tf:"optional"` +} + +func (newState *RestoreRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreRunsResponse_SdkV2) { +} + +func (newState *RestoreRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreRunsResponse_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, RestoreRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreRunsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "runs_restored": o.RunsRestored, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "runs_restored": types.Int64Type, + }, + } +} + +type Run_SdkV2 struct { + // Run data. + Data types.List `tfsdk:"data" tf:"optional,object"` + // Run metadata. + Info types.List `tfsdk:"info" tf:"optional,object"` + // Run inputs. + Inputs types.List `tfsdk:"inputs" tf:"optional,object"` +} + +func (newState *Run_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run_SdkV2) { +} + +func (newState *Run_SdkV2) SyncEffectiveFieldsDuringRead(existingState Run_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Run. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Run_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data": reflect.TypeOf(RunData_SdkV2{}), + "info": reflect.TypeOf(RunInfo_SdkV2{}), + "inputs": reflect.TypeOf(RunInputs_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, Run_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Run_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data": o.Data, + "info": o.Info, + "inputs": o.Inputs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Run_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data": basetypes.ListType{ + ElemType: RunData{}.Type(ctx), + }, + "info": basetypes.ListType{ + ElemType: RunInfo{}.Type(ctx), + }, + "inputs": basetypes.ListType{ + ElemType: RunInputs{}.Type(ctx), + }, + }, + } +} + +// GetData returns the value of the Data field in Run_SdkV2 as +// a RunData_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetData(ctx context.Context) (RunData_SdkV2, bool) { + var e RunData_SdkV2 + if o.Data.IsNull() || o.Data.IsUnknown() { + return e, false + } + var v []RunData_SdkV2 + d := o.Data.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetData sets the value of the Data field in Run_SdkV2. +func (o *Run_SdkV2) SetData(ctx context.Context, v RunData_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data"] + o.Data = types.ListValueMust(t, vs) +} + +// GetInfo returns the value of the Info field in Run_SdkV2 as +// a RunInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetInfo(ctx context.Context) (RunInfo_SdkV2, bool) { + var e RunInfo_SdkV2 + if o.Info.IsNull() || o.Info.IsUnknown() { + return e, false + } + var v []RunInfo_SdkV2 + d := o.Info.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInfo sets the value of the Info field in Run_SdkV2. +func (o *Run_SdkV2) SetInfo(ctx context.Context, v RunInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["info"] + o.Info = types.ListValueMust(t, vs) +} + +// GetInputs returns the value of the Inputs field in Run_SdkV2 as +// a RunInputs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Run_SdkV2) GetInputs(ctx context.Context) (RunInputs_SdkV2, bool) { + var e RunInputs_SdkV2 + if o.Inputs.IsNull() || o.Inputs.IsUnknown() { + return e, false + } + var v []RunInputs_SdkV2 + d := o.Inputs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInputs sets the value of the Inputs field in Run_SdkV2. +func (o *Run_SdkV2) SetInputs(ctx context.Context, v RunInputs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inputs"] + o.Inputs = types.ListValueMust(t, vs) +} + +type RunData_SdkV2 struct { + // Run metrics. + Metrics types.List `tfsdk:"metrics" tf:"optional"` + // Run parameters. + Params types.List `tfsdk:"params" tf:"optional"` + // Additional metadata key-value pairs. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *RunData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunData_SdkV2) { +} + +func (newState *RunData_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunData_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunData. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunData_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "metrics": reflect.TypeOf(Metric_SdkV2{}), + "params": reflect.TypeOf(Param_SdkV2{}), + "tags": reflect.TypeOf(RunTag_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, RunData_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunData_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "metrics": o.Metrics, + "params": o.Params, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunData_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "metrics": basetypes.ListType{ + ElemType: Metric{}.Type(ctx), + }, + "params": basetypes.ListType{ + ElemType: Param{}.Type(ctx), + }, + "tags": basetypes.ListType{ + ElemType: RunTag{}.Type(ctx), + }, + }, + } +} + +// GetMetrics returns the value of the Metrics field in RunData_SdkV2 as +// a slice of Metric_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunData_SdkV2) GetMetrics(ctx context.Context) ([]Metric_SdkV2, bool) { + if o.Metrics.IsNull() || o.Metrics.IsUnknown() { + return nil, false + } + var v []Metric_SdkV2 + d := o.Metrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMetrics sets the value of the Metrics field in RunData_SdkV2. +func (o *RunData_SdkV2) SetMetrics(ctx context.Context, v []Metric_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["metrics"] + t = t.(attr.TypeWithElementType).ElementType() + o.Metrics = types.ListValueMust(t, vs) +} + +// GetParams returns the value of the Params field in RunData_SdkV2 as +// a slice of Param_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunData_SdkV2) GetParams(ctx context.Context) ([]Param_SdkV2, bool) { + if o.Params.IsNull() || o.Params.IsUnknown() { + return nil, false + } + var v []Param_SdkV2 + d := o.Params.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParams sets the value of the Params field in RunData_SdkV2. +func (o *RunData_SdkV2) SetParams(ctx context.Context, v []Param_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["params"] + t = t.(attr.TypeWithElementType).ElementType() + o.Params = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in RunData_SdkV2 as +// a slice of RunTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunData_SdkV2) GetTags(ctx context.Context) ([]RunTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []RunTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in RunData_SdkV2. +func (o *RunData_SdkV2) SetTags(ctx context.Context, v []RunTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type RunInfo_SdkV2 struct { + // URI of the directory where artifacts should be uploaded. This can be a + // local path (starting with "/"), or a distributed file system (DFS) path, + // like `s3://bucket/directory` or `dbfs:/my/directory`. If not set, the + // local `./mlruns` directory is chosen. + ArtifactUri types.String `tfsdk:"artifact_uri" tf:"optional"` + // Unix timestamp of when the run ended in milliseconds. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // The experiment ID. + ExperimentId types.String `tfsdk:"experiment_id" tf:"optional"` + // Current life cycle stage of the experiment : OneOf("active", "deleted") + LifecycleStage types.String `tfsdk:"lifecycle_stage" tf:"optional"` + // Unique identifier for the run. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // [Deprecated, use run_id instead] Unique identifier for the run. This + // field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + // Unix timestamp of when the run started in milliseconds. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // Current status of the run. + Status types.String `tfsdk:"status" tf:"optional"` + // User who initiated the run. This field is deprecated as of MLflow 1.0, + // and will be removed in a future MLflow release. Use 'mlflow.user' tag + // instead. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *RunInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInfo_SdkV2) { +} + +func (newState *RunInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunInfo_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, RunInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "artifact_uri": o.ArtifactUri, + "end_time": o.EndTime, + "experiment_id": o.ExperimentId, + "lifecycle_stage": o.LifecycleStage, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "start_time": o.StartTime, + "status": o.Status, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "artifact_uri": types.StringType, + "end_time": types.Int64Type, + "experiment_id": types.StringType, + "lifecycle_stage": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + "start_time": types.Int64Type, + "status": types.StringType, + "user_id": types.StringType, + }, + } +} + +type RunInputs_SdkV2 struct { + // Run metrics. + DatasetInputs types.List `tfsdk:"dataset_inputs" tf:"optional"` +} + +func (newState *RunInputs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunInputs_SdkV2) { +} + +func (newState *RunInputs_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunInputs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunInputs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunInputs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dataset_inputs": reflect.TypeOf(DatasetInput_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, RunInputs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunInputs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dataset_inputs": o.DatasetInputs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RunInputs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dataset_inputs": basetypes.ListType{ + ElemType: DatasetInput{}.Type(ctx), + }, + }, + } +} + +// GetDatasetInputs returns the value of the DatasetInputs field in RunInputs_SdkV2 as +// a slice of DatasetInput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RunInputs_SdkV2) GetDatasetInputs(ctx context.Context) ([]DatasetInput_SdkV2, bool) { + if o.DatasetInputs.IsNull() || o.DatasetInputs.IsUnknown() { + return nil, false + } + var v []DatasetInput_SdkV2 + d := o.DatasetInputs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDatasetInputs sets the value of the DatasetInputs field in RunInputs_SdkV2. +func (o *RunInputs_SdkV2) SetDatasetInputs(ctx context.Context, v []DatasetInput_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["dataset_inputs"] + t = t.(attr.TypeWithElementType).ElementType() + o.DatasetInputs = types.ListValueMust(t, vs) +} + +type RunTag_SdkV2 struct { + // The tag key. + Key types.String `tfsdk:"key" tf:"optional"` + // The tag value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *RunTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RunTag_SdkV2) { +} + +func (newState *RunTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RunTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RunTag_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, RunTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RunTag_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 RunTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type SearchExperiments_SdkV2 struct { + // String representing a SQL filter condition (e.g. "name ILIKE + // 'my-experiment%'") + Filter types.String `tfsdk:"filter" tf:"optional"` + // Maximum number of experiments desired. Max threshold is 3000. + MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + // List of columns for ordering search results, which can include experiment + // name and last updated timestamp with an optional "DESC" or "ASC" + // annotation, where "ASC" is the default. Tiebreaks are done by experiment + // id DESC. + OrderBy types.List `tfsdk:"order_by" tf:"optional"` + // Token indicating the page of experiments to fetch + PageToken types.String `tfsdk:"page_token" tf:"optional"` + // Qualifier for type of experiments to be returned. If unspecified, return + // only active experiments. + ViewType types.String `tfsdk:"view_type" tf:"optional"` +} + +func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperiments_SdkV2) { +} + +func (newState *SearchExperiments_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchExperiments_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchExperiments_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "order_by": 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, SearchExperiments_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchExperiments_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + "view_type": o.ViewType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchExperiments_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + "view_type": types.StringType, + }, + } +} + +// GetOrderBy returns the value of the OrderBy field in SearchExperiments_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchExperiments_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in SearchExperiments_SdkV2. +func (o *SearchExperiments_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type SearchExperimentsResponse_SdkV2 struct { + // Experiments that match the search criteria + Experiments types.List `tfsdk:"experiments" tf:"optional"` + // Token that can be used to retrieve the next page of experiments. An empty + // token means that no more experiments are available for retrieval. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *SearchExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchExperimentsResponse_SdkV2) { +} + +func (newState *SearchExperimentsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchExperimentsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchExperimentsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchExperimentsResponse_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, SearchExperimentsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchExperimentsResponse_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 SearchExperimentsResponse_SdkV2) 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 SearchExperimentsResponse_SdkV2 as +// a slice of Experiment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchExperimentsResponse_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 SearchExperimentsResponse_SdkV2. +func (o *SearchExperimentsResponse_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) +} + +// Searches model versions +type SearchModelVersionsRequest_SdkV2 struct { + // String filter condition, like "name='my-model-name'". Must be a single + // boolean condition, with string values wrapped in single quotes. + Filter types.String `tfsdk:"-"` + // Maximum number of models desired. Max threshold is 10K. + MaxResults types.Int64 `tfsdk:"-"` + // List of columns to be ordered by including model name, version, stage + // with an optional "DESC" or "ASC" annotation, where "ASC" is the default. + // Tiebreaks are done by latest stage transition timestamp, followed by name + // ASC, followed by version DESC. + OrderBy types.List `tfsdk:"-"` + // Pagination token to go to next page based on previous search query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *SearchModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsRequest_SdkV2) { +} + +func (newState *SearchModelVersionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchModelVersionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "order_by": 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, SearchModelVersionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchModelVersionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchModelVersionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + }, + } +} + +// GetOrderBy returns the value of the OrderBy field in SearchModelVersionsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchModelVersionsRequest_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in SearchModelVersionsRequest_SdkV2. +func (o *SearchModelVersionsRequest_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type SearchModelVersionsResponse_SdkV2 struct { + // Models that match the search criteria + ModelVersions types.List `tfsdk:"model_versions" tf:"optional"` + // Pagination token to request next page of models for the same search + // query. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *SearchModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelVersionsResponse_SdkV2) { +} + +func (newState *SearchModelVersionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelVersionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelVersionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchModelVersionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "model_versions": reflect.TypeOf(ModelVersion_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, SearchModelVersionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchModelVersionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_versions": o.ModelVersions, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchModelVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_versions": basetypes.ListType{ + ElemType: ModelVersion{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetModelVersions returns the value of the ModelVersions field in SearchModelVersionsResponse_SdkV2 as +// a slice of ModelVersion_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchModelVersionsResponse_SdkV2) GetModelVersions(ctx context.Context) ([]ModelVersion_SdkV2, bool) { + if o.ModelVersions.IsNull() || o.ModelVersions.IsUnknown() { + return nil, false + } + var v []ModelVersion_SdkV2 + d := o.ModelVersions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetModelVersions sets the value of the ModelVersions field in SearchModelVersionsResponse_SdkV2. +func (o *SearchModelVersionsResponse_SdkV2) SetModelVersions(ctx context.Context, v []ModelVersion_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["model_versions"] + t = t.(attr.TypeWithElementType).ElementType() + o.ModelVersions = types.ListValueMust(t, vs) +} + +// Search models +type SearchModelsRequest_SdkV2 struct { + // String filter condition, like "name LIKE 'my-model-name'". Interpreted in + // the backend automatically as "name LIKE '%my-model-name%'". Single + // boolean condition, with string values wrapped in single quotes. + Filter types.String `tfsdk:"-"` + // Maximum number of models desired. Default is 100. Max threshold is 1000. + MaxResults types.Int64 `tfsdk:"-"` + // List of columns for ordering search results, which can include model name + // and last updated timestamp with an optional "DESC" or "ASC" annotation, + // where "ASC" is the default. Tiebreaks are done by model name ASC. + OrderBy types.List `tfsdk:"-"` + // Pagination token to go to the next page based on a previous search query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *SearchModelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsRequest_SdkV2) { +} + +func (newState *SearchModelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchModelsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "order_by": 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, SearchModelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchModelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchModelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + }, + } +} + +// GetOrderBy returns the value of the OrderBy field in SearchModelsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchModelsRequest_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in SearchModelsRequest_SdkV2. +func (o *SearchModelsRequest_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type SearchModelsResponse_SdkV2 struct { + // Pagination token to request the next page of models. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Registered Models that match the search criteria. + RegisteredModels types.List `tfsdk:"registered_models" tf:"optional"` +} + +func (newState *SearchModelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchModelsResponse_SdkV2) { +} + +func (newState *SearchModelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchModelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchModelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchModelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "registered_models": reflect.TypeOf(Model_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, SearchModelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchModelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchModelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "registered_models": basetypes.ListType{ + ElemType: Model{}.Type(ctx), + }, + }, + } +} + +// GetRegisteredModels returns the value of the RegisteredModels field in SearchModelsResponse_SdkV2 as +// a slice of Model_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchModelsResponse_SdkV2) GetRegisteredModels(ctx context.Context) ([]Model_SdkV2, bool) { + if o.RegisteredModels.IsNull() || o.RegisteredModels.IsUnknown() { + return nil, false + } + var v []Model_SdkV2 + d := o.RegisteredModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRegisteredModels sets the value of the RegisteredModels field in SearchModelsResponse_SdkV2. +func (o *SearchModelsResponse_SdkV2) SetRegisteredModels(ctx context.Context, v []Model_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["registered_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.RegisteredModels = types.ListValueMust(t, vs) +} + +type SearchRuns_SdkV2 struct { + // List of experiment IDs to search over. + ExperimentIds types.List `tfsdk:"experiment_ids" tf:"optional"` + // A filter expression over params, metrics, and tags, that allows returning + // a subset of runs. The syntax is a subset of SQL that supports ANDing + // together binary operations between a param, metric, or tag and a + // constant. + // + // Example: `metrics.rmse < 1 and params.model_class = 'LogisticRegression'` + // + // You can select columns with special characters (hyphen, space, period, + // etc.) by using double quotes: `metrics."model class" = 'LinearRegression' + // and tags."user-name" = 'Tomas'` + // + // Supported operators are `=`, `!=`, `>`, `>=`, `<`, and `<=`. + Filter types.String `tfsdk:"filter" tf:"optional"` + // Maximum number of runs desired. Max threshold is 50000 + MaxResults types.Int64 `tfsdk:"max_results" tf:"optional"` + // List of columns to be ordered by, including attributes, params, metrics, + // and tags with an optional "DESC" or "ASC" annotation, where "ASC" is the + // default. Example: ["params.input DESC", "metrics.alpha ASC", + // "metrics.rmse"] Tiebreaks are done by start_time DESC followed by run_id + // for runs with the same start time (and this is the default ordering + // criterion if order_by is not provided). + OrderBy types.List `tfsdk:"order_by" tf:"optional"` + // Token for the current page of runs. + PageToken types.String `tfsdk:"page_token" tf:"optional"` + // Whether to display only active, only deleted, or all runs. Defaults to + // only active runs. + RunViewType types.String `tfsdk:"run_view_type" tf:"optional"` +} + +func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRuns_SdkV2) { +} + +func (newState *SearchRuns_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchRuns_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchRuns_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "experiment_ids": reflect.TypeOf(types.String{}), + "order_by": 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, SearchRuns_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchRuns_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_ids": o.ExperimentIds, + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + "run_view_type": o.RunViewType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchRuns_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + "run_view_type": types.StringType, + }, + } +} + +// GetExperimentIds returns the value of the ExperimentIds field in SearchRuns_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchRuns_SdkV2) GetExperimentIds(ctx context.Context) ([]types.String, bool) { + if o.ExperimentIds.IsNull() || o.ExperimentIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ExperimentIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExperimentIds sets the value of the ExperimentIds field in SearchRuns_SdkV2. +func (o *SearchRuns_SdkV2) SetExperimentIds(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["experiment_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExperimentIds = types.ListValueMust(t, vs) +} + +// GetOrderBy returns the value of the OrderBy field in SearchRuns_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchRuns_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in SearchRuns_SdkV2. +func (o *SearchRuns_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type SearchRunsResponse_SdkV2 struct { + // Token for the next page of runs. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Runs that match the search criteria. + Runs types.List `tfsdk:"runs" tf:"optional"` +} + +func (newState *SearchRunsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SearchRunsResponse_SdkV2) { +} + +func (newState *SearchRunsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SearchRunsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SearchRunsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SearchRunsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "runs": reflect.TypeOf(Run_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, SearchRunsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SearchRunsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "runs": o.Runs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SearchRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "runs": basetypes.ListType{ + ElemType: Run{}.Type(ctx), + }, + }, + } +} + +// GetRuns returns the value of the Runs field in SearchRunsResponse_SdkV2 as +// a slice of Run_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SearchRunsResponse_SdkV2) GetRuns(ctx context.Context) ([]Run_SdkV2, bool) { + if o.Runs.IsNull() || o.Runs.IsUnknown() { + return nil, false + } + var v []Run_SdkV2 + d := o.Runs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRuns sets the value of the Runs field in SearchRunsResponse_SdkV2. +func (o *SearchRunsResponse_SdkV2) SetRuns(ctx context.Context, v []Run_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["runs"] + t = t.(attr.TypeWithElementType).ElementType() + o.Runs = types.ListValueMust(t, vs) +} + +type SetExperimentTag_SdkV2 struct { + // ID of the experiment under which to log the tag. Must be provided. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` + // Name of the tag. Maximum size depends on storage backend. All storage + // backends are guaranteed to support key values up to 250 bytes in size. + Key types.String `tfsdk:"key" tf:""` + // String value of the tag being logged. Maximum size depends on storage + // backend. All storage backends are guaranteed to support key values up to + // 5000 bytes in size. + Value types.String `tfsdk:"value" tf:""` +} + +func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetExperimentTag_SdkV2) { +} + +func (newState *SetExperimentTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetExperimentTag_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetExperimentTag_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, SetExperimentTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetExperimentTag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "key": o.Key, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetExperimentTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type SetExperimentTagResponse_SdkV2 struct { +} + +func (newState *SetExperimentTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetExperimentTagResponse_SdkV2) { +} + +func (newState *SetExperimentTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetExperimentTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetExperimentTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetExperimentTagResponse_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, SetExperimentTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetExperimentTagResponse_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 SetExperimentTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type SetModelTagRequest_SdkV2 struct { + // Name of the tag. Maximum size depends on storage backend. If a tag with + // this name already exists, its preexisting value will be replaced by the + // specified `value`. All storage backends are guaranteed to support key + // values up to 250 bytes in size. + Key types.String `tfsdk:"key" tf:""` + // Unique name of the model. + Name types.String `tfsdk:"name" tf:""` + // String value of the tag being logged. Maximum size depends on storage + // backend. All storage backends are guaranteed to support key values up to + // 5000 bytes in size. + Value types.String `tfsdk:"value" tf:""` +} + +func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelTagRequest_SdkV2) { +} + +func (newState *SetModelTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelTagRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetModelTagRequest_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, SetModelTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetModelTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetModelTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "name": types.StringType, + "value": types.StringType, + }, + } +} + +type SetModelTagResponse_SdkV2 struct { +} + +func (newState *SetModelTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelTagResponse_SdkV2) { +} + +func (newState *SetModelTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetModelTagResponse_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, SetModelTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetModelTagResponse_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 SetModelTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type SetModelVersionTagRequest_SdkV2 struct { + // Name of the tag. Maximum size depends on storage backend. If a tag with + // this name already exists, its preexisting value will be replaced by the + // specified `value`. All storage backends are guaranteed to support key + // values up to 250 bytes in size. + Key types.String `tfsdk:"key" tf:""` + // Unique name of the model. + Name types.String `tfsdk:"name" tf:""` + // String value of the tag being logged. Maximum size depends on storage + // backend. All storage backends are guaranteed to support key values up to + // 5000 bytes in size. + Value types.String `tfsdk:"value" tf:""` + // Model version number. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelVersionTagRequest_SdkV2) { +} + +func (newState *SetModelVersionTagRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetModelVersionTagRequest_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, SetModelVersionTagRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetModelVersionTagRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "value": o.Value, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetModelVersionTagRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "name": types.StringType, + "value": types.StringType, + "version": types.StringType, + }, + } +} + +type SetModelVersionTagResponse_SdkV2 struct { +} + +func (newState *SetModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetModelVersionTagResponse_SdkV2) { +} + +func (newState *SetModelVersionTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetModelVersionTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetModelVersionTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetModelVersionTagResponse_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, SetModelVersionTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetModelVersionTagResponse_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 SetModelVersionTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type SetTag_SdkV2 struct { + // Name of the tag. Maximum size depends on storage backend. All storage + // backends are guaranteed to support key values up to 250 bytes in size. + Key types.String `tfsdk:"key" tf:""` + // ID of the run under which to log the tag. Must be provided. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // [Deprecated, use run_id instead] ID of the run under which to log the + // tag. This field will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + // String value of the tag being logged. Maximum size depends on storage + // backend. All storage backends are guaranteed to support key values up to + // 5000 bytes in size. + Value types.String `tfsdk:"value" tf:""` +} + +func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTag_SdkV2) { +} + +func (newState *SetTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetTag_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetTag_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, SetTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetTag_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "run_id": types.StringType, + "run_uuid": types.StringType, + "value": types.StringType, + }, + } +} + +type SetTagResponse_SdkV2 struct { +} + +func (newState *SetTagResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetTagResponse_SdkV2) { +} + +func (newState *SetTagResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetTagResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetTagResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetTagResponse_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, SetTagResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetTagResponse_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 SetTagResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Test webhook response object. +type TestRegistryWebhook_SdkV2 struct { + // Body of the response from the webhook URL + Body types.String `tfsdk:"body" tf:"optional"` + // Status code returned by the webhook URL + StatusCode types.Int64 `tfsdk:"status_code" tf:"optional"` +} + +func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhook_SdkV2) { +} + +func (newState *TestRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhook_SdkV2) { +} + +// 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, + }, + } +} + +type TestRegistryWebhookRequest_SdkV2 struct { + // If `event` is specified, the test trigger uses the specified event. If + // `event` is not specified, the test trigger uses a randomly chosen event + // associated with the webhook. + Event types.String `tfsdk:"event" tf:"optional"` + // Webhook ID + Id types.String `tfsdk:"id" tf:""` +} + +func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookRequest_SdkV2) { +} + +func (newState *TestRegistryWebhookRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TestRegistryWebhookRequest_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, TestRegistryWebhookRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TestRegistryWebhookRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "event": o.Event, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TestRegistryWebhookRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "event": types.StringType, + "id": types.StringType, + }, + } +} + +type TestRegistryWebhookResponse_SdkV2 struct { + // Test webhook response object. + Webhook types.List `tfsdk:"webhook" tf:"optional,object"` +} + +func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse_SdkV2) { +} + +func (newState *TestRegistryWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TestRegistryWebhookResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TestRegistryWebhookResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, TestRegistryWebhookResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TestRegistryWebhookResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "webhook": o.Webhook, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TestRegistryWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "webhook": basetypes.ListType{ + ElemType: TestRegistryWebhook{}.Type(ctx), + }, + }, + } +} + +// 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) +} + +type TransitionModelVersionStageDatabricks_SdkV2 struct { + // Specifies whether to archive all current model versions in the target + // stage. + ArchiveExistingVersions types.Bool `tfsdk:"archive_existing_versions" tf:""` + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the model. + Name types.String `tfsdk:"name" tf:""` + // Target stage of the transition. Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + Stage types.String `tfsdk:"stage" tf:""` + // Version of the model. + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionModelVersionStageDatabricks_SdkV2) { +} + +func (newState *TransitionModelVersionStageDatabricks_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionModelVersionStageDatabricks_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TransitionModelVersionStageDatabricks_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, TransitionModelVersionStageDatabricks_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TransitionModelVersionStageDatabricks_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "archive_existing_versions": o.ArchiveExistingVersions, + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TransitionModelVersionStageDatabricks_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "archive_existing_versions": types.BoolType, + "comment": types.StringType, + "name": types.StringType, + "stage": types.StringType, + "version": types.StringType, + }, + } +} + +// Transition request details. +type TransitionRequest_SdkV2 struct { + // Array of actions on the activity allowed for the current viewer. + AvailableActions types.List `tfsdk:"available_actions" tf:"optional"` + // User-provided comment associated with the transition request. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Creation time of the object, as a Unix timestamp in milliseconds. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Target stage of the transition (if the activity is stage transition + // related). Valid values are: + // + // * `None`: The initial stage of a model version. + // + // * `Staging`: Staging or pre-production stage. + // + // * `Production`: Production stage. + // + // * `Archived`: Archived stage. + ToStage types.String `tfsdk:"to_stage" tf:"optional"` + // The username of the user that created the object. + UserId types.String `tfsdk:"user_id" tf:"optional"` +} + +func (newState *TransitionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionRequest_SdkV2) { +} + +func (newState *TransitionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TransitionRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "available_actions": 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, TransitionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TransitionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "available_actions": o.AvailableActions, + "comment": o.Comment, + "creation_timestamp": o.CreationTimestamp, + "to_stage": o.ToStage, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TransitionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "available_actions": basetypes.ListType{ + ElemType: types.StringType, + }, + "comment": types.StringType, + "creation_timestamp": types.Int64Type, + "to_stage": types.StringType, + "user_id": types.StringType, + }, + } +} + +// GetAvailableActions returns the value of the AvailableActions field in TransitionRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TransitionRequest_SdkV2) GetAvailableActions(ctx context.Context) ([]types.String, bool) { + if o.AvailableActions.IsNull() || o.AvailableActions.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AvailableActions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAvailableActions sets the value of the AvailableActions field in TransitionRequest_SdkV2. +func (o *TransitionRequest_SdkV2) SetAvailableActions(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["available_actions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AvailableActions = types.ListValueMust(t, vs) +} + +type TransitionStageResponse_SdkV2 struct { + ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` +} + +func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse_SdkV2) { +} + +func (newState *TransitionStageResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransitionStageResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TransitionStageResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// 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{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, TransitionStageResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TransitionStageResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TransitionStageResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_version": basetypes.ListType{ + ElemType: ModelVersionDatabricks{}.Type(ctx), + }, + }, + } +} + +// GetModelVersion returns the value of the ModelVersion 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) { + var e ModelVersionDatabricks_SdkV2 + if o.ModelVersion.IsNull() || o.ModelVersion.IsUnknown() { + return e, false + } + var v []ModelVersionDatabricks_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 TransitionStageResponse_SdkV2. +func (o *TransitionStageResponse_SdkV2) SetModelVersion(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) +} + +type UpdateComment_SdkV2 struct { + // User-provided comment on the action. + Comment types.String `tfsdk:"comment" tf:""` + // Unique identifier of an activity + Id types.String `tfsdk:"id" tf:""` +} + +func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComment_SdkV2) { +} + +func (newState *UpdateComment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateComment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateComment_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, UpdateComment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateComment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateComment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "id": types.StringType, + }, + } +} + +type UpdateCommentResponse_SdkV2 struct { + // Comment details. + Comment types.List `tfsdk:"comment" tf:"optional,object"` +} + +func (newState *UpdateCommentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCommentResponse_SdkV2) { +} + +func (newState *UpdateCommentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCommentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCommentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCommentResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "comment": reflect.TypeOf(CommentObject_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, UpdateCommentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCommentResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCommentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": basetypes.ListType{ + ElemType: CommentObject{}.Type(ctx), + }, + }, + } +} + +// GetComment returns the value of the Comment field in UpdateCommentResponse_SdkV2 as +// a CommentObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCommentResponse_SdkV2) GetComment(ctx context.Context) (CommentObject_SdkV2, bool) { + var e CommentObject_SdkV2 + if o.Comment.IsNull() || o.Comment.IsUnknown() { + return e, false + } + var v []CommentObject_SdkV2 + d := o.Comment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetComment sets the value of the Comment field in UpdateCommentResponse_SdkV2. +func (o *UpdateCommentResponse_SdkV2) SetComment(ctx context.Context, v CommentObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["comment"] + o.Comment = types.ListValueMust(t, vs) +} + +type UpdateExperiment_SdkV2 struct { + // ID of the associated experiment. + ExperimentId types.String `tfsdk:"experiment_id" tf:""` + // If provided, the experiment's name is changed to the new name. The new + // name must be unique. + NewName types.String `tfsdk:"new_name" tf:"optional"` +} + +func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperiment_SdkV2) { +} + +func (newState *UpdateExperiment_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExperiment_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExperiment_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, UpdateExperiment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExperiment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "new_name": o.NewName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateExperiment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "experiment_id": types.StringType, + "new_name": types.StringType, + }, + } +} + +type UpdateExperimentResponse_SdkV2 struct { +} + +func (newState *UpdateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateExperimentResponse_SdkV2) { +} + +func (newState *UpdateExperimentResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateExperimentResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateExperimentResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateExperimentResponse_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, UpdateExperimentResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateExperimentResponse_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 UpdateExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateModelRequest_SdkV2 struct { + // If provided, updates the description for this `registered_model`. + Description types.String `tfsdk:"description" tf:"optional"` + // Registered model unique name identifier. + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelRequest_SdkV2) { +} + +func (newState *UpdateModelRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateModelRequest_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, UpdateModelRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateModelRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateModelRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "name": types.StringType, + }, + } +} + +type UpdateModelResponse_SdkV2 struct { +} + +func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelResponse_SdkV2) { +} + +func (newState *UpdateModelResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, UpdateModelResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateModelResponse_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 UpdateModelResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateModelVersionRequest_SdkV2 struct { + // If provided, updates the description for this `registered_model`. + Description types.String `tfsdk:"description" tf:"optional"` + // Name of the registered model + Name types.String `tfsdk:"name" tf:""` + // Model version number + Version types.String `tfsdk:"version" tf:""` +} + +func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionRequest_SdkV2) { +} + +func (newState *UpdateModelVersionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateModelVersionRequest_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, UpdateModelVersionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "version": o.Version, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "name": types.StringType, + "version": types.StringType, + }, + } +} + +type UpdateModelVersionResponse_SdkV2 struct { +} + +func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateModelVersionResponse_SdkV2) { +} + +func (newState *UpdateModelVersionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateModelVersionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateModelVersionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, UpdateModelVersionResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionResponse_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 UpdateModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateRegistryWebhook_SdkV2 struct { + // User-specified description for the webhook. + Description types.String `tfsdk:"description" tf:"optional"` + // Events that can trigger a registry 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. + Events types.List `tfsdk:"events" tf:"optional"` + + HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + // Webhook ID + Id types.String `tfsdk:"id" tf:""` + + JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + // Enable or disable triggering the webhook, or put the webhook into test + // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an + // associated event happens. + // + // * `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" tf:"optional"` +} + +func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRegistryWebhook_SdkV2) { +} + +func (newState *UpdateRegistryWebhook_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRegistryWebhook_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRegistryWebhook. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRegistryWebhook_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": reflect.TypeOf(types.String{}), + "http_url_spec": reflect.TypeOf(HttpUrlSpec_SdkV2{}), + "job_spec": reflect.TypeOf(JobSpec_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, UpdateRegistryWebhook_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRegistryWebhook_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "events": o.Events, + "http_url_spec": o.HttpUrlSpec, + "id": o.Id, + "job_spec": o.JobSpec, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "events": basetypes.ListType{ + ElemType: types.StringType, + }, + "http_url_spec": basetypes.ListType{ + ElemType: HttpUrlSpec{}.Type(ctx), + }, + "id": types.StringType, + "job_spec": basetypes.ListType{ + ElemType: JobSpec{}.Type(ctx), + }, + "status": types.StringType, + }, + } +} + +// GetEvents returns the value of the Events field in UpdateRegistryWebhook_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRegistryWebhook_SdkV2) GetEvents(ctx context.Context) ([]types.String, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in UpdateRegistryWebhook_SdkV2. +func (o *UpdateRegistryWebhook_SdkV2) SetEvents(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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +// GetHttpUrlSpec returns the value of the HttpUrlSpec field in UpdateRegistryWebhook_SdkV2 as +// a HttpUrlSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRegistryWebhook_SdkV2) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec_SdkV2, bool) { + var e HttpUrlSpec_SdkV2 + if o.HttpUrlSpec.IsNull() || o.HttpUrlSpec.IsUnknown() { + return e, false + } + var v []HttpUrlSpec_SdkV2 + d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHttpUrlSpec sets the value of the HttpUrlSpec field in UpdateRegistryWebhook_SdkV2. +func (o *UpdateRegistryWebhook_SdkV2) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] + o.HttpUrlSpec = types.ListValueMust(t, vs) +} + +// GetJobSpec returns the value of the JobSpec field in UpdateRegistryWebhook_SdkV2 as +// a JobSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRegistryWebhook_SdkV2) GetJobSpec(ctx context.Context) (JobSpec_SdkV2, bool) { + var e JobSpec_SdkV2 + if o.JobSpec.IsNull() || o.JobSpec.IsUnknown() { + return e, false + } + var v []JobSpec_SdkV2 + d := o.JobSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetJobSpec sets the value of the JobSpec field in UpdateRegistryWebhook_SdkV2. +func (o *UpdateRegistryWebhook_SdkV2) SetJobSpec(ctx context.Context, v JobSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] + o.JobSpec = types.ListValueMust(t, vs) +} + +type UpdateRun_SdkV2 struct { + // Unix timestamp in milliseconds of when the run ended. + EndTime types.Int64 `tfsdk:"end_time" tf:"optional"` + // ID of the run to update. Must be provided. + RunId types.String `tfsdk:"run_id" tf:"optional"` + // [Deprecated, use run_id instead] ID of the run to update.. This field + // will be removed in a future MLflow version. + RunUuid types.String `tfsdk:"run_uuid" tf:"optional"` + // Updated status of the run. + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRun_SdkV2) { +} + +func (newState *UpdateRun_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRun_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRun_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, UpdateRun_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRun_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_time": o.EndTime, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRun_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_time": types.Int64Type, + "run_id": types.StringType, + "run_uuid": types.StringType, + "status": types.StringType, + }, + } +} + +type UpdateRunResponse_SdkV2 struct { + // Updated metadata of the run. + RunInfo types.List `tfsdk:"run_info" tf:"optional,object"` +} + +func (newState *UpdateRunResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRunResponse_SdkV2) { +} + +func (newState *UpdateRunResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRunResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRunResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRunResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "run_info": reflect.TypeOf(RunInfo_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, UpdateRunResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRunResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_info": o.RunInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRunResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_info": basetypes.ListType{ + ElemType: RunInfo{}.Type(ctx), + }, + }, + } +} + +// GetRunInfo returns the value of the RunInfo field in UpdateRunResponse_SdkV2 as +// a RunInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRunResponse_SdkV2) GetRunInfo(ctx context.Context) (RunInfo_SdkV2, bool) { + var e RunInfo_SdkV2 + if o.RunInfo.IsNull() || o.RunInfo.IsUnknown() { + return e, false + } + var v []RunInfo_SdkV2 + d := o.RunInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRunInfo sets the value of the RunInfo field in UpdateRunResponse_SdkV2. +func (o *UpdateRunResponse_SdkV2) SetRunInfo(ctx context.Context, v RunInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_info"] + o.RunInfo = types.ListValueMust(t, vs) +} + +type UpdateWebhookResponse_SdkV2 struct { +} + +func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWebhookResponse_SdkV2) { +} + +func (newState *UpdateWebhookResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWebhookResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateWebhookResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// 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{} +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, UpdateWebhookResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWebhookResponse_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 UpdateWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} diff --git a/internal/service/ml_tf/model.go b/internal/service/ml_tf/model.go index c93c99fe9..12c5b7079 100755 --- a/internal/service/ml_tf/model.go +++ b/internal/service/ml_tf/model.go @@ -199,7 +199,7 @@ func (o ApproveTransitionRequest) Type(ctx context.Context) attr.Type { type ApproveTransitionRequestResponse struct { // Activity recorded for the action. - Activity types.List `tfsdk:"activity" tf:"optional,object"` + Activity types.Object `tfsdk:"activity" tf:"optional,object"` } func (newState *ApproveTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ApproveTransitionRequestResponse) { @@ -236,9 +236,7 @@ func (o ApproveTransitionRequestResponse) ToObjectValue(ctx context.Context) bas func (o ApproveTransitionRequestResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "activity": basetypes.ListType{ - ElemType: Activity{}.Type(ctx), - }, + "activity": Activity{}.Type(ctx), }, } } @@ -252,7 +250,10 @@ func (o *ApproveTransitionRequestResponse) GetActivity(ctx context.Context) (Act return e, false } var v []Activity - d := o.Activity.ElementsAs(ctx, &v, true) + d := o.Activity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -264,9 +265,8 @@ func (o *ApproveTransitionRequestResponse) GetActivity(ctx context.Context) (Act // SetActivity sets the value of the Activity field in ApproveTransitionRequestResponse. func (o *ApproveTransitionRequestResponse) SetActivity(ctx context.Context, v Activity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["activity"] - o.Activity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Activity = vs } // Comment details. @@ -414,7 +414,7 @@ func (o CreateComment) Type(ctx context.Context) attr.Type { type CreateCommentResponse struct { // Comment details. - Comment types.List `tfsdk:"comment" tf:"optional,object"` + Comment types.Object `tfsdk:"comment" tf:"optional,object"` } func (newState *CreateCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCommentResponse) { @@ -451,9 +451,7 @@ func (o CreateCommentResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateCommentResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": basetypes.ListType{ - ElemType: CommentObject{}.Type(ctx), - }, + "comment": CommentObject{}.Type(ctx), }, } } @@ -467,7 +465,10 @@ func (o *CreateCommentResponse) GetComment(ctx context.Context) (CommentObject, return e, false } var v []CommentObject - d := o.Comment.ElementsAs(ctx, &v, true) + d := o.Comment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -479,9 +480,8 @@ func (o *CreateCommentResponse) GetComment(ctx context.Context) (CommentObject, // SetComment sets the value of the Comment field in CreateCommentResponse. func (o *CreateCommentResponse) SetComment(ctx context.Context, v CommentObject) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["comment"] - o.Comment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Comment = vs } type CreateExperiment struct { @@ -692,7 +692,7 @@ func (o *CreateModelRequest) SetTags(ctx context.Context, v []ModelTag) { } type CreateModelResponse struct { - RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.Object `tfsdk:"registered_model" tf:"optional,object"` } func (newState *CreateModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelResponse) { @@ -729,9 +729,7 @@ func (o CreateModelResponse) ToObjectValue(ctx context.Context) basetypes.Object func (o CreateModelResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "registered_model": basetypes.ListType{ - ElemType: Model{}.Type(ctx), - }, + "registered_model": Model{}.Type(ctx), }, } } @@ -745,7 +743,10 @@ func (o *CreateModelResponse) GetRegisteredModel(ctx context.Context) (Model, bo return e, false } var v []Model - d := o.RegisteredModel.ElementsAs(ctx, &v, true) + d := o.RegisteredModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -757,9 +758,8 @@ func (o *CreateModelResponse) GetRegisteredModel(ctx context.Context) (Model, bo // SetRegisteredModel sets the value of the RegisteredModel field in CreateModelResponse. func (o *CreateModelResponse) SetRegisteredModel(ctx context.Context, v Model) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["registered_model"] - o.RegisteredModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RegisteredModel = vs } type CreateModelVersionRequest struct { @@ -858,7 +858,7 @@ func (o *CreateModelVersionRequest) SetTags(ctx context.Context, v []ModelVersio type CreateModelVersionResponse struct { // Return new version number generated for this model in registry. - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` } func (newState *CreateModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateModelVersionResponse) { @@ -895,9 +895,7 @@ func (o CreateModelVersionResponse) ToObjectValue(ctx context.Context) basetypes func (o CreateModelVersionResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_version": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), - }, + "model_version": ModelVersion{}.Type(ctx), }, } } @@ -911,7 +909,10 @@ func (o *CreateModelVersionResponse) GetModelVersion(ctx context.Context) (Model return e, false } var v []ModelVersion - d := o.ModelVersion.ElementsAs(ctx, &v, true) + d := o.ModelVersion.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -923,9 +924,8 @@ func (o *CreateModelVersionResponse) GetModelVersion(ctx context.Context) (Model // SetModelVersion sets the value of the ModelVersion field in CreateModelVersionResponse. func (o *CreateModelVersionResponse) SetModelVersion(ctx context.Context, v ModelVersion) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] - o.ModelVersion = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ModelVersion = vs } type CreateRegistryWebhook struct { @@ -966,9 +966,9 @@ type CreateRegistryWebhook struct { // version be archived. Events types.List `tfsdk:"events" tf:""` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` // Name of the model whose events would trigger this webhook. ModelName types.String `tfsdk:"model_name" tf:"optional"` // Enable or disable triggering the webhook, or put the webhook into test @@ -1027,14 +1027,10 @@ func (o CreateRegistryWebhook) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: types.StringType, }, - "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpec{}.Type(ctx), - }, - "job_spec": basetypes.ListType{ - ElemType: JobSpec{}.Type(ctx), - }, - "model_name": types.StringType, - "status": types.StringType, + "http_url_spec": HttpUrlSpec{}.Type(ctx), + "job_spec": JobSpec{}.Type(ctx), + "model_name": types.StringType, + "status": types.StringType, }, } } @@ -1074,7 +1070,10 @@ func (o *CreateRegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec return e, false } var v []HttpUrlSpec - d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + d := o.HttpUrlSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1086,9 +1085,8 @@ func (o *CreateRegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec // SetHttpUrlSpec sets the value of the HttpUrlSpec field in CreateRegistryWebhook. func (o *CreateRegistryWebhook) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] - o.HttpUrlSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.HttpUrlSpec = vs } // GetJobSpec returns the value of the JobSpec field in CreateRegistryWebhook as @@ -1100,7 +1098,10 @@ func (o *CreateRegistryWebhook) GetJobSpec(ctx context.Context) (JobSpec, bool) return e, false } var v []JobSpec - d := o.JobSpec.ElementsAs(ctx, &v, true) + d := o.JobSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1112,9 +1113,8 @@ func (o *CreateRegistryWebhook) GetJobSpec(ctx context.Context) (JobSpec, bool) // SetJobSpec sets the value of the JobSpec field in CreateRegistryWebhook. func (o *CreateRegistryWebhook) SetJobSpec(ctx context.Context, v JobSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] - o.JobSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.JobSpec = vs } type CreateRun struct { @@ -1205,7 +1205,7 @@ func (o *CreateRun) SetTags(ctx context.Context, v []RunTag) { type CreateRunResponse struct { // The newly created run. - Run types.List `tfsdk:"run" tf:"optional,object"` + Run types.Object `tfsdk:"run" tf:"optional,object"` } func (newState *CreateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRunResponse) { @@ -1242,9 +1242,7 @@ func (o CreateRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o CreateRunResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "run": basetypes.ListType{ - ElemType: Run{}.Type(ctx), - }, + "run": Run{}.Type(ctx), }, } } @@ -1258,7 +1256,10 @@ func (o *CreateRunResponse) GetRun(ctx context.Context) (Run, bool) { return e, false } var v []Run - d := o.Run.ElementsAs(ctx, &v, true) + d := o.Run.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1270,9 +1271,8 @@ func (o *CreateRunResponse) GetRun(ctx context.Context) (Run, bool) { // SetRun sets the value of the Run field in CreateRunResponse. func (o *CreateRunResponse) SetRun(ctx context.Context, v Run) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run"] - o.Run = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Run = vs } type CreateTransitionRequest struct { @@ -1339,7 +1339,7 @@ func (o CreateTransitionRequest) Type(ctx context.Context) attr.Type { type CreateTransitionRequestResponse struct { // Transition request details. - Request types.List `tfsdk:"request" tf:"optional,object"` + Request types.Object `tfsdk:"request" tf:"optional,object"` } func (newState *CreateTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTransitionRequestResponse) { @@ -1376,9 +1376,7 @@ func (o CreateTransitionRequestResponse) ToObjectValue(ctx context.Context) base func (o CreateTransitionRequestResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "request": basetypes.ListType{ - ElemType: TransitionRequest{}.Type(ctx), - }, + "request": TransitionRequest{}.Type(ctx), }, } } @@ -1392,7 +1390,10 @@ func (o *CreateTransitionRequestResponse) GetRequest(ctx context.Context) (Trans return e, false } var v []TransitionRequest - d := o.Request.ElementsAs(ctx, &v, true) + d := o.Request.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1404,13 +1405,12 @@ func (o *CreateTransitionRequestResponse) GetRequest(ctx context.Context) (Trans // SetRequest sets the value of the Request field in CreateTransitionRequestResponse. func (o *CreateTransitionRequestResponse) SetRequest(ctx context.Context, v TransitionRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["request"] - o.Request = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Request = vs } type CreateWebhookResponse struct { - Webhook types.List `tfsdk:"webhook" tf:"optional,object"` + Webhook types.Object `tfsdk:"webhook" tf:"optional,object"` } func (newState *CreateWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWebhookResponse) { @@ -1447,9 +1447,7 @@ func (o CreateWebhookResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateWebhookResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "webhook": basetypes.ListType{ - ElemType: RegistryWebhook{}.Type(ctx), - }, + "webhook": RegistryWebhook{}.Type(ctx), }, } } @@ -1463,7 +1461,10 @@ func (o *CreateWebhookResponse) GetWebhook(ctx context.Context) (RegistryWebhook return e, false } var v []RegistryWebhook - d := o.Webhook.ElementsAs(ctx, &v, true) + d := o.Webhook.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1475,9 +1476,8 @@ func (o *CreateWebhookResponse) GetWebhook(ctx context.Context) (RegistryWebhook // SetWebhook sets the value of the Webhook field in CreateWebhookResponse. func (o *CreateWebhookResponse) SetWebhook(ctx context.Context, v RegistryWebhook) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook"] - o.Webhook = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Webhook = vs } type Dataset struct { @@ -1552,7 +1552,7 @@ func (o Dataset) Type(ctx context.Context) attr.Type { type DatasetInput struct { // The dataset being used as a Run input. - Dataset types.List `tfsdk:"dataset" tf:"optional,object"` + Dataset types.Object `tfsdk:"dataset" tf:"optional,object"` // A list of tags for the dataset input, e.g. a “context” tag with value // “training” Tags types.List `tfsdk:"tags" tf:"optional"` @@ -1594,9 +1594,7 @@ func (o DatasetInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o DatasetInput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "dataset": basetypes.ListType{ - ElemType: Dataset{}.Type(ctx), - }, + "dataset": Dataset{}.Type(ctx), "tags": basetypes.ListType{ ElemType: InputTag{}.Type(ctx), }, @@ -1613,7 +1611,10 @@ func (o *DatasetInput) GetDataset(ctx context.Context) (Dataset, bool) { return e, false } var v []Dataset - d := o.Dataset.ElementsAs(ctx, &v, true) + d := o.Dataset.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1625,9 +1626,8 @@ func (o *DatasetInput) GetDataset(ctx context.Context) (Dataset, bool) { // SetDataset sets the value of the Dataset field in DatasetInput. func (o *DatasetInput) SetDataset(ctx context.Context, v Dataset) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dataset"] - o.Dataset = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Dataset = vs } // GetTags returns the value of the Tags field in DatasetInput as @@ -3444,7 +3444,7 @@ func (o GetExperimentRequest) Type(ctx context.Context) attr.Type { type GetExperimentResponse struct { // Experiment details. - Experiment types.List `tfsdk:"experiment" tf:"optional,object"` + Experiment types.Object `tfsdk:"experiment" tf:"optional,object"` } func (newState *GetExperimentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetExperimentResponse) { @@ -3481,9 +3481,7 @@ func (o GetExperimentResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o GetExperimentResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "experiment": basetypes.ListType{ - ElemType: Experiment{}.Type(ctx), - }, + "experiment": Experiment{}.Type(ctx), }, } } @@ -3497,7 +3495,10 @@ func (o *GetExperimentResponse) GetExperiment(ctx context.Context) (Experiment, return e, false } var v []Experiment - d := o.Experiment.ElementsAs(ctx, &v, true) + d := o.Experiment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3509,9 +3510,8 @@ func (o *GetExperimentResponse) GetExperiment(ctx context.Context) (Experiment, // SetExperiment sets the value of the Experiment field in GetExperimentResponse. func (o *GetExperimentResponse) SetExperiment(ctx context.Context, v Experiment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["experiment"] - o.Experiment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Experiment = vs } // Get history of a given metric within a run @@ -3847,7 +3847,7 @@ func (o GetModelRequest) Type(ctx context.Context) attr.Type { } type GetModelResponse struct { - RegisteredModelDatabricks types.List `tfsdk:"registered_model_databricks" tf:"optional,object"` + RegisteredModelDatabricks types.Object `tfsdk:"registered_model_databricks" tf:"optional,object"` } func (newState *GetModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelResponse) { @@ -3884,9 +3884,7 @@ func (o GetModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o GetModelResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "registered_model_databricks": basetypes.ListType{ - ElemType: ModelDatabricks{}.Type(ctx), - }, + "registered_model_databricks": ModelDatabricks{}.Type(ctx), }, } } @@ -3900,7 +3898,10 @@ func (o *GetModelResponse) GetRegisteredModelDatabricks(ctx context.Context) (Mo return e, false } var v []ModelDatabricks - d := o.RegisteredModelDatabricks.ElementsAs(ctx, &v, true) + d := o.RegisteredModelDatabricks.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3912,9 +3913,8 @@ func (o *GetModelResponse) GetRegisteredModelDatabricks(ctx context.Context) (Mo // SetRegisteredModelDatabricks sets the value of the RegisteredModelDatabricks field in GetModelResponse. func (o *GetModelResponse) SetRegisteredModelDatabricks(ctx context.Context, v ModelDatabricks) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["registered_model_databricks"] - o.RegisteredModelDatabricks = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RegisteredModelDatabricks = vs } // Get a model version URI @@ -4054,7 +4054,7 @@ func (o GetModelVersionRequest) Type(ctx context.Context) attr.Type { } type GetModelVersionResponse struct { - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` } func (newState *GetModelVersionResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetModelVersionResponse) { @@ -4091,9 +4091,7 @@ func (o GetModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.Ob func (o GetModelVersionResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "model_version": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), - }, + "model_version": ModelVersion{}.Type(ctx), }, } } @@ -4107,7 +4105,10 @@ func (o *GetModelVersionResponse) GetModelVersion(ctx context.Context) (ModelVer return e, false } var v []ModelVersion - d := o.ModelVersion.ElementsAs(ctx, &v, true) + d := o.ModelVersion.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4119,9 +4120,8 @@ func (o *GetModelVersionResponse) GetModelVersion(ctx context.Context) (ModelVer // SetModelVersion sets the value of the ModelVersion field in GetModelVersionResponse. func (o *GetModelVersionResponse) SetModelVersion(ctx context.Context, v ModelVersion) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] - o.ModelVersion = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ModelVersion = vs } // Get registered model permission levels @@ -4333,7 +4333,7 @@ func (o GetRunRequest) Type(ctx context.Context) attr.Type { type GetRunResponse struct { // Run metadata (name, start time, etc) and data (metrics, params, and // tags). - Run types.List `tfsdk:"run" tf:"optional,object"` + Run types.Object `tfsdk:"run" tf:"optional,object"` } func (newState *GetRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRunResponse) { @@ -4370,9 +4370,7 @@ func (o GetRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o GetRunResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "run": basetypes.ListType{ - ElemType: Run{}.Type(ctx), - }, + "run": Run{}.Type(ctx), }, } } @@ -4386,7 +4384,10 @@ func (o *GetRunResponse) GetRun(ctx context.Context) (Run, bool) { return e, false } var v []Run - d := o.Run.ElementsAs(ctx, &v, true) + d := o.Run.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4398,9 +4399,8 @@ func (o *GetRunResponse) GetRun(ctx context.Context) (Run, bool) { // SetRun sets the value of the Run field in GetRunResponse. func (o *GetRunResponse) SetRun(ctx context.Context, v Run) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run"] - o.Run = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Run = vs } type HttpUrlSpec struct { @@ -7089,11 +7089,11 @@ type RegistryWebhook struct { // version be archived. Events types.List `tfsdk:"events" tf:"optional"` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` // Webhook ID Id types.String `tfsdk:"id" tf:"optional"` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` // Time of the object at last update, as a Unix timestamp in milliseconds. LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` // Name of the model whose events would trigger this webhook. @@ -7158,13 +7158,9 @@ func (o RegistryWebhook) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: types.StringType, }, - "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpecWithoutSecret{}.Type(ctx), - }, - "id": types.StringType, - "job_spec": basetypes.ListType{ - ElemType: JobSpecWithoutSecret{}.Type(ctx), - }, + "http_url_spec": HttpUrlSpecWithoutSecret{}.Type(ctx), + "id": types.StringType, + "job_spec": JobSpecWithoutSecret{}.Type(ctx), "last_updated_timestamp": types.Int64Type, "model_name": types.StringType, "status": types.StringType, @@ -7207,7 +7203,10 @@ func (o *RegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpecWithou return e, false } var v []HttpUrlSpecWithoutSecret - d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + d := o.HttpUrlSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7219,9 +7218,8 @@ func (o *RegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpecWithou // SetHttpUrlSpec sets the value of the HttpUrlSpec field in RegistryWebhook. func (o *RegistryWebhook) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpecWithoutSecret) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] - o.HttpUrlSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.HttpUrlSpec = vs } // GetJobSpec returns the value of the JobSpec field in RegistryWebhook as @@ -7233,7 +7231,10 @@ func (o *RegistryWebhook) GetJobSpec(ctx context.Context) (JobSpecWithoutSecret, return e, false } var v []JobSpecWithoutSecret - d := o.JobSpec.ElementsAs(ctx, &v, true) + d := o.JobSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7245,9 +7246,8 @@ func (o *RegistryWebhook) GetJobSpec(ctx context.Context) (JobSpecWithoutSecret, // SetJobSpec sets the value of the JobSpec field in RegistryWebhook. func (o *RegistryWebhook) SetJobSpec(ctx context.Context, v JobSpecWithoutSecret) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] - o.JobSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.JobSpec = vs } type RejectTransitionRequest struct { @@ -7314,7 +7314,7 @@ func (o RejectTransitionRequest) Type(ctx context.Context) attr.Type { type RejectTransitionRequestResponse struct { // Activity recorded for the action. - Activity types.List `tfsdk:"activity" tf:"optional,object"` + Activity types.Object `tfsdk:"activity" tf:"optional,object"` } func (newState *RejectTransitionRequestResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RejectTransitionRequestResponse) { @@ -7351,9 +7351,7 @@ func (o RejectTransitionRequestResponse) ToObjectValue(ctx context.Context) base func (o RejectTransitionRequestResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "activity": basetypes.ListType{ - ElemType: Activity{}.Type(ctx), - }, + "activity": Activity{}.Type(ctx), }, } } @@ -7367,7 +7365,10 @@ func (o *RejectTransitionRequestResponse) GetActivity(ctx context.Context) (Acti return e, false } var v []Activity - d := o.Activity.ElementsAs(ctx, &v, true) + d := o.Activity.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7379,9 +7380,8 @@ func (o *RejectTransitionRequestResponse) GetActivity(ctx context.Context) (Acti // SetActivity sets the value of the Activity field in RejectTransitionRequestResponse. func (o *RejectTransitionRequestResponse) SetActivity(ctx context.Context, v Activity) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["activity"] - o.Activity = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Activity = vs } type RenameModelRequest struct { @@ -7431,7 +7431,7 @@ func (o RenameModelRequest) Type(ctx context.Context) attr.Type { } type RenameModelResponse struct { - RegisteredModel types.List `tfsdk:"registered_model" tf:"optional,object"` + RegisteredModel types.Object `tfsdk:"registered_model" tf:"optional,object"` } func (newState *RenameModelResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan RenameModelResponse) { @@ -7468,9 +7468,7 @@ func (o RenameModelResponse) ToObjectValue(ctx context.Context) basetypes.Object func (o RenameModelResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "registered_model": basetypes.ListType{ - ElemType: Model{}.Type(ctx), - }, + "registered_model": Model{}.Type(ctx), }, } } @@ -7484,7 +7482,10 @@ func (o *RenameModelResponse) GetRegisteredModel(ctx context.Context) (Model, bo return e, false } var v []Model - d := o.RegisteredModel.ElementsAs(ctx, &v, true) + d := o.RegisteredModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7496,9 +7497,8 @@ func (o *RenameModelResponse) GetRegisteredModel(ctx context.Context) (Model, bo // SetRegisteredModel sets the value of the RegisteredModel field in RenameModelResponse. func (o *RenameModelResponse) SetRegisteredModel(ctx context.Context, v Model) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["registered_model"] - o.RegisteredModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RegisteredModel = vs } type RestoreExperiment struct { @@ -7754,11 +7754,11 @@ func (o RestoreRunsResponse) Type(ctx context.Context) attr.Type { type Run struct { // Run data. - Data types.List `tfsdk:"data" tf:"optional,object"` + Data types.Object `tfsdk:"data" tf:"optional,object"` // Run metadata. - Info types.List `tfsdk:"info" tf:"optional,object"` + Info types.Object `tfsdk:"info" tf:"optional,object"` // Run inputs. - Inputs types.List `tfsdk:"inputs" tf:"optional,object"` + Inputs types.Object `tfsdk:"inputs" tf:"optional,object"` } func (newState *Run) SyncEffectiveFieldsDuringCreateOrUpdate(plan Run) { @@ -7799,15 +7799,9 @@ func (o Run) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Run) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "data": basetypes.ListType{ - ElemType: RunData{}.Type(ctx), - }, - "info": basetypes.ListType{ - ElemType: RunInfo{}.Type(ctx), - }, - "inputs": basetypes.ListType{ - ElemType: RunInputs{}.Type(ctx), - }, + "data": RunData{}.Type(ctx), + "info": RunInfo{}.Type(ctx), + "inputs": RunInputs{}.Type(ctx), }, } } @@ -7821,7 +7815,10 @@ func (o *Run) GetData(ctx context.Context) (RunData, bool) { return e, false } var v []RunData - d := o.Data.ElementsAs(ctx, &v, true) + d := o.Data.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7833,9 +7830,8 @@ func (o *Run) GetData(ctx context.Context) (RunData, bool) { // SetData sets the value of the Data field in Run. func (o *Run) SetData(ctx context.Context, v RunData) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data"] - o.Data = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Data = vs } // GetInfo returns the value of the Info field in Run as @@ -7847,7 +7843,10 @@ func (o *Run) GetInfo(ctx context.Context) (RunInfo, bool) { return e, false } var v []RunInfo - d := o.Info.ElementsAs(ctx, &v, true) + d := o.Info.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7859,9 +7858,8 @@ func (o *Run) GetInfo(ctx context.Context) (RunInfo, bool) { // SetInfo sets the value of the Info field in Run. func (o *Run) SetInfo(ctx context.Context, v RunInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["info"] - o.Info = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Info = vs } // GetInputs returns the value of the Inputs field in Run as @@ -7873,7 +7871,10 @@ func (o *Run) GetInputs(ctx context.Context) (RunInputs, bool) { return e, false } var v []RunInputs - d := o.Inputs.ElementsAs(ctx, &v, true) + d := o.Inputs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7885,9 +7886,8 @@ func (o *Run) GetInputs(ctx context.Context) (RunInputs, bool) { // SetInputs sets the value of the Inputs field in Run. func (o *Run) SetInputs(ctx context.Context, v RunInputs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inputs"] - o.Inputs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Inputs = vs } type RunData struct { @@ -9407,7 +9407,7 @@ func (o TestRegistryWebhookRequest) Type(ctx context.Context) attr.Type { type TestRegistryWebhookResponse struct { // Test webhook response object. - Webhook types.List `tfsdk:"webhook" tf:"optional,object"` + Webhook types.Object `tfsdk:"webhook" tf:"optional,object"` } func (newState *TestRegistryWebhookResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TestRegistryWebhookResponse) { @@ -9444,9 +9444,7 @@ 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": basetypes.ListType{ - ElemType: TestRegistryWebhook{}.Type(ctx), - }, + "webhook": TestRegistryWebhook{}.Type(ctx), }, } } @@ -9460,7 +9458,10 @@ func (o *TestRegistryWebhookResponse) GetWebhook(ctx context.Context) (TestRegis return e, false } var v []TestRegistryWebhook - d := o.Webhook.ElementsAs(ctx, &v, true) + d := o.Webhook.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9472,9 +9473,8 @@ func (o *TestRegistryWebhookResponse) GetWebhook(ctx context.Context) (TestRegis // SetWebhook sets the value of the Webhook field in TestRegistryWebhookResponse. func (o *TestRegistryWebhookResponse) SetWebhook(ctx context.Context, v TestRegistryWebhook) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["webhook"] - o.Webhook = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Webhook = vs } type TransitionModelVersionStageDatabricks struct { @@ -9643,7 +9643,7 @@ func (o *TransitionRequest) SetAvailableActions(ctx context.Context, v []types.S } type TransitionStageResponse struct { - ModelVersion types.List `tfsdk:"model_version" tf:"optional,object"` + ModelVersion types.Object `tfsdk:"model_version" tf:"optional,object"` } func (newState *TransitionStageResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransitionStageResponse) { @@ -9680,9 +9680,7 @@ 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": basetypes.ListType{ - ElemType: ModelVersionDatabricks{}.Type(ctx), - }, + "model_version": ModelVersionDatabricks{}.Type(ctx), }, } } @@ -9696,7 +9694,10 @@ func (o *TransitionStageResponse) GetModelVersion(ctx context.Context) (ModelVer return e, false } var v []ModelVersionDatabricks - d := o.ModelVersion.ElementsAs(ctx, &v, true) + d := o.ModelVersion.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9708,9 +9709,8 @@ func (o *TransitionStageResponse) GetModelVersion(ctx context.Context) (ModelVer // SetModelVersion sets the value of the ModelVersion field in TransitionStageResponse. func (o *TransitionStageResponse) SetModelVersion(ctx context.Context, v ModelVersionDatabricks) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["model_version"] - o.ModelVersion = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ModelVersion = vs } type UpdateComment struct { @@ -9761,7 +9761,7 @@ func (o UpdateComment) Type(ctx context.Context) attr.Type { type UpdateCommentResponse struct { // Comment details. - Comment types.List `tfsdk:"comment" tf:"optional,object"` + Comment types.Object `tfsdk:"comment" tf:"optional,object"` } func (newState *UpdateCommentResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCommentResponse) { @@ -9798,9 +9798,7 @@ func (o UpdateCommentResponse) ToObjectValue(ctx context.Context) basetypes.Obje func (o UpdateCommentResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": basetypes.ListType{ - ElemType: CommentObject{}.Type(ctx), - }, + "comment": CommentObject{}.Type(ctx), }, } } @@ -9814,7 +9812,10 @@ func (o *UpdateCommentResponse) GetComment(ctx context.Context) (CommentObject, return e, false } var v []CommentObject - d := o.Comment.ElementsAs(ctx, &v, true) + d := o.Comment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9826,9 +9827,8 @@ func (o *UpdateCommentResponse) GetComment(ctx context.Context) (CommentObject, // SetComment sets the value of the Comment field in UpdateCommentResponse. func (o *UpdateCommentResponse) SetComment(ctx context.Context, v CommentObject) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["comment"] - o.Comment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Comment = vs } type UpdateExperiment struct { @@ -10120,11 +10120,11 @@ type UpdateRegistryWebhook struct { // version be archived. Events types.List `tfsdk:"events" tf:"optional"` - HttpUrlSpec types.List `tfsdk:"http_url_spec" tf:"optional,object"` + HttpUrlSpec types.Object `tfsdk:"http_url_spec" tf:"optional,object"` // Webhook ID Id types.String `tfsdk:"id" tf:""` - JobSpec types.List `tfsdk:"job_spec" tf:"optional,object"` + JobSpec types.Object `tfsdk:"job_spec" tf:"optional,object"` // Enable or disable triggering the webhook, or put the webhook into test // mode. The default is `ACTIVE`: * `ACTIVE`: Webhook is triggered when an // associated event happens. @@ -10181,14 +10181,10 @@ func (o UpdateRegistryWebhook) Type(ctx context.Context) attr.Type { "events": basetypes.ListType{ ElemType: types.StringType, }, - "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpec{}.Type(ctx), - }, - "id": types.StringType, - "job_spec": basetypes.ListType{ - ElemType: JobSpec{}.Type(ctx), - }, - "status": types.StringType, + "http_url_spec": HttpUrlSpec{}.Type(ctx), + "id": types.StringType, + "job_spec": JobSpec{}.Type(ctx), + "status": types.StringType, }, } } @@ -10228,7 +10224,10 @@ func (o *UpdateRegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec return e, false } var v []HttpUrlSpec - d := o.HttpUrlSpec.ElementsAs(ctx, &v, true) + d := o.HttpUrlSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10240,9 +10239,8 @@ func (o *UpdateRegistryWebhook) GetHttpUrlSpec(ctx context.Context) (HttpUrlSpec // SetHttpUrlSpec sets the value of the HttpUrlSpec field in UpdateRegistryWebhook. func (o *UpdateRegistryWebhook) SetHttpUrlSpec(ctx context.Context, v HttpUrlSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["http_url_spec"] - o.HttpUrlSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.HttpUrlSpec = vs } // GetJobSpec returns the value of the JobSpec field in UpdateRegistryWebhook as @@ -10254,7 +10252,10 @@ func (o *UpdateRegistryWebhook) GetJobSpec(ctx context.Context) (JobSpec, bool) return e, false } var v []JobSpec - d := o.JobSpec.ElementsAs(ctx, &v, true) + d := o.JobSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10266,9 +10267,8 @@ func (o *UpdateRegistryWebhook) GetJobSpec(ctx context.Context) (JobSpec, bool) // SetJobSpec sets the value of the JobSpec field in UpdateRegistryWebhook. func (o *UpdateRegistryWebhook) SetJobSpec(ctx context.Context, v JobSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["job_spec"] - o.JobSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.JobSpec = vs } type UpdateRun struct { @@ -10328,7 +10328,7 @@ func (o UpdateRun) Type(ctx context.Context) attr.Type { type UpdateRunResponse struct { // Updated metadata of the run. - RunInfo types.List `tfsdk:"run_info" tf:"optional,object"` + RunInfo types.Object `tfsdk:"run_info" tf:"optional,object"` } func (newState *UpdateRunResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRunResponse) { @@ -10365,9 +10365,7 @@ func (o UpdateRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o UpdateRunResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "run_info": basetypes.ListType{ - ElemType: RunInfo{}.Type(ctx), - }, + "run_info": RunInfo{}.Type(ctx), }, } } @@ -10381,7 +10379,10 @@ func (o *UpdateRunResponse) GetRunInfo(ctx context.Context) (RunInfo, bool) { return e, false } var v []RunInfo - d := o.RunInfo.ElementsAs(ctx, &v, true) + d := o.RunInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10393,9 +10394,8 @@ func (o *UpdateRunResponse) GetRunInfo(ctx context.Context) (RunInfo, bool) { // SetRunInfo sets the value of the RunInfo field in UpdateRunResponse. func (o *UpdateRunResponse) SetRunInfo(ctx context.Context, v RunInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["run_info"] - o.RunInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RunInfo = vs } type UpdateWebhookResponse struct { diff --git a/internal/service/oauth2_tf/legacy_model.go b/internal/service/oauth2_tf/legacy_model.go new file mode 100755 index 000000000..93de2a186 --- /dev/null +++ b/internal/service/oauth2_tf/legacy_model.go @@ -0,0 +1,2064 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package oauth2_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type CreateCustomAppIntegration_SdkV2 struct { + // This field indicates whether an OAuth client secret is required to + // authenticate this client. + Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + // Name of the custom OAuth app + Name types.String `tfsdk:"name" tf:"optional"` + // List of OAuth redirect urls + RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + // OAuth scopes granted to the application. Supported scopes: all-apis, sql, + // offline_access, openid, profile, email. + Scopes types.List `tfsdk:"scopes" tf:"optional"` + // Token access policy + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration_SdkV2) { +} + +func (newState *CreateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegration_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCustomAppIntegration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "redirect_urls": reflect.TypeOf(types.String{}), + "scopes": reflect.TypeOf(types.String{}), + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, CreateCustomAppIntegration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCustomAppIntegration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "confidential": o.Confidential, + "name": o.Name, + "redirect_urls": o.RedirectUrls, + "scopes": o.Scopes, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCustomAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "confidential": types.BoolType, + "name": types.StringType, + "redirect_urls": basetypes.ListType{ + ElemType: types.StringType, + }, + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetRedirectUrls returns the value of the RedirectUrls field in CreateCustomAppIntegration_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomAppIntegration_SdkV2) GetRedirectUrls(ctx context.Context) ([]types.String, bool) { + if o.RedirectUrls.IsNull() || o.RedirectUrls.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RedirectUrls.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRedirectUrls sets the value of the RedirectUrls field in CreateCustomAppIntegration_SdkV2. +func (o *CreateCustomAppIntegration_SdkV2) SetRedirectUrls(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["redirect_urls"] + t = t.(attr.TypeWithElementType).ElementType() + o.RedirectUrls = types.ListValueMust(t, vs) +} + +// GetScopes returns the value of the Scopes field in CreateCustomAppIntegration_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomAppIntegration_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in CreateCustomAppIntegration_SdkV2. +func (o *CreateCustomAppIntegration_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in CreateCustomAppIntegration_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomAppIntegration_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in CreateCustomAppIntegration_SdkV2. +func (o *CreateCustomAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +type CreateCustomAppIntegrationOutput_SdkV2 struct { + // OAuth client-id generated by the Databricks + ClientId types.String `tfsdk:"client_id" tf:"optional"` + // OAuth client-secret generated by the Databricks. If this is a + // confidential OAuth app client-secret will be generated. + ClientSecret types.String `tfsdk:"client_secret" tf:"optional"` + // Unique integration id for the custom OAuth app + IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` +} + +func (newState *CreateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegrationOutput_SdkV2) { +} + +func (newState *CreateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCustomAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCustomAppIntegrationOutput_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, CreateCustomAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCustomAppIntegrationOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "client_id": o.ClientId, + "client_secret": o.ClientSecret, + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "client_id": types.StringType, + "client_secret": types.StringType, + "integration_id": types.StringType, + }, + } +} + +type CreatePublishedAppIntegration_SdkV2 struct { + // App id of the OAuth published app integration. For example power-bi, + // tableau-deskop + AppId types.String `tfsdk:"app_id" tf:"optional"` + // Token access policy + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration_SdkV2) { +} + +func (newState *CreatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegration_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePublishedAppIntegration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, CreatePublishedAppIntegration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePublishedAppIntegration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_id": o.AppId, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePublishedAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_id": types.StringType, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in CreatePublishedAppIntegration_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePublishedAppIntegration_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in CreatePublishedAppIntegration_SdkV2. +func (o *CreatePublishedAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +type CreatePublishedAppIntegrationOutput_SdkV2 struct { + // Unique integration id for the published OAuth app + IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` +} + +func (newState *CreatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegrationOutput_SdkV2) { +} + +func (newState *CreatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePublishedAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePublishedAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePublishedAppIntegrationOutput_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, CreatePublishedAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePublishedAppIntegrationOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + }, + } +} + +// Create service principal secret +type CreateServicePrincipalSecretRequest_SdkV2 struct { + // The service principal ID. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *CreateServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretRequest_SdkV2) { +} + +func (newState *CreateServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateServicePrincipalSecretRequest_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, CreateServicePrincipalSecretRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateServicePrincipalSecretRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateServicePrincipalSecretRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "service_principal_id": types.Int64Type, + }, + } +} + +type CreateServicePrincipalSecretResponse_SdkV2 struct { + // UTC time when the secret was created + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // ID of the secret + Id types.String `tfsdk:"id" tf:"optional"` + // Secret Value + Secret types.String `tfsdk:"secret" tf:"optional"` + // Secret Hash + SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + // Status of the secret + Status types.String `tfsdk:"status" tf:"optional"` + // UTC time when the secret was updated + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` +} + +func (newState *CreateServicePrincipalSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalSecretResponse_SdkV2) { +} + +func (newState *CreateServicePrincipalSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalSecretResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalSecretResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateServicePrincipalSecretResponse_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, CreateServicePrincipalSecretResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateServicePrincipalSecretResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "id": o.Id, + "secret": o.Secret, + "secret_hash": o.SecretHash, + "status": o.Status, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateServicePrincipalSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "id": types.StringType, + "secret": types.StringType, + "secret_hash": types.StringType, + "status": types.StringType, + "update_time": types.StringType, + }, + } +} + +type DataPlaneInfo_SdkV2 struct { + // Authorization details as a string. + AuthorizationDetails types.String `tfsdk:"authorization_details" tf:"optional"` + // The URL of the endpoint for this operation in the dataplane. + EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` +} + +func (newState *DataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneInfo_SdkV2) { +} + +func (newState *DataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataPlaneInfo_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, DataPlaneInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataPlaneInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authorization_details": o.AuthorizationDetails, + "endpoint_url": o.EndpointUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataPlaneInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authorization_details": types.StringType, + "endpoint_url": types.StringType, + }, + } +} + +type DeleteCustomAppIntegrationOutput_SdkV2 struct { +} + +func (newState *DeleteCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCustomAppIntegrationOutput_SdkV2) { +} + +func (newState *DeleteCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCustomAppIntegrationOutput_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, DeleteCustomAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCustomAppIntegrationOutput_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 DeleteCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete Custom OAuth App Integration +type DeleteCustomAppIntegrationRequest_SdkV2 struct { + IntegrationId types.String `tfsdk:"-"` +} + +func (newState *DeleteCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCustomAppIntegrationRequest_SdkV2) { +} + +func (newState *DeleteCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCustomAppIntegrationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCustomAppIntegrationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCustomAppIntegrationRequest_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, DeleteCustomAppIntegrationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCustomAppIntegrationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCustomAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + }, + } +} + +type DeletePublishedAppIntegrationOutput_SdkV2 struct { +} + +func (newState *DeletePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePublishedAppIntegrationOutput_SdkV2) { +} + +func (newState *DeletePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePublishedAppIntegrationOutput_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, DeletePublishedAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePublishedAppIntegrationOutput_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 DeletePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete Published OAuth App Integration +type DeletePublishedAppIntegrationRequest_SdkV2 struct { + IntegrationId types.String `tfsdk:"-"` +} + +func (newState *DeletePublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePublishedAppIntegrationRequest_SdkV2) { +} + +func (newState *DeletePublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePublishedAppIntegrationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePublishedAppIntegrationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePublishedAppIntegrationRequest_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, DeletePublishedAppIntegrationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePublishedAppIntegrationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePublishedAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete service principal secret +type DeleteServicePrincipalSecretRequest_SdkV2 struct { + // The secret ID. + SecretId types.String `tfsdk:"-"` + // The service principal ID. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalSecretRequest_SdkV2) { +} + +func (newState *DeleteServicePrincipalSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalSecretRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalSecretRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteServicePrincipalSecretRequest_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, DeleteServicePrincipalSecretRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteServicePrincipalSecretRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "secret_id": o.SecretId, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteServicePrincipalSecretRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "secret_id": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + +type GetCustomAppIntegrationOutput_SdkV2 struct { + // The client id of the custom OAuth app + ClientId types.String `tfsdk:"client_id" tf:"optional"` + // This field indicates whether an OAuth client secret is required to + // authenticate this client. + Confidential types.Bool `tfsdk:"confidential" tf:"optional"` + + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + + CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + + CreatorUsername types.String `tfsdk:"creator_username" tf:"optional"` + // ID of this custom app + IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + // The display name of the custom OAuth app + Name types.String `tfsdk:"name" tf:"optional"` + // List of OAuth redirect urls + RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + + Scopes types.List `tfsdk:"scopes" tf:"optional"` + // Token access policy + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *GetCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationOutput_SdkV2) { +} + +func (newState *GetCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCustomAppIntegrationOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "redirect_urls": reflect.TypeOf(types.String{}), + "scopes": reflect.TypeOf(types.String{}), + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, GetCustomAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "client_id": o.ClientId, + "confidential": o.Confidential, + "create_time": o.CreateTime, + "created_by": o.CreatedBy, + "creator_username": o.CreatorUsername, + "integration_id": o.IntegrationId, + "name": o.Name, + "redirect_urls": o.RedirectUrls, + "scopes": o.Scopes, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "client_id": types.StringType, + "confidential": types.BoolType, + "create_time": types.StringType, + "created_by": types.Int64Type, + "creator_username": types.StringType, + "integration_id": types.StringType, + "name": types.StringType, + "redirect_urls": basetypes.ListType{ + ElemType: types.StringType, + }, + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetRedirectUrls returns the value of the RedirectUrls field in GetCustomAppIntegrationOutput_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetCustomAppIntegrationOutput_SdkV2) GetRedirectUrls(ctx context.Context) ([]types.String, bool) { + if o.RedirectUrls.IsNull() || o.RedirectUrls.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RedirectUrls.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRedirectUrls sets the value of the RedirectUrls field in GetCustomAppIntegrationOutput_SdkV2. +func (o *GetCustomAppIntegrationOutput_SdkV2) SetRedirectUrls(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["redirect_urls"] + t = t.(attr.TypeWithElementType).ElementType() + o.RedirectUrls = types.ListValueMust(t, vs) +} + +// GetScopes returns the value of the Scopes field in GetCustomAppIntegrationOutput_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetCustomAppIntegrationOutput_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in GetCustomAppIntegrationOutput_SdkV2. +func (o *GetCustomAppIntegrationOutput_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in GetCustomAppIntegrationOutput_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetCustomAppIntegrationOutput_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in GetCustomAppIntegrationOutput_SdkV2. +func (o *GetCustomAppIntegrationOutput_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +// Get OAuth Custom App Integration +type GetCustomAppIntegrationRequest_SdkV2 struct { + // The OAuth app integration ID. + IntegrationId types.String `tfsdk:"-"` +} + +func (newState *GetCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationRequest_SdkV2) { +} + +func (newState *GetCustomAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCustomAppIntegrationRequest_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, GetCustomAppIntegrationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCustomAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + }, + } +} + +type GetCustomAppIntegrationsOutput_SdkV2 struct { + // List of Custom OAuth App Integrations defined for the account. + Apps types.List `tfsdk:"apps" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *GetCustomAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationsOutput_SdkV2) { +} + +func (newState *GetCustomAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCustomAppIntegrationsOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCustomAppIntegrationsOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCustomAppIntegrationsOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "apps": reflect.TypeOf(GetCustomAppIntegrationOutput_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, GetCustomAppIntegrationsOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationsOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCustomAppIntegrationsOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apps": basetypes.ListType{ + ElemType: GetCustomAppIntegrationOutput{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetApps returns the value of the Apps field in GetCustomAppIntegrationsOutput_SdkV2 as +// a slice of GetCustomAppIntegrationOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetCustomAppIntegrationsOutput_SdkV2) GetApps(ctx context.Context) ([]GetCustomAppIntegrationOutput_SdkV2, bool) { + if o.Apps.IsNull() || o.Apps.IsUnknown() { + return nil, false + } + var v []GetCustomAppIntegrationOutput_SdkV2 + d := o.Apps.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetApps sets the value of the Apps field in GetCustomAppIntegrationsOutput_SdkV2. +func (o *GetCustomAppIntegrationsOutput_SdkV2) SetApps(ctx context.Context, v []GetCustomAppIntegrationOutput_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["apps"] + t = t.(attr.TypeWithElementType).ElementType() + o.Apps = types.ListValueMust(t, vs) +} + +type GetPublishedAppIntegrationOutput_SdkV2 struct { + // App-id of the published app integration + AppId types.String `tfsdk:"app_id" tf:"optional"` + + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + + CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + // Unique integration id for the published OAuth app + IntegrationId types.String `tfsdk:"integration_id" tf:"optional"` + // Display name of the published OAuth app + Name types.String `tfsdk:"name" tf:"optional"` + // Token access policy + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *GetPublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationOutput_SdkV2) { +} + +func (newState *GetPublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPublishedAppIntegrationOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, GetPublishedAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_id": o.AppId, + "create_time": o.CreateTime, + "created_by": o.CreatedBy, + "integration_id": o.IntegrationId, + "name": o.Name, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_id": types.StringType, + "create_time": types.StringType, + "created_by": types.Int64Type, + "integration_id": types.StringType, + "name": types.StringType, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in GetPublishedAppIntegrationOutput_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPublishedAppIntegrationOutput_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in GetPublishedAppIntegrationOutput_SdkV2. +func (o *GetPublishedAppIntegrationOutput_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +// Get OAuth Published App Integration +type GetPublishedAppIntegrationRequest_SdkV2 struct { + IntegrationId types.String `tfsdk:"-"` +} + +func (newState *GetPublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationRequest_SdkV2) { +} + +func (newState *GetPublishedAppIntegrationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPublishedAppIntegrationRequest_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, GetPublishedAppIntegrationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPublishedAppIntegrationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + }, + } +} + +type GetPublishedAppIntegrationsOutput_SdkV2 struct { + // List of Published OAuth App Integrations defined for the account. + Apps types.List `tfsdk:"apps" tf:"optional"` + + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *GetPublishedAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationsOutput_SdkV2) { +} + +func (newState *GetPublishedAppIntegrationsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppIntegrationsOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppIntegrationsOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPublishedAppIntegrationsOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "apps": reflect.TypeOf(GetPublishedAppIntegrationOutput_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, GetPublishedAppIntegrationsOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationsOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPublishedAppIntegrationsOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apps": basetypes.ListType{ + ElemType: GetPublishedAppIntegrationOutput{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetApps returns the value of the Apps field in GetPublishedAppIntegrationsOutput_SdkV2 as +// a slice of GetPublishedAppIntegrationOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPublishedAppIntegrationsOutput_SdkV2) GetApps(ctx context.Context) ([]GetPublishedAppIntegrationOutput_SdkV2, bool) { + if o.Apps.IsNull() || o.Apps.IsUnknown() { + return nil, false + } + var v []GetPublishedAppIntegrationOutput_SdkV2 + d := o.Apps.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetApps sets the value of the Apps field in GetPublishedAppIntegrationsOutput_SdkV2. +func (o *GetPublishedAppIntegrationsOutput_SdkV2) SetApps(ctx context.Context, v []GetPublishedAppIntegrationOutput_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["apps"] + t = t.(attr.TypeWithElementType).ElementType() + o.Apps = types.ListValueMust(t, vs) +} + +type GetPublishedAppsOutput_SdkV2 struct { + // List of Published OAuth Apps. + Apps types.List `tfsdk:"apps" tf:"optional"` + // A token that can be used to get the next page of results. If not present, + // there are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *GetPublishedAppsOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppsOutput_SdkV2) { +} + +func (newState *GetPublishedAppsOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPublishedAppsOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPublishedAppsOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPublishedAppsOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "apps": reflect.TypeOf(PublishedAppOutput_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, GetPublishedAppsOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppsOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPublishedAppsOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apps": basetypes.ListType{ + ElemType: PublishedAppOutput{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetApps returns the value of the Apps field in GetPublishedAppsOutput_SdkV2 as +// a slice of PublishedAppOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPublishedAppsOutput_SdkV2) GetApps(ctx context.Context) ([]PublishedAppOutput_SdkV2, bool) { + if o.Apps.IsNull() || o.Apps.IsUnknown() { + return nil, false + } + var v []PublishedAppOutput_SdkV2 + d := o.Apps.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetApps sets the value of the Apps field in GetPublishedAppsOutput_SdkV2. +func (o *GetPublishedAppsOutput_SdkV2) SetApps(ctx context.Context, v []PublishedAppOutput_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["apps"] + t = t.(attr.TypeWithElementType).ElementType() + o.Apps = types.ListValueMust(t, vs) +} + +// Get custom oauth app integrations +type ListCustomAppIntegrationsRequest_SdkV2 struct { + IncludeCreatorUsername types.Bool `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCustomAppIntegrationsRequest_SdkV2) { +} + +func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCustomAppIntegrationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCustomAppIntegrationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCustomAppIntegrationsRequest_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, ListCustomAppIntegrationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCustomAppIntegrationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "include_creator_username": o.IncludeCreatorUsername, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCustomAppIntegrationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_creator_username": types.BoolType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// Get all the published OAuth apps +type ListOAuthPublishedAppsRequest_SdkV2 struct { + // The max number of OAuth published apps to return in one page. + PageSize types.Int64 `tfsdk:"-"` + // A token that can be used to get the next page of results. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListOAuthPublishedAppsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListOAuthPublishedAppsRequest_SdkV2) { +} + +func (newState *ListOAuthPublishedAppsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListOAuthPublishedAppsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListOAuthPublishedAppsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListOAuthPublishedAppsRequest_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, ListOAuthPublishedAppsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListOAuthPublishedAppsRequest_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 ListOAuthPublishedAppsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// Get published oauth app integrations +type ListPublishedAppIntegrationsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListPublishedAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublishedAppIntegrationsRequest_SdkV2) { +} + +func (newState *ListPublishedAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPublishedAppIntegrationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublishedAppIntegrationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPublishedAppIntegrationsRequest_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, ListPublishedAppIntegrationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPublishedAppIntegrationsRequest_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 ListPublishedAppIntegrationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// List service principal secrets +type ListServicePrincipalSecretsRequest_SdkV2 struct { + // An opaque page token which was the `next_page_token` in the response of + // the previous request to list the secrets for this service principal. + // Provide this token to retrieve the next page of secret entries. When + // providing a `page_token`, all other parameters provided to the request + // must match the previous request. To list all of the secrets for a service + // principal, it is necessary to continue requesting pages of entries until + // the response contains no `next_page_token`. Note that the number of + // entries returned must not be used to determine when the listing is + // complete. + PageToken types.String `tfsdk:"-"` + // The service principal ID. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *ListServicePrincipalSecretsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsRequest_SdkV2) { +} + +func (newState *ListServicePrincipalSecretsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListServicePrincipalSecretsRequest_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, ListServicePrincipalSecretsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalSecretsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_token": o.PageToken, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServicePrincipalSecretsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_token": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + +type ListServicePrincipalSecretsResponse_SdkV2 struct { + // A token, which can be sent as `page_token` to retrieve the next page. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // List of the secrets + Secrets types.List `tfsdk:"secrets" tf:"optional"` +} + +func (newState *ListServicePrincipalSecretsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalSecretsResponse_SdkV2) { +} + +func (newState *ListServicePrincipalSecretsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalSecretsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalSecretsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListServicePrincipalSecretsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "secrets": reflect.TypeOf(SecretInfo_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, ListServicePrincipalSecretsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalSecretsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "secrets": o.Secrets, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServicePrincipalSecretsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "secrets": basetypes.ListType{ + ElemType: SecretInfo{}.Type(ctx), + }, + }, + } +} + +// GetSecrets returns the value of the Secrets field in ListServicePrincipalSecretsResponse_SdkV2 as +// a slice of SecretInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListServicePrincipalSecretsResponse_SdkV2) GetSecrets(ctx context.Context) ([]SecretInfo_SdkV2, bool) { + if o.Secrets.IsNull() || o.Secrets.IsUnknown() { + return nil, false + } + var v []SecretInfo_SdkV2 + d := o.Secrets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSecrets sets the value of the Secrets field in ListServicePrincipalSecretsResponse_SdkV2. +func (o *ListServicePrincipalSecretsResponse_SdkV2) SetSecrets(ctx context.Context, v []SecretInfo_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["secrets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Secrets = types.ListValueMust(t, vs) +} + +type PublishedAppOutput_SdkV2 struct { + // Unique ID of the published OAuth app. + AppId types.String `tfsdk:"app_id" tf:"optional"` + // Client ID of the published OAuth app. It is the client_id in the OAuth + // flow + ClientId types.String `tfsdk:"client_id" tf:"optional"` + // Description of the published OAuth app. + Description types.String `tfsdk:"description" tf:"optional"` + // Whether the published OAuth app is a confidential client. It is always + // false for published OAuth apps. + IsConfidentialClient types.Bool `tfsdk:"is_confidential_client" tf:"optional"` + // The display name of the published OAuth app. + Name types.String `tfsdk:"name" tf:"optional"` + // Redirect URLs of the published OAuth app. + RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + // Required scopes for the published OAuth app. + Scopes types.List `tfsdk:"scopes" tf:"optional"` +} + +func (newState *PublishedAppOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublishedAppOutput_SdkV2) { +} + +func (newState *PublishedAppOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublishedAppOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PublishedAppOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PublishedAppOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "redirect_urls": reflect.TypeOf(types.String{}), + "scopes": 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, PublishedAppOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PublishedAppOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "app_id": o.AppId, + "client_id": o.ClientId, + "description": o.Description, + "is_confidential_client": o.IsConfidentialClient, + "name": o.Name, + "redirect_urls": o.RedirectUrls, + "scopes": o.Scopes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PublishedAppOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "app_id": types.StringType, + "client_id": types.StringType, + "description": types.StringType, + "is_confidential_client": types.BoolType, + "name": types.StringType, + "redirect_urls": basetypes.ListType{ + ElemType: types.StringType, + }, + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetRedirectUrls returns the value of the RedirectUrls field in PublishedAppOutput_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PublishedAppOutput_SdkV2) GetRedirectUrls(ctx context.Context) ([]types.String, bool) { + if o.RedirectUrls.IsNull() || o.RedirectUrls.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RedirectUrls.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRedirectUrls sets the value of the RedirectUrls field in PublishedAppOutput_SdkV2. +func (o *PublishedAppOutput_SdkV2) SetRedirectUrls(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["redirect_urls"] + t = t.(attr.TypeWithElementType).ElementType() + o.RedirectUrls = types.ListValueMust(t, vs) +} + +// GetScopes returns the value of the Scopes field in PublishedAppOutput_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PublishedAppOutput_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in PublishedAppOutput_SdkV2. +func (o *PublishedAppOutput_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +type SecretInfo_SdkV2 struct { + // UTC time when the secret was created + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // ID of the secret + Id types.String `tfsdk:"id" tf:"optional"` + // Secret Hash + SecretHash types.String `tfsdk:"secret_hash" tf:"optional"` + // Status of the secret + Status types.String `tfsdk:"status" tf:"optional"` + // UTC time when the secret was updated + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` +} + +func (newState *SecretInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretInfo_SdkV2) { +} + +func (newState *SecretInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SecretInfo_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, SecretInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SecretInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "id": o.Id, + "secret_hash": o.SecretHash, + "status": o.Status, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecretInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "id": types.StringType, + "secret_hash": types.StringType, + "status": types.StringType, + "update_time": types.StringType, + }, + } +} + +type TokenAccessPolicy_SdkV2 struct { + // access token time to live in minutes + AccessTokenTtlInMinutes types.Int64 `tfsdk:"access_token_ttl_in_minutes" tf:"optional"` + // refresh token time to live in minutes + RefreshTokenTtlInMinutes types.Int64 `tfsdk:"refresh_token_ttl_in_minutes" tf:"optional"` +} + +func (newState *TokenAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessPolicy_SdkV2) { +} + +func (newState *TokenAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenAccessPolicy_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, TokenAccessPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenAccessPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_token_ttl_in_minutes": o.AccessTokenTtlInMinutes, + "refresh_token_ttl_in_minutes": o.RefreshTokenTtlInMinutes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenAccessPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_token_ttl_in_minutes": types.Int64Type, + "refresh_token_ttl_in_minutes": types.Int64Type, + }, + } +} + +type UpdateCustomAppIntegration_SdkV2 struct { + IntegrationId types.String `tfsdk:"-"` + // List of OAuth redirect urls to be updated in the custom OAuth app + // integration + RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` + // Token access policy to be updated in the custom OAuth app integration + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration_SdkV2) { +} + +func (newState *UpdateCustomAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegration_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCustomAppIntegration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "redirect_urls": reflect.TypeOf(types.String{}), + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, UpdateCustomAppIntegration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCustomAppIntegration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + "redirect_urls": o.RedirectUrls, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCustomAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + "redirect_urls": basetypes.ListType{ + ElemType: types.StringType, + }, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetRedirectUrls returns the value of the RedirectUrls field in UpdateCustomAppIntegration_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCustomAppIntegration_SdkV2) GetRedirectUrls(ctx context.Context) ([]types.String, bool) { + if o.RedirectUrls.IsNull() || o.RedirectUrls.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RedirectUrls.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRedirectUrls sets the value of the RedirectUrls field in UpdateCustomAppIntegration_SdkV2. +func (o *UpdateCustomAppIntegration_SdkV2) SetRedirectUrls(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["redirect_urls"] + t = t.(attr.TypeWithElementType).ElementType() + o.RedirectUrls = types.ListValueMust(t, vs) +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in UpdateCustomAppIntegration_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCustomAppIntegration_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in UpdateCustomAppIntegration_SdkV2. +func (o *UpdateCustomAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +type UpdateCustomAppIntegrationOutput_SdkV2 struct { +} + +func (newState *UpdateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegrationOutput_SdkV2) { +} + +func (newState *UpdateCustomAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCustomAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCustomAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCustomAppIntegrationOutput_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, UpdateCustomAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCustomAppIntegrationOutput_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 UpdateCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdatePublishedAppIntegration_SdkV2 struct { + IntegrationId types.String `tfsdk:"-"` + // Token access policy to be updated in the published OAuth app integration + TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` +} + +func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration_SdkV2) { +} + +func (newState *UpdatePublishedAppIntegration_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegration_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePublishedAppIntegration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_access_policy": reflect.TypeOf(TokenAccessPolicy_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, UpdatePublishedAppIntegration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePublishedAppIntegration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_id": o.IntegrationId, + "token_access_policy": o.TokenAccessPolicy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdatePublishedAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_id": types.StringType, + "token_access_policy": basetypes.ListType{ + ElemType: TokenAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetTokenAccessPolicy returns the value of the TokenAccessPolicy field in UpdatePublishedAppIntegration_SdkV2 as +// a TokenAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdatePublishedAppIntegration_SdkV2) GetTokenAccessPolicy(ctx context.Context) (TokenAccessPolicy_SdkV2, bool) { + var e TokenAccessPolicy_SdkV2 + if o.TokenAccessPolicy.IsNull() || o.TokenAccessPolicy.IsUnknown() { + return e, false + } + var v []TokenAccessPolicy_SdkV2 + d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in UpdatePublishedAppIntegration_SdkV2. +func (o *UpdatePublishedAppIntegration_SdkV2) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] + o.TokenAccessPolicy = types.ListValueMust(t, vs) +} + +type UpdatePublishedAppIntegrationOutput_SdkV2 struct { +} + +func (newState *UpdatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegrationOutput_SdkV2) { +} + +func (newState *UpdatePublishedAppIntegrationOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePublishedAppIntegrationOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePublishedAppIntegrationOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePublishedAppIntegrationOutput_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, UpdatePublishedAppIntegrationOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePublishedAppIntegrationOutput_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 UpdatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} diff --git a/internal/service/oauth2_tf/model.go b/internal/service/oauth2_tf/model.go index e2e8defbd..1b756b9fd 100755 --- a/internal/service/oauth2_tf/model.go +++ b/internal/service/oauth2_tf/model.go @@ -33,7 +33,7 @@ type CreateCustomAppIntegration struct { // offline_access, openid, profile, email. Scopes types.List `tfsdk:"scopes" tf:"optional"` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *CreateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomAppIntegration) { @@ -84,9 +84,7 @@ func (o CreateCustomAppIntegration) Type(ctx context.Context) attr.Type { "scopes": basetypes.ListType{ ElemType: types.StringType, }, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -152,7 +150,10 @@ func (o *CreateCustomAppIntegration) GetTokenAccessPolicy(ctx context.Context) ( return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -164,9 +165,8 @@ func (o *CreateCustomAppIntegration) GetTokenAccessPolicy(ctx context.Context) ( // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in CreateCustomAppIntegration. func (o *CreateCustomAppIntegration) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } type CreateCustomAppIntegrationOutput struct { @@ -225,7 +225,7 @@ type CreatePublishedAppIntegration struct { // tableau-deskop AppId types.String `tfsdk:"app_id" tf:"optional"` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *CreatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePublishedAppIntegration) { @@ -263,10 +263,8 @@ func (o CreatePublishedAppIntegration) ToObjectValue(ctx context.Context) basety func (o CreatePublishedAppIntegration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "app_id": types.StringType, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "app_id": types.StringType, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -280,7 +278,10 @@ func (o *CreatePublishedAppIntegration) GetTokenAccessPolicy(ctx context.Context return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -292,9 +293,8 @@ func (o *CreatePublishedAppIntegration) GetTokenAccessPolicy(ctx context.Context // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in CreatePublishedAppIntegration. func (o *CreatePublishedAppIntegration) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } type CreatePublishedAppIntegrationOutput struct { @@ -750,7 +750,7 @@ type GetCustomAppIntegrationOutput struct { Scopes types.List `tfsdk:"scopes" tf:"optional"` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *GetCustomAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCustomAppIntegrationOutput) { @@ -811,9 +811,7 @@ func (o GetCustomAppIntegrationOutput) Type(ctx context.Context) attr.Type { "scopes": basetypes.ListType{ ElemType: types.StringType, }, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -879,7 +877,10 @@ func (o *GetCustomAppIntegrationOutput) GetTokenAccessPolicy(ctx context.Context return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -891,9 +892,8 @@ func (o *GetCustomAppIntegrationOutput) GetTokenAccessPolicy(ctx context.Context // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in GetCustomAppIntegrationOutput. func (o *GetCustomAppIntegrationOutput) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } // Get OAuth Custom App Integration @@ -1027,7 +1027,7 @@ type GetPublishedAppIntegrationOutput struct { // Display name of the published OAuth app Name types.String `tfsdk:"name" tf:"optional"` // Token access policy - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *GetPublishedAppIntegrationOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPublishedAppIntegrationOutput) { @@ -1069,14 +1069,12 @@ func (o GetPublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) bas func (o GetPublishedAppIntegrationOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "app_id": types.StringType, - "create_time": types.StringType, - "created_by": types.Int64Type, - "integration_id": types.StringType, - "name": types.StringType, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "app_id": types.StringType, + "create_time": types.StringType, + "created_by": types.Int64Type, + "integration_id": types.StringType, + "name": types.StringType, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -1090,7 +1088,10 @@ func (o *GetPublishedAppIntegrationOutput) GetTokenAccessPolicy(ctx context.Cont return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1102,9 +1103,8 @@ func (o *GetPublishedAppIntegrationOutput) GetTokenAccessPolicy(ctx context.Cont // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in GetPublishedAppIntegrationOutput. func (o *GetPublishedAppIntegrationOutput) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } // Get OAuth Published App Integration @@ -1813,7 +1813,7 @@ type UpdateCustomAppIntegration struct { // integration RedirectUrls types.List `tfsdk:"redirect_urls" tf:"optional"` // Token access policy to be updated in the custom OAuth app integration - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *UpdateCustomAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCustomAppIntegration) { @@ -1857,9 +1857,7 @@ func (o UpdateCustomAppIntegration) Type(ctx context.Context) attr.Type { "redirect_urls": basetypes.ListType{ ElemType: types.StringType, }, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -1899,7 +1897,10 @@ func (o *UpdateCustomAppIntegration) GetTokenAccessPolicy(ctx context.Context) ( return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1911,9 +1912,8 @@ func (o *UpdateCustomAppIntegration) GetTokenAccessPolicy(ctx context.Context) ( // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in UpdateCustomAppIntegration. func (o *UpdateCustomAppIntegration) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } type UpdateCustomAppIntegrationOutput struct { @@ -1955,7 +1955,7 @@ func (o UpdateCustomAppIntegrationOutput) Type(ctx context.Context) attr.Type { type UpdatePublishedAppIntegration struct { IntegrationId types.String `tfsdk:"-"` // Token access policy to be updated in the published OAuth app integration - TokenAccessPolicy types.List `tfsdk:"token_access_policy" tf:"optional,object"` + TokenAccessPolicy types.Object `tfsdk:"token_access_policy" tf:"optional,object"` } func (newState *UpdatePublishedAppIntegration) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePublishedAppIntegration) { @@ -1993,10 +1993,8 @@ func (o UpdatePublishedAppIntegration) ToObjectValue(ctx context.Context) basety func (o UpdatePublishedAppIntegration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "integration_id": types.StringType, - "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), - }, + "integration_id": types.StringType, + "token_access_policy": TokenAccessPolicy{}.Type(ctx), }, } } @@ -2010,7 +2008,10 @@ func (o *UpdatePublishedAppIntegration) GetTokenAccessPolicy(ctx context.Context return e, false } var v []TokenAccessPolicy - d := o.TokenAccessPolicy.ElementsAs(ctx, &v, true) + d := o.TokenAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2022,9 +2023,8 @@ func (o *UpdatePublishedAppIntegration) GetTokenAccessPolicy(ctx context.Context // SetTokenAccessPolicy sets the value of the TokenAccessPolicy field in UpdatePublishedAppIntegration. func (o *UpdatePublishedAppIntegration) SetTokenAccessPolicy(ctx context.Context, v TokenAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_access_policy"] - o.TokenAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenAccessPolicy = vs } type UpdatePublishedAppIntegrationOutput struct { diff --git a/internal/service/pipelines_tf/legacy_model.go b/internal/service/pipelines_tf/legacy_model.go new file mode 100755 index 000000000..f05c51af9 --- /dev/null +++ b/internal/service/pipelines_tf/legacy_model.go @@ -0,0 +1,6059 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package pipelines_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/compute_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type CreatePipeline_SdkV2 struct { + // If false, deployment will fail if name conflicts with that of another + // pipeline. + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + // Budget policy of this pipeline. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // A catalog in Unity Catalog to publish data from this pipeline to. If + // `target` is specified, tables in this pipeline are published to a + // `target` schema inside `catalog` (for example, + // `catalog`.`target`.`table`). If `target` is not specified, no data is + // published to Unity Catalog. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // DLT Release Channel that specifies which version to use. + Channel types.String `tfsdk:"channel" tf:"optional"` + // Cluster settings for this pipeline deployment. + Clusters types.List `tfsdk:"clusters" tf:"optional"` + // String-String configuration for this pipeline execution. + Configuration types.Map `tfsdk:"configuration" tf:"optional"` + // Whether the pipeline is continuous or triggered. This replaces `trigger`. + Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + // Deployment type of this pipeline. + Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + // Whether the pipeline is in Development mode. Defaults to false. + Development types.Bool `tfsdk:"development" tf:"optional"` + + DryRun types.Bool `tfsdk:"dry_run" tf:"optional"` + // Pipeline product edition. + Edition types.String `tfsdk:"edition" tf:"optional"` + // Filters on which Pipeline packages to include in the deployed graph. + Filters types.List `tfsdk:"filters" tf:"optional,object"` + // The definition of a gateway pipeline to support change data capture. + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + // Unique identifier for this pipeline. + Id types.String `tfsdk:"id" tf:"optional"` + // The configuration for a managed ingestion pipeline. These settings cannot + // be used with the 'libraries', 'target' or 'catalog' settings. + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + // Libraries or code needed by this deployment. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Friendly identifier for this pipeline. + Name types.String `tfsdk:"name" tf:"optional"` + // List of notification settings for this pipeline. + Notifications types.List `tfsdk:"notifications" tf:"optional"` + // Whether Photon is enabled for this pipeline. + Photon types.Bool `tfsdk:"photon" tf:"optional"` + // Restart window of this pipeline. + RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + // The default schema (database) where tables are read from or published to. + // The presence of this field implies that the pipeline is in direct + // publishing mode. + Schema types.String `tfsdk:"schema" tf:"optional"` + // Whether serverless compute is enabled for this pipeline. + Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + // DBFS root directory for storing checkpoints and tables. + Storage types.String `tfsdk:"storage" tf:"optional"` + // Target schema (database) to add tables in this pipeline to. If not + // specified, no data is published to the Hive metastore or Unity Catalog. + // To publish to Unity Catalog, also specify `catalog`. + Target types.String `tfsdk:"target" tf:"optional"` + // Which pipeline trigger to use. Deprecated: Use `continuous` instead. + Trigger types.List `tfsdk:"trigger" tf:"optional,object"` +} + +func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline_SdkV2) { +} + +func (newState *CreatePipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePipeline_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePipeline_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clusters": reflect.TypeOf(PipelineCluster_SdkV2{}), + "configuration": reflect.TypeOf(types.String{}), + "deployment": reflect.TypeOf(PipelineDeployment_SdkV2{}), + "filters": reflect.TypeOf(Filters_SdkV2{}), + "gateway_definition": reflect.TypeOf(IngestionGatewayPipelineDefinition_SdkV2{}), + "ingestion_definition": reflect.TypeOf(IngestionPipelineDefinition_SdkV2{}), + "libraries": reflect.TypeOf(PipelineLibrary_SdkV2{}), + "notifications": reflect.TypeOf(Notifications_SdkV2{}), + "restart_window": reflect.TypeOf(RestartWindow_SdkV2{}), + "trigger": reflect.TypeOf(PipelineTrigger_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, CreatePipeline_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePipeline_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_duplicate_names": o.AllowDuplicateNames, + "budget_policy_id": o.BudgetPolicyId, + "catalog": o.Catalog, + "channel": o.Channel, + "clusters": o.Clusters, + "configuration": o.Configuration, + "continuous": o.Continuous, + "deployment": o.Deployment, + "development": o.Development, + "dry_run": o.DryRun, + "edition": o.Edition, + "filters": o.Filters, + "gateway_definition": o.GatewayDefinition, + "id": o.Id, + "ingestion_definition": o.IngestionDefinition, + "libraries": o.Libraries, + "name": o.Name, + "notifications": o.Notifications, + "photon": o.Photon, + "restart_window": o.RestartWindow, + "schema": o.Schema, + "serverless": o.Serverless, + "storage": o.Storage, + "target": o.Target, + "trigger": o.Trigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePipeline_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_duplicate_names": types.BoolType, + "budget_policy_id": types.StringType, + "catalog": types.StringType, + "channel": types.StringType, + "clusters": basetypes.ListType{ + ElemType: PipelineCluster{}.Type(ctx), + }, + "configuration": basetypes.MapType{ + ElemType: types.StringType, + }, + "continuous": types.BoolType, + "deployment": basetypes.ListType{ + ElemType: PipelineDeployment{}.Type(ctx), + }, + "development": types.BoolType, + "dry_run": types.BoolType, + "edition": types.StringType, + "filters": basetypes.ListType{ + ElemType: Filters{}.Type(ctx), + }, + "gateway_definition": basetypes.ListType{ + ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + }, + "id": types.StringType, + "ingestion_definition": basetypes.ListType{ + ElemType: IngestionPipelineDefinition{}.Type(ctx), + }, + "libraries": basetypes.ListType{ + ElemType: PipelineLibrary{}.Type(ctx), + }, + "name": types.StringType, + "notifications": basetypes.ListType{ + ElemType: Notifications{}.Type(ctx), + }, + "photon": types.BoolType, + "restart_window": basetypes.ListType{ + ElemType: RestartWindow{}.Type(ctx), + }, + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": basetypes.ListType{ + ElemType: PipelineTrigger{}.Type(ctx), + }, + }, + } +} + +// GetClusters returns the value of the Clusters field in CreatePipeline_SdkV2 as +// a slice of PipelineCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetClusters(ctx context.Context) ([]PipelineCluster_SdkV2, bool) { + if o.Clusters.IsNull() || o.Clusters.IsUnknown() { + return nil, false + } + var v []PipelineCluster_SdkV2 + d := o.Clusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusters sets the value of the Clusters field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetClusters(ctx context.Context, v []PipelineCluster_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["clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Clusters = types.ListValueMust(t, vs) +} + +// GetConfiguration returns the value of the Configuration field in CreatePipeline_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 *CreatePipeline_SdkV2) GetConfiguration(ctx context.Context) (map[string]types.String, bool) { + if o.Configuration.IsNull() || o.Configuration.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Configuration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConfiguration sets the value of the Configuration field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetConfiguration(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["configuration"] + t = t.(attr.TypeWithElementType).ElementType() + o.Configuration = types.MapValueMust(t, vs) +} + +// GetDeployment returns the value of the Deployment field in CreatePipeline_SdkV2 as +// a PipelineDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetDeployment(ctx context.Context) (PipelineDeployment_SdkV2, bool) { + var e PipelineDeployment_SdkV2 + if o.Deployment.IsNull() || o.Deployment.IsUnknown() { + return e, false + } + var v []PipelineDeployment_SdkV2 + d := o.Deployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeployment sets the value of the Deployment field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetDeployment(ctx context.Context, v PipelineDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] + o.Deployment = types.ListValueMust(t, vs) +} + +// GetFilters returns the value of the Filters field in CreatePipeline_SdkV2 as +// a Filters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetFilters(ctx context.Context) (Filters_SdkV2, bool) { + var e Filters_SdkV2 + if o.Filters.IsNull() || o.Filters.IsUnknown() { + return e, false + } + var v []Filters_SdkV2 + d := o.Filters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilters sets the value of the Filters field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetFilters(ctx context.Context, v Filters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] + o.Filters = types.ListValueMust(t, vs) +} + +// GetGatewayDefinition returns the value of the GatewayDefinition field in CreatePipeline_SdkV2 as +// a IngestionGatewayPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetGatewayDefinition(ctx context.Context) (IngestionGatewayPipelineDefinition_SdkV2, bool) { + var e IngestionGatewayPipelineDefinition_SdkV2 + if o.GatewayDefinition.IsNull() || o.GatewayDefinition.IsUnknown() { + return e, false + } + var v []IngestionGatewayPipelineDefinition_SdkV2 + d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGatewayDefinition sets the value of the GatewayDefinition field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] + o.GatewayDefinition = types.ListValueMust(t, vs) +} + +// GetIngestionDefinition returns the value of the IngestionDefinition field in CreatePipeline_SdkV2 as +// a IngestionPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetIngestionDefinition(ctx context.Context) (IngestionPipelineDefinition_SdkV2, bool) { + var e IngestionPipelineDefinition_SdkV2 + if o.IngestionDefinition.IsNull() || o.IngestionDefinition.IsUnknown() { + return e, false + } + var v []IngestionPipelineDefinition_SdkV2 + d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIngestionDefinition sets the value of the IngestionDefinition field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] + o.IngestionDefinition = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in CreatePipeline_SdkV2 as +// a slice of PipelineLibrary_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetLibraries(ctx context.Context) ([]PipelineLibrary_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []PipelineLibrary_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetLibraries(ctx context.Context, v []PipelineLibrary_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in CreatePipeline_SdkV2 as +// a slice of Notifications_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetNotifications(ctx context.Context) ([]Notifications_SdkV2, bool) { + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return nil, false + } + var v []Notifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotifications sets the value of the Notifications field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetNotifications(ctx context.Context, v []Notifications_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["notifications"] + t = t.(attr.TypeWithElementType).ElementType() + o.Notifications = types.ListValueMust(t, vs) +} + +// GetRestartWindow returns the value of the RestartWindow field in CreatePipeline_SdkV2 as +// a RestartWindow_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetRestartWindow(ctx context.Context) (RestartWindow_SdkV2, bool) { + var e RestartWindow_SdkV2 + if o.RestartWindow.IsNull() || o.RestartWindow.IsUnknown() { + return e, false + } + var v []RestartWindow_SdkV2 + d := o.RestartWindow.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRestartWindow sets the value of the RestartWindow field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetRestartWindow(ctx context.Context, v RestartWindow_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] + o.RestartWindow = types.ListValueMust(t, vs) +} + +// GetTrigger returns the value of the Trigger field in CreatePipeline_SdkV2 as +// a PipelineTrigger_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipeline_SdkV2) GetTrigger(ctx context.Context) (PipelineTrigger_SdkV2, bool) { + var e PipelineTrigger_SdkV2 + if o.Trigger.IsNull() || o.Trigger.IsUnknown() { + return e, false + } + var v []PipelineTrigger_SdkV2 + d := o.Trigger.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrigger sets the value of the Trigger field in CreatePipeline_SdkV2. +func (o *CreatePipeline_SdkV2) SetTrigger(ctx context.Context, v PipelineTrigger_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] + o.Trigger = types.ListValueMust(t, vs) +} + +type CreatePipelineResponse_SdkV2 struct { + // Only returned when dry_run is true. + EffectiveSettings types.List `tfsdk:"effective_settings" tf:"optional,object"` + // The unique identifier for the newly created pipeline. Only returned when + // dry_run is false. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` +} + +func (newState *CreatePipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipelineResponse_SdkV2) { +} + +func (newState *CreatePipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePipelineResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePipelineResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePipelineResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "effective_settings": reflect.TypeOf(PipelineSpec_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, CreatePipelineResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePipelineResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "effective_settings": o.EffectiveSettings, + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "effective_settings": basetypes.ListType{ + ElemType: PipelineSpec{}.Type(ctx), + }, + "pipeline_id": types.StringType, + }, + } +} + +// GetEffectiveSettings returns the value of the EffectiveSettings field in CreatePipelineResponse_SdkV2 as +// a PipelineSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreatePipelineResponse_SdkV2) GetEffectiveSettings(ctx context.Context) (PipelineSpec_SdkV2, bool) { + var e PipelineSpec_SdkV2 + if o.EffectiveSettings.IsNull() || o.EffectiveSettings.IsUnknown() { + return e, false + } + var v []PipelineSpec_SdkV2 + d := o.EffectiveSettings.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEffectiveSettings sets the value of the EffectiveSettings field in CreatePipelineResponse_SdkV2. +func (o *CreatePipelineResponse_SdkV2) SetEffectiveSettings(ctx context.Context, v PipelineSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_settings"] + o.EffectiveSettings = types.ListValueMust(t, vs) +} + +type CronTrigger_SdkV2 struct { + QuartzCronSchedule types.String `tfsdk:"quartz_cron_schedule" tf:"optional"` + + TimezoneId types.String `tfsdk:"timezone_id" tf:"optional"` +} + +func (newState *CronTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CronTrigger_SdkV2) { +} + +func (newState *CronTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState CronTrigger_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CronTrigger. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CronTrigger_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, CronTrigger_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CronTrigger_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "quartz_cron_schedule": o.QuartzCronSchedule, + "timezone_id": o.TimezoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CronTrigger_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "quartz_cron_schedule": types.StringType, + "timezone_id": types.StringType, + }, + } +} + +type DataPlaneId_SdkV2 struct { + // The instance name of the data plane emitting an event. + Instance types.String `tfsdk:"instance" tf:"optional"` + // A sequence number, unique and increasing within the data plane instance. + SeqNo types.Int64 `tfsdk:"seq_no" tf:"optional"` +} + +func (newState *DataPlaneId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataPlaneId_SdkV2) { +} + +func (newState *DataPlaneId_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataPlaneId_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataPlaneId. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataPlaneId_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, DataPlaneId_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataPlaneId_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "instance": o.Instance, + "seq_no": o.SeqNo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataPlaneId_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "instance": types.StringType, + "seq_no": types.Int64Type, + }, + } +} + +// Delete a pipeline +type DeletePipelineRequest_SdkV2 struct { + PipelineId types.String `tfsdk:"-"` +} + +func (newState *DeletePipelineRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePipelineRequest_SdkV2) { +} + +func (newState *DeletePipelineRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePipelineRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePipelineRequest_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, DeletePipelineRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePipelineRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePipelineRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + }, + } +} + +type DeletePipelineResponse_SdkV2 struct { +} + +func (newState *DeletePipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePipelineResponse_SdkV2) { +} + +func (newState *DeletePipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePipelineResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePipelineResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePipelineResponse_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, DeletePipelineResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePipelineResponse_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 DeletePipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EditPipeline_SdkV2 struct { + // If false, deployment will fail if name has changed and conflicts the name + // of another pipeline. + AllowDuplicateNames types.Bool `tfsdk:"allow_duplicate_names" tf:"optional"` + // Budget policy of this pipeline. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // A catalog in Unity Catalog to publish data from this pipeline to. If + // `target` is specified, tables in this pipeline are published to a + // `target` schema inside `catalog` (for example, + // `catalog`.`target`.`table`). If `target` is not specified, no data is + // published to Unity Catalog. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // DLT Release Channel that specifies which version to use. + Channel types.String `tfsdk:"channel" tf:"optional"` + // Cluster settings for this pipeline deployment. + Clusters types.List `tfsdk:"clusters" tf:"optional"` + // String-String configuration for this pipeline execution. + Configuration types.Map `tfsdk:"configuration" tf:"optional"` + // Whether the pipeline is continuous or triggered. This replaces `trigger`. + Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + // Deployment type of this pipeline. + Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + // Whether the pipeline is in Development mode. Defaults to false. + Development types.Bool `tfsdk:"development" tf:"optional"` + // Pipeline product edition. + Edition types.String `tfsdk:"edition" tf:"optional"` + // If present, the last-modified time of the pipeline settings before the + // edit. If the settings were modified after that time, then the request + // will fail with a conflict. + ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:"optional"` + // Filters on which Pipeline packages to include in the deployed graph. + Filters types.List `tfsdk:"filters" tf:"optional,object"` + // The definition of a gateway pipeline to support change data capture. + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + // Unique identifier for this pipeline. + Id types.String `tfsdk:"id" tf:"optional"` + // The configuration for a managed ingestion pipeline. These settings cannot + // be used with the 'libraries', 'target' or 'catalog' settings. + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + // Libraries or code needed by this deployment. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Friendly identifier for this pipeline. + Name types.String `tfsdk:"name" tf:"optional"` + // List of notification settings for this pipeline. + Notifications types.List `tfsdk:"notifications" tf:"optional"` + // Whether Photon is enabled for this pipeline. + Photon types.Bool `tfsdk:"photon" tf:"optional"` + // Unique identifier for this pipeline. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // Restart window of this pipeline. + RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + // The default schema (database) where tables are read from or published to. + // The presence of this field implies that the pipeline is in direct + // publishing mode. + Schema types.String `tfsdk:"schema" tf:"optional"` + // Whether serverless compute is enabled for this pipeline. + Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + // DBFS root directory for storing checkpoints and tables. + Storage types.String `tfsdk:"storage" tf:"optional"` + // Target schema (database) to add tables in this pipeline to. If not + // specified, no data is published to the Hive metastore or Unity Catalog. + // To publish to Unity Catalog, also specify `catalog`. + Target types.String `tfsdk:"target" tf:"optional"` + // Which pipeline trigger to use. Deprecated: Use `continuous` instead. + Trigger types.List `tfsdk:"trigger" tf:"optional,object"` +} + +func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline_SdkV2) { +} + +func (newState *EditPipeline_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPipeline_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditPipeline_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clusters": reflect.TypeOf(PipelineCluster_SdkV2{}), + "configuration": reflect.TypeOf(types.String{}), + "deployment": reflect.TypeOf(PipelineDeployment_SdkV2{}), + "filters": reflect.TypeOf(Filters_SdkV2{}), + "gateway_definition": reflect.TypeOf(IngestionGatewayPipelineDefinition_SdkV2{}), + "ingestion_definition": reflect.TypeOf(IngestionPipelineDefinition_SdkV2{}), + "libraries": reflect.TypeOf(PipelineLibrary_SdkV2{}), + "notifications": reflect.TypeOf(Notifications_SdkV2{}), + "restart_window": reflect.TypeOf(RestartWindow_SdkV2{}), + "trigger": reflect.TypeOf(PipelineTrigger_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, EditPipeline_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditPipeline_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_duplicate_names": o.AllowDuplicateNames, + "budget_policy_id": o.BudgetPolicyId, + "catalog": o.Catalog, + "channel": o.Channel, + "clusters": o.Clusters, + "configuration": o.Configuration, + "continuous": o.Continuous, + "deployment": o.Deployment, + "development": o.Development, + "edition": o.Edition, + "expected_last_modified": o.ExpectedLastModified, + "filters": o.Filters, + "gateway_definition": o.GatewayDefinition, + "id": o.Id, + "ingestion_definition": o.IngestionDefinition, + "libraries": o.Libraries, + "name": o.Name, + "notifications": o.Notifications, + "photon": o.Photon, + "pipeline_id": o.PipelineId, + "restart_window": o.RestartWindow, + "schema": o.Schema, + "serverless": o.Serverless, + "storage": o.Storage, + "target": o.Target, + "trigger": o.Trigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditPipeline_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_duplicate_names": types.BoolType, + "budget_policy_id": types.StringType, + "catalog": types.StringType, + "channel": types.StringType, + "clusters": basetypes.ListType{ + ElemType: PipelineCluster{}.Type(ctx), + }, + "configuration": basetypes.MapType{ + ElemType: types.StringType, + }, + "continuous": types.BoolType, + "deployment": basetypes.ListType{ + ElemType: PipelineDeployment{}.Type(ctx), + }, + "development": types.BoolType, + "edition": types.StringType, + "expected_last_modified": types.Int64Type, + "filters": basetypes.ListType{ + ElemType: Filters{}.Type(ctx), + }, + "gateway_definition": basetypes.ListType{ + ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + }, + "id": types.StringType, + "ingestion_definition": basetypes.ListType{ + ElemType: IngestionPipelineDefinition{}.Type(ctx), + }, + "libraries": basetypes.ListType{ + ElemType: PipelineLibrary{}.Type(ctx), + }, + "name": types.StringType, + "notifications": basetypes.ListType{ + ElemType: Notifications{}.Type(ctx), + }, + "photon": types.BoolType, + "pipeline_id": types.StringType, + "restart_window": basetypes.ListType{ + ElemType: RestartWindow{}.Type(ctx), + }, + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": basetypes.ListType{ + ElemType: PipelineTrigger{}.Type(ctx), + }, + }, + } +} + +// GetClusters returns the value of the Clusters field in EditPipeline_SdkV2 as +// a slice of PipelineCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetClusters(ctx context.Context) ([]PipelineCluster_SdkV2, bool) { + if o.Clusters.IsNull() || o.Clusters.IsUnknown() { + return nil, false + } + var v []PipelineCluster_SdkV2 + d := o.Clusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusters sets the value of the Clusters field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetClusters(ctx context.Context, v []PipelineCluster_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["clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Clusters = types.ListValueMust(t, vs) +} + +// GetConfiguration returns the value of the Configuration field in EditPipeline_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 *EditPipeline_SdkV2) GetConfiguration(ctx context.Context) (map[string]types.String, bool) { + if o.Configuration.IsNull() || o.Configuration.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Configuration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConfiguration sets the value of the Configuration field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetConfiguration(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["configuration"] + t = t.(attr.TypeWithElementType).ElementType() + o.Configuration = types.MapValueMust(t, vs) +} + +// GetDeployment returns the value of the Deployment field in EditPipeline_SdkV2 as +// a PipelineDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetDeployment(ctx context.Context) (PipelineDeployment_SdkV2, bool) { + var e PipelineDeployment_SdkV2 + if o.Deployment.IsNull() || o.Deployment.IsUnknown() { + return e, false + } + var v []PipelineDeployment_SdkV2 + d := o.Deployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeployment sets the value of the Deployment field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetDeployment(ctx context.Context, v PipelineDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] + o.Deployment = types.ListValueMust(t, vs) +} + +// GetFilters returns the value of the Filters field in EditPipeline_SdkV2 as +// a Filters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetFilters(ctx context.Context) (Filters_SdkV2, bool) { + var e Filters_SdkV2 + if o.Filters.IsNull() || o.Filters.IsUnknown() { + return e, false + } + var v []Filters_SdkV2 + d := o.Filters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilters sets the value of the Filters field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetFilters(ctx context.Context, v Filters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] + o.Filters = types.ListValueMust(t, vs) +} + +// GetGatewayDefinition returns the value of the GatewayDefinition field in EditPipeline_SdkV2 as +// a IngestionGatewayPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetGatewayDefinition(ctx context.Context) (IngestionGatewayPipelineDefinition_SdkV2, bool) { + var e IngestionGatewayPipelineDefinition_SdkV2 + if o.GatewayDefinition.IsNull() || o.GatewayDefinition.IsUnknown() { + return e, false + } + var v []IngestionGatewayPipelineDefinition_SdkV2 + d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGatewayDefinition sets the value of the GatewayDefinition field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] + o.GatewayDefinition = types.ListValueMust(t, vs) +} + +// GetIngestionDefinition returns the value of the IngestionDefinition field in EditPipeline_SdkV2 as +// a IngestionPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetIngestionDefinition(ctx context.Context) (IngestionPipelineDefinition_SdkV2, bool) { + var e IngestionPipelineDefinition_SdkV2 + if o.IngestionDefinition.IsNull() || o.IngestionDefinition.IsUnknown() { + return e, false + } + var v []IngestionPipelineDefinition_SdkV2 + d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIngestionDefinition sets the value of the IngestionDefinition field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] + o.IngestionDefinition = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in EditPipeline_SdkV2 as +// a slice of PipelineLibrary_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetLibraries(ctx context.Context) ([]PipelineLibrary_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []PipelineLibrary_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetLibraries(ctx context.Context, v []PipelineLibrary_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in EditPipeline_SdkV2 as +// a slice of Notifications_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetNotifications(ctx context.Context) ([]Notifications_SdkV2, bool) { + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return nil, false + } + var v []Notifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotifications sets the value of the Notifications field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetNotifications(ctx context.Context, v []Notifications_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["notifications"] + t = t.(attr.TypeWithElementType).ElementType() + o.Notifications = types.ListValueMust(t, vs) +} + +// GetRestartWindow returns the value of the RestartWindow field in EditPipeline_SdkV2 as +// a RestartWindow_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetRestartWindow(ctx context.Context) (RestartWindow_SdkV2, bool) { + var e RestartWindow_SdkV2 + if o.RestartWindow.IsNull() || o.RestartWindow.IsUnknown() { + return e, false + } + var v []RestartWindow_SdkV2 + d := o.RestartWindow.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRestartWindow sets the value of the RestartWindow field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetRestartWindow(ctx context.Context, v RestartWindow_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] + o.RestartWindow = types.ListValueMust(t, vs) +} + +// GetTrigger returns the value of the Trigger field in EditPipeline_SdkV2 as +// a PipelineTrigger_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditPipeline_SdkV2) GetTrigger(ctx context.Context) (PipelineTrigger_SdkV2, bool) { + var e PipelineTrigger_SdkV2 + if o.Trigger.IsNull() || o.Trigger.IsUnknown() { + return e, false + } + var v []PipelineTrigger_SdkV2 + d := o.Trigger.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrigger sets the value of the Trigger field in EditPipeline_SdkV2. +func (o *EditPipeline_SdkV2) SetTrigger(ctx context.Context, v PipelineTrigger_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] + o.Trigger = types.ListValueMust(t, vs) +} + +type EditPipelineResponse_SdkV2 struct { +} + +func (newState *EditPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipelineResponse_SdkV2) { +} + +func (newState *EditPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditPipelineResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditPipelineResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditPipelineResponse_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, EditPipelineResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditPipelineResponse_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 EditPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ErrorDetail_SdkV2 struct { + // The exception thrown for this error, with its chain of cause. + Exceptions types.List `tfsdk:"exceptions" tf:"optional"` + // Whether this error is considered fatal, that is, unrecoverable. + Fatal types.Bool `tfsdk:"fatal" tf:"optional"` +} + +func (newState *ErrorDetail_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ErrorDetail_SdkV2) { +} + +func (newState *ErrorDetail_SdkV2) SyncEffectiveFieldsDuringRead(existingState ErrorDetail_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ErrorDetail. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ErrorDetail_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exceptions": reflect.TypeOf(SerializedException_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, ErrorDetail_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ErrorDetail_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exceptions": o.Exceptions, + "fatal": o.Fatal, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ErrorDetail_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exceptions": basetypes.ListType{ + ElemType: SerializedException{}.Type(ctx), + }, + "fatal": types.BoolType, + }, + } +} + +// GetExceptions returns the value of the Exceptions field in ErrorDetail_SdkV2 as +// a slice of SerializedException_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ErrorDetail_SdkV2) GetExceptions(ctx context.Context) ([]SerializedException_SdkV2, bool) { + if o.Exceptions.IsNull() || o.Exceptions.IsUnknown() { + return nil, false + } + var v []SerializedException_SdkV2 + d := o.Exceptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExceptions sets the value of the Exceptions field in ErrorDetail_SdkV2. +func (o *ErrorDetail_SdkV2) SetExceptions(ctx context.Context, v []SerializedException_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["exceptions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Exceptions = types.ListValueMust(t, vs) +} + +type FileLibrary_SdkV2 struct { + // The absolute path of the file. + Path types.String `tfsdk:"path" tf:"optional"` +} + +func (newState *FileLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FileLibrary_SdkV2) { +} + +func (newState *FileLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState FileLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FileLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FileLibrary_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, FileLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FileLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FileLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +type Filters_SdkV2 struct { + // Paths to exclude. + Exclude types.List `tfsdk:"exclude" tf:"optional"` + // Paths to include. + Include types.List `tfsdk:"include" tf:"optional"` +} + +func (newState *Filters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Filters_SdkV2) { +} + +func (newState *Filters_SdkV2) SyncEffectiveFieldsDuringRead(existingState Filters_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Filters. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Filters_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "exclude": reflect.TypeOf(types.String{}), + "include": 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, Filters_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Filters_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "exclude": o.Exclude, + "include": o.Include, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Filters_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "exclude": basetypes.ListType{ + ElemType: types.StringType, + }, + "include": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetExclude returns the value of the Exclude field in Filters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Filters_SdkV2) GetExclude(ctx context.Context) ([]types.String, bool) { + if o.Exclude.IsNull() || o.Exclude.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Exclude.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExclude sets the value of the Exclude field in Filters_SdkV2. +func (o *Filters_SdkV2) SetExclude(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["exclude"] + t = t.(attr.TypeWithElementType).ElementType() + o.Exclude = types.ListValueMust(t, vs) +} + +// GetInclude returns the value of the Include field in Filters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Filters_SdkV2) GetInclude(ctx context.Context) ([]types.String, bool) { + if o.Include.IsNull() || o.Include.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Include.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInclude sets the value of the Include field in Filters_SdkV2. +func (o *Filters_SdkV2) SetInclude(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["include"] + t = t.(attr.TypeWithElementType).ElementType() + o.Include = types.ListValueMust(t, vs) +} + +// Get pipeline permission levels +type GetPipelinePermissionLevelsRequest_SdkV2 struct { + // The pipeline for which to get or manage permissions. + PipelineId types.String `tfsdk:"-"` +} + +func (newState *GetPipelinePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsRequest_SdkV2) { +} + +func (newState *GetPipelinePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPipelinePermissionLevelsRequest_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, GetPipelinePermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPipelinePermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + }, + } +} + +type GetPipelinePermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetPipelinePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionLevelsResponse_SdkV2) { +} + +func (newState *GetPipelinePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPipelinePermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(PipelinePermissionsDescription_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, GetPipelinePermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPipelinePermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: PipelinePermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetPipelinePermissionLevelsResponse_SdkV2 as +// a slice of PipelinePermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPipelinePermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]PipelinePermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []PipelinePermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetPipelinePermissionLevelsResponse_SdkV2. +func (o *GetPipelinePermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []PipelinePermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get pipeline permissions +type GetPipelinePermissionsRequest_SdkV2 struct { + // The pipeline for which to get or manage permissions. + PipelineId types.String `tfsdk:"-"` +} + +func (newState *GetPipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelinePermissionsRequest_SdkV2) { +} + +func (newState *GetPipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelinePermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelinePermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPipelinePermissionsRequest_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, GetPipelinePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPipelinePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + }, + } +} + +// Get a pipeline +type GetPipelineRequest_SdkV2 struct { + PipelineId types.String `tfsdk:"-"` +} + +func (newState *GetPipelineRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineRequest_SdkV2) { +} + +func (newState *GetPipelineRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelineRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPipelineRequest_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, GetPipelineRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPipelineRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPipelineRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + }, + } +} + +type GetPipelineResponse_SdkV2 struct { + // An optional message detailing the cause of the pipeline state. + Cause types.String `tfsdk:"cause" tf:"optional"` + // The ID of the cluster that the pipeline is running on. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The username of the pipeline creator. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // Serverless budget policy ID of this pipeline. + EffectiveBudgetPolicyId types.String `tfsdk:"effective_budget_policy_id" tf:"optional"` + // The health of a pipeline. + Health types.String `tfsdk:"health" tf:"optional"` + // The last time the pipeline settings were modified or created. + LastModified types.Int64 `tfsdk:"last_modified" tf:"optional"` + // Status of the latest updates for the pipeline. Ordered with the newest + // update first. + LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + // A human friendly identifier for the pipeline, taken from the `spec`. + Name types.String `tfsdk:"name" tf:"optional"` + // The ID of the pipeline. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // Username of the user that the pipeline will run on behalf of. + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + // The pipeline specification. This field is not returned when called by + // `ListPipelines`. + Spec types.List `tfsdk:"spec" tf:"optional,object"` + // The pipeline state. + State types.String `tfsdk:"state" tf:"optional"` +} + +func (newState *GetPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPipelineResponse_SdkV2) { +} + +func (newState *GetPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPipelineResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPipelineResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPipelineResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "latest_updates": reflect.TypeOf(UpdateStateInfo_SdkV2{}), + "spec": reflect.TypeOf(PipelineSpec_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, GetPipelineResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPipelineResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cause": o.Cause, + "cluster_id": o.ClusterId, + "creator_user_name": o.CreatorUserName, + "effective_budget_policy_id": o.EffectiveBudgetPolicyId, + "health": o.Health, + "last_modified": o.LastModified, + "latest_updates": o.LatestUpdates, + "name": o.Name, + "pipeline_id": o.PipelineId, + "run_as_user_name": o.RunAsUserName, + "spec": o.Spec, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cause": types.StringType, + "cluster_id": types.StringType, + "creator_user_name": types.StringType, + "effective_budget_policy_id": types.StringType, + "health": types.StringType, + "last_modified": types.Int64Type, + "latest_updates": basetypes.ListType{ + ElemType: UpdateStateInfo{}.Type(ctx), + }, + "name": types.StringType, + "pipeline_id": types.StringType, + "run_as_user_name": types.StringType, + "spec": basetypes.ListType{ + ElemType: PipelineSpec{}.Type(ctx), + }, + "state": types.StringType, + }, + } +} + +// GetLatestUpdates returns the value of the LatestUpdates field in GetPipelineResponse_SdkV2 as +// a slice of UpdateStateInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetPipelineResponse_SdkV2) GetLatestUpdates(ctx context.Context) ([]UpdateStateInfo_SdkV2, bool) { + if o.LatestUpdates.IsNull() || o.LatestUpdates.IsUnknown() { + return nil, false + } + var v []UpdateStateInfo_SdkV2 + d := o.LatestUpdates.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLatestUpdates sets the value of the LatestUpdates field in GetPipelineResponse_SdkV2. +func (o *GetPipelineResponse_SdkV2) SetLatestUpdates(ctx context.Context, v []UpdateStateInfo_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["latest_updates"] + t = t.(attr.TypeWithElementType).ElementType() + o.LatestUpdates = 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. +func (o *GetPipelineResponse_SdkV2) GetSpec(ctx context.Context) (PipelineSpec_SdkV2, bool) { + var e PipelineSpec_SdkV2 + if o.Spec.IsNull() || o.Spec.IsUnknown() { + return e, false + } + var v []PipelineSpec_SdkV2 + d := o.Spec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSpec sets the value of the Spec field in GetPipelineResponse_SdkV2. +func (o *GetPipelineResponse_SdkV2) SetSpec(ctx context.Context, v PipelineSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] + o.Spec = types.ListValueMust(t, vs) +} + +// Get a pipeline update +type GetUpdateRequest_SdkV2 struct { + // The ID of the pipeline. + PipelineId types.String `tfsdk:"-"` + // The ID of the update. + UpdateId types.String `tfsdk:"-"` +} + +func (newState *GetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateRequest_SdkV2) { +} + +func (newState *GetUpdateRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUpdateRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetUpdateRequest_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, GetUpdateRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetUpdateRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + "update_id": o.UpdateId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + "update_id": types.StringType, + }, + } +} + +type GetUpdateResponse_SdkV2 struct { + // The current update info. + Update types.List `tfsdk:"update" tf:"optional,object"` +} + +func (newState *GetUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateResponse_SdkV2) { +} + +func (newState *GetUpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetUpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetUpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetUpdateResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "update": reflect.TypeOf(UpdateInfo_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, GetUpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetUpdateResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "update": o.Update, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetUpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "update": basetypes.ListType{ + ElemType: UpdateInfo{}.Type(ctx), + }, + }, + } +} + +// GetUpdate returns the value of the Update field in GetUpdateResponse_SdkV2 as +// a UpdateInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetUpdateResponse_SdkV2) GetUpdate(ctx context.Context) (UpdateInfo_SdkV2, bool) { + var e UpdateInfo_SdkV2 + if o.Update.IsNull() || o.Update.IsUnknown() { + return e, false + } + var v []UpdateInfo_SdkV2 + d := o.Update.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUpdate sets the value of the Update field in GetUpdateResponse_SdkV2. +func (o *GetUpdateResponse_SdkV2) SetUpdate(ctx context.Context, v UpdateInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["update"] + o.Update = types.ListValueMust(t, vs) +} + +type IngestionConfig_SdkV2 struct { + // Select a specific source report. + Report types.List `tfsdk:"report" tf:"optional,object"` + // Select all tables from a specific source schema. + Schema types.List `tfsdk:"schema" tf:"optional,object"` + // Select a specific source table. + Table types.List `tfsdk:"table" tf:"optional,object"` +} + +func (newState *IngestionConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionConfig_SdkV2) { +} + +func (newState *IngestionConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a IngestionConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "report": reflect.TypeOf(ReportSpec_SdkV2{}), + "schema": reflect.TypeOf(SchemaSpec_SdkV2{}), + "table": reflect.TypeOf(TableSpec_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, IngestionConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o IngestionConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "report": o.Report, + "schema": o.Schema, + "table": o.Table, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o IngestionConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "report": basetypes.ListType{ + ElemType: ReportSpec{}.Type(ctx), + }, + "schema": basetypes.ListType{ + ElemType: SchemaSpec{}.Type(ctx), + }, + "table": basetypes.ListType{ + ElemType: TableSpec{}.Type(ctx), + }, + }, + } +} + +// GetReport returns the value of the Report field in IngestionConfig_SdkV2 as +// a ReportSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *IngestionConfig_SdkV2) GetReport(ctx context.Context) (ReportSpec_SdkV2, bool) { + var e ReportSpec_SdkV2 + if o.Report.IsNull() || o.Report.IsUnknown() { + return e, false + } + var v []ReportSpec_SdkV2 + d := o.Report.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetReport sets the value of the Report field in IngestionConfig_SdkV2. +func (o *IngestionConfig_SdkV2) SetReport(ctx context.Context, v ReportSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["report"] + o.Report = types.ListValueMust(t, vs) +} + +// GetSchema returns the value of the Schema field in IngestionConfig_SdkV2 as +// a SchemaSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *IngestionConfig_SdkV2) GetSchema(ctx context.Context) (SchemaSpec_SdkV2, bool) { + var e SchemaSpec_SdkV2 + if o.Schema.IsNull() || o.Schema.IsUnknown() { + return e, false + } + var v []SchemaSpec_SdkV2 + d := o.Schema.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchema sets the value of the Schema field in IngestionConfig_SdkV2. +func (o *IngestionConfig_SdkV2) SetSchema(ctx context.Context, v SchemaSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schema"] + o.Schema = types.ListValueMust(t, vs) +} + +// GetTable returns the value of the Table field in IngestionConfig_SdkV2 as +// a TableSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *IngestionConfig_SdkV2) GetTable(ctx context.Context) (TableSpec_SdkV2, bool) { + var e TableSpec_SdkV2 + if o.Table.IsNull() || o.Table.IsUnknown() { + return e, false + } + var v []TableSpec_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 IngestionConfig_SdkV2. +func (o *IngestionConfig_SdkV2) SetTable(ctx context.Context, v TableSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] + o.Table = types.ListValueMust(t, vs) +} + +type IngestionGatewayPipelineDefinition_SdkV2 struct { + // [Deprecated, use connection_name instead] Immutable. The Unity Catalog + // connection that this gateway pipeline uses to communicate with the + // source. + ConnectionId types.String `tfsdk:"connection_id" tf:"optional"` + // Immutable. The Unity Catalog connection that this gateway pipeline uses + // to communicate with the source. + ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + // Required, Immutable. The name of the catalog for the gateway pipeline's + // storage location. + GatewayStorageCatalog types.String `tfsdk:"gateway_storage_catalog" tf:"optional"` + // Optional. The Unity Catalog-compatible name for the gateway storage + // location. This is the destination to use for the data that is extracted + // by the gateway. Delta Live Tables system will automatically create the + // storage location under the catalog and schema. + GatewayStorageName types.String `tfsdk:"gateway_storage_name" tf:"optional"` + // Required, Immutable. The name of the schema for the gateway pipelines's + // storage location. + GatewayStorageSchema types.String `tfsdk:"gateway_storage_schema" tf:"optional"` +} + +func (newState *IngestionGatewayPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionGatewayPipelineDefinition_SdkV2) { +} + +func (newState *IngestionGatewayPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionGatewayPipelineDefinition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionGatewayPipelineDefinition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a IngestionGatewayPipelineDefinition_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, IngestionGatewayPipelineDefinition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o IngestionGatewayPipelineDefinition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connection_id": o.ConnectionId, + "connection_name": o.ConnectionName, + "gateway_storage_catalog": o.GatewayStorageCatalog, + "gateway_storage_name": o.GatewayStorageName, + "gateway_storage_schema": o.GatewayStorageSchema, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o IngestionGatewayPipelineDefinition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connection_id": types.StringType, + "connection_name": types.StringType, + "gateway_storage_catalog": types.StringType, + "gateway_storage_name": types.StringType, + "gateway_storage_schema": types.StringType, + }, + } +} + +type IngestionPipelineDefinition_SdkV2 struct { + // Immutable. The Unity Catalog connection that this ingestion pipeline uses + // to communicate with the source. This is used with connectors for + // applications like Salesforce, Workday, and so on. + ConnectionName types.String `tfsdk:"connection_name" tf:"optional"` + // Immutable. Identifier for the gateway that is used by this ingestion + // pipeline to communicate with the source database. This is used with + // connectors to databases like SQL Server. + IngestionGatewayId types.String `tfsdk:"ingestion_gateway_id" tf:"optional"` + // Required. Settings specifying tables to replicate and the destination for + // the replicated tables. + Objects types.List `tfsdk:"objects" tf:"optional"` + // Configuration settings to control the ingestion of tables. These settings + // are applied to all tables in the pipeline. + TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` +} + +func (newState *IngestionPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionPipelineDefinition_SdkV2) { +} + +func (newState *IngestionPipelineDefinition_SdkV2) SyncEffectiveFieldsDuringRead(existingState IngestionPipelineDefinition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in IngestionPipelineDefinition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a IngestionPipelineDefinition_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "objects": reflect.TypeOf(IngestionConfig_SdkV2{}), + "table_configuration": reflect.TypeOf(TableSpecificConfig_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, IngestionPipelineDefinition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o IngestionPipelineDefinition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connection_name": o.ConnectionName, + "ingestion_gateway_id": o.IngestionGatewayId, + "objects": o.Objects, + "table_configuration": o.TableConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o IngestionPipelineDefinition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connection_name": types.StringType, + "ingestion_gateway_id": types.StringType, + "objects": basetypes.ListType{ + ElemType: IngestionConfig{}.Type(ctx), + }, + "table_configuration": basetypes.ListType{ + ElemType: TableSpecificConfig{}.Type(ctx), + }, + }, + } +} + +// GetObjects returns the value of the Objects field in IngestionPipelineDefinition_SdkV2 as +// a slice of IngestionConfig_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *IngestionPipelineDefinition_SdkV2) GetObjects(ctx context.Context) ([]IngestionConfig_SdkV2, bool) { + if o.Objects.IsNull() || o.Objects.IsUnknown() { + return nil, false + } + var v []IngestionConfig_SdkV2 + d := o.Objects.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetObjects sets the value of the Objects field in IngestionPipelineDefinition_SdkV2. +func (o *IngestionPipelineDefinition_SdkV2) SetObjects(ctx context.Context, v []IngestionConfig_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["objects"] + t = t.(attr.TypeWithElementType).ElementType() + o.Objects = types.ListValueMust(t, vs) +} + +// GetTableConfiguration returns the value of the TableConfiguration field in IngestionPipelineDefinition_SdkV2 as +// a TableSpecificConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *IngestionPipelineDefinition_SdkV2) GetTableConfiguration(ctx context.Context) (TableSpecificConfig_SdkV2, bool) { + var e TableSpecificConfig_SdkV2 + if o.TableConfiguration.IsNull() || o.TableConfiguration.IsUnknown() { + return e, false + } + var v []TableSpecificConfig_SdkV2 + d := o.TableConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableConfiguration sets the value of the TableConfiguration field in IngestionPipelineDefinition_SdkV2. +func (o *IngestionPipelineDefinition_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpecificConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] + o.TableConfiguration = types.ListValueMust(t, vs) +} + +// List pipeline events +type ListPipelineEventsRequest_SdkV2 struct { + // Criteria to select a subset of results, expressed using a SQL-like + // syntax. The supported filters are: 1. level='INFO' (or WARN or ERROR) 2. + // level in ('INFO', 'WARN') 3. id='[event-id]' 4. timestamp > 'TIMESTAMP' + // (or >=,<,<=,=) + // + // Composite expressions are supported, for example: level in ('ERROR', + // 'WARN') AND timestamp> '2021-07-22T06:37:33.083Z' + Filter types.String `tfsdk:"-"` + // Max number of entries to return in a single page. The system may return + // fewer than max_results events in a response, even if there are more + // events available. + MaxResults types.Int64 `tfsdk:"-"` + // A string indicating a sort order by timestamp for the results, for + // example, ["timestamp asc"]. The sort order can be ascending or + // descending. By default, events are returned in descending order by + // timestamp. + OrderBy types.List `tfsdk:"-"` + // Page token returned by previous call. This field is mutually exclusive + // with all fields in this request except max_results. An error is returned + // if any fields other than max_results are set when this field is set. + PageToken types.String `tfsdk:"-"` + + PipelineId types.String `tfsdk:"-"` +} + +func (newState *ListPipelineEventsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsRequest_SdkV2) { +} + +func (newState *ListPipelineEventsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPipelineEventsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "order_by": 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, ListPipelineEventsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPipelineEventsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPipelineEventsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + "pipeline_id": types.StringType, + }, + } +} + +// GetOrderBy returns the value of the OrderBy field in ListPipelineEventsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPipelineEventsRequest_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in ListPipelineEventsRequest_SdkV2. +func (o *ListPipelineEventsRequest_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type ListPipelineEventsResponse_SdkV2 struct { + // The list of events matching the request criteria. + Events types.List `tfsdk:"events" tf:"optional"` + // If present, a token to fetch the next page of events. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // If present, a token to fetch the previous page of events. + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` +} + +func (newState *ListPipelineEventsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelineEventsResponse_SdkV2) { +} + +func (newState *ListPipelineEventsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelineEventsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelineEventsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPipelineEventsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "events": reflect.TypeOf(PipelineEvent_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, ListPipelineEventsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPipelineEventsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "events": o.Events, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPipelineEventsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "events": basetypes.ListType{ + ElemType: PipelineEvent{}.Type(ctx), + }, + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + }, + } +} + +// GetEvents returns the value of the Events field in ListPipelineEventsResponse_SdkV2 as +// a slice of PipelineEvent_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPipelineEventsResponse_SdkV2) GetEvents(ctx context.Context) ([]PipelineEvent_SdkV2, bool) { + if o.Events.IsNull() || o.Events.IsUnknown() { + return nil, false + } + var v []PipelineEvent_SdkV2 + d := o.Events.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEvents sets the value of the Events field in ListPipelineEventsResponse_SdkV2. +func (o *ListPipelineEventsResponse_SdkV2) SetEvents(ctx context.Context, v []PipelineEvent_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["events"] + t = t.(attr.TypeWithElementType).ElementType() + o.Events = types.ListValueMust(t, vs) +} + +// List pipelines +type ListPipelinesRequest_SdkV2 struct { + // Select a subset of results based on the specified criteria. The supported + // filters are: + // + // * `notebook=''` to select pipelines that reference the provided + // notebook path. * `name LIKE '[pattern]'` to select pipelines with a name + // that matches pattern. Wildcards are supported, for example: `name LIKE + // '%shopping%'` + // + // Composite filters are not supported. This field is optional. + Filter types.String `tfsdk:"-"` + // The maximum number of entries to return in a single page. The system may + // return fewer than max_results events in a response, even if there are + // more events available. This field is optional. The default value is 25. + // The maximum value is 100. An error is returned if the value of + // max_results is greater than 100. + MaxResults types.Int64 `tfsdk:"-"` + // A list of strings specifying the order of results. Supported order_by + // fields are id and name. The default is id asc. This field is optional. + OrderBy types.List `tfsdk:"-"` + // Page token returned by previous call + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListPipelinesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesRequest_SdkV2) { +} + +func (newState *ListPipelinesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelinesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPipelinesRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "order_by": 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, ListPipelinesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPipelinesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPipelinesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter": types.StringType, + "max_results": types.Int64Type, + "order_by": basetypes.ListType{ + ElemType: types.StringType, + }, + "page_token": types.StringType, + }, + } +} + +// GetOrderBy returns the value of the OrderBy field in ListPipelinesRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPipelinesRequest_SdkV2) GetOrderBy(ctx context.Context) ([]types.String, bool) { + if o.OrderBy.IsNull() || o.OrderBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.OrderBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetOrderBy sets the value of the OrderBy field in ListPipelinesRequest_SdkV2. +func (o *ListPipelinesRequest_SdkV2) SetOrderBy(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["order_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.OrderBy = types.ListValueMust(t, vs) +} + +type ListPipelinesResponse_SdkV2 struct { + // If present, a token to fetch the next page of events. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // The list of events matching the request criteria. + Statuses types.List `tfsdk:"statuses" tf:"optional"` +} + +func (newState *ListPipelinesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPipelinesResponse_SdkV2) { +} + +func (newState *ListPipelinesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPipelinesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPipelinesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPipelinesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "statuses": reflect.TypeOf(PipelineStateInfo_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, ListPipelinesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPipelinesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "statuses": o.Statuses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPipelinesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "statuses": basetypes.ListType{ + ElemType: PipelineStateInfo{}.Type(ctx), + }, + }, + } +} + +// GetStatuses returns the value of the Statuses field in ListPipelinesResponse_SdkV2 as +// a slice of PipelineStateInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPipelinesResponse_SdkV2) GetStatuses(ctx context.Context) ([]PipelineStateInfo_SdkV2, bool) { + if o.Statuses.IsNull() || o.Statuses.IsUnknown() { + return nil, false + } + var v []PipelineStateInfo_SdkV2 + d := o.Statuses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStatuses sets the value of the Statuses field in ListPipelinesResponse_SdkV2. +func (o *ListPipelinesResponse_SdkV2) SetStatuses(ctx context.Context, v []PipelineStateInfo_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["statuses"] + t = t.(attr.TypeWithElementType).ElementType() + o.Statuses = types.ListValueMust(t, vs) +} + +// List pipeline updates +type ListUpdatesRequest_SdkV2 struct { + // Max number of entries to return in a single page. + MaxResults types.Int64 `tfsdk:"-"` + // Page token returned by previous call + PageToken types.String `tfsdk:"-"` + // The pipeline to return updates for. + PipelineId types.String `tfsdk:"-"` + // If present, returns updates until and including this update_id. + UntilUpdateId types.String `tfsdk:"-"` +} + +func (newState *ListUpdatesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesRequest_SdkV2) { +} + +func (newState *ListUpdatesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUpdatesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListUpdatesRequest_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, ListUpdatesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListUpdatesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "pipeline_id": o.PipelineId, + "until_update_id": o.UntilUpdateId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListUpdatesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "page_token": types.StringType, + "pipeline_id": types.StringType, + "until_update_id": types.StringType, + }, + } +} + +type ListUpdatesResponse_SdkV2 struct { + // If present, then there are more results, and this a token to be used in a + // subsequent request to fetch the next page. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // If present, then this token can be used in a subsequent request to fetch + // the previous page. + PrevPageToken types.String `tfsdk:"prev_page_token" tf:"optional"` + + Updates types.List `tfsdk:"updates" tf:"optional"` +} + +func (newState *ListUpdatesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListUpdatesResponse_SdkV2) { +} + +func (newState *ListUpdatesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListUpdatesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListUpdatesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListUpdatesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "updates": reflect.TypeOf(UpdateInfo_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, ListUpdatesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListUpdatesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + "updates": o.Updates, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListUpdatesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "prev_page_token": types.StringType, + "updates": basetypes.ListType{ + ElemType: UpdateInfo{}.Type(ctx), + }, + }, + } +} + +// GetUpdates returns the value of the Updates field in ListUpdatesResponse_SdkV2 as +// a slice of UpdateInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListUpdatesResponse_SdkV2) GetUpdates(ctx context.Context) ([]UpdateInfo_SdkV2, bool) { + if o.Updates.IsNull() || o.Updates.IsUnknown() { + return nil, false + } + var v []UpdateInfo_SdkV2 + d := o.Updates.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUpdates sets the value of the Updates field in ListUpdatesResponse_SdkV2. +func (o *ListUpdatesResponse_SdkV2) SetUpdates(ctx context.Context, v []UpdateInfo_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["updates"] + t = t.(attr.TypeWithElementType).ElementType() + o.Updates = types.ListValueMust(t, vs) +} + +type ManualTrigger_SdkV2 struct { +} + +func (newState *ManualTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ManualTrigger_SdkV2) { +} + +func (newState *ManualTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState ManualTrigger_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ManualTrigger. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ManualTrigger_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, ManualTrigger_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ManualTrigger_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 ManualTrigger_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type NotebookLibrary_SdkV2 struct { + // The absolute path of the notebook. + Path types.String `tfsdk:"path" tf:"optional"` +} + +func (newState *NotebookLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotebookLibrary_SdkV2) { +} + +func (newState *NotebookLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotebookLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NotebookLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NotebookLibrary_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, NotebookLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NotebookLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NotebookLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +type Notifications_SdkV2 struct { + // A list of alerts that trigger the sending of notifications to the + // configured destinations. The supported alerts are: + // + // * `on-update-success`: A pipeline update completes successfully. * + // `on-update-failure`: Each time a pipeline update fails. * + // `on-update-fatal-failure`: A pipeline update fails with a non-retryable + // (fatal) error. * `on-flow-failure`: A single data flow fails. + Alerts types.List `tfsdk:"alerts" tf:"optional"` + // A list of email addresses notified when a configured alert is triggered. + EmailRecipients types.List `tfsdk:"email_recipients" tf:"optional"` +} + +func (newState *Notifications_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Notifications_SdkV2) { +} + +func (newState *Notifications_SdkV2) SyncEffectiveFieldsDuringRead(existingState Notifications_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Notifications. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Notifications_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alerts": reflect.TypeOf(types.String{}), + "email_recipients": 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, Notifications_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Notifications_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alerts": o.Alerts, + "email_recipients": o.EmailRecipients, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Notifications_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alerts": basetypes.ListType{ + ElemType: types.StringType, + }, + "email_recipients": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAlerts returns the value of the Alerts field in Notifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Notifications_SdkV2) GetAlerts(ctx context.Context) ([]types.String, bool) { + if o.Alerts.IsNull() || o.Alerts.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Alerts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAlerts sets the value of the Alerts field in Notifications_SdkV2. +func (o *Notifications_SdkV2) SetAlerts(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["alerts"] + t = t.(attr.TypeWithElementType).ElementType() + o.Alerts = types.ListValueMust(t, vs) +} + +// GetEmailRecipients returns the value of the EmailRecipients field in Notifications_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Notifications_SdkV2) GetEmailRecipients(ctx context.Context) ([]types.String, bool) { + if o.EmailRecipients.IsNull() || o.EmailRecipients.IsUnknown() { + return nil, false + } + var v []types.String + d := o.EmailRecipients.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmailRecipients sets the value of the EmailRecipients field in Notifications_SdkV2. +func (o *Notifications_SdkV2) SetEmailRecipients(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["email_recipients"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmailRecipients = types.ListValueMust(t, vs) +} + +type Origin_SdkV2 struct { + // The id of a batch. Unique within a flow. + BatchId types.Int64 `tfsdk:"batch_id" tf:"optional"` + // The cloud provider, e.g., AWS or Azure. + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // The id of the cluster where an execution happens. Unique within a region. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The name of a dataset. Unique within a pipeline. + DatasetName types.String `tfsdk:"dataset_name" tf:"optional"` + // The id of the flow. Globally unique. Incremental queries will generally + // reuse the same id while complete queries will have a new id per update. + FlowId types.String `tfsdk:"flow_id" tf:"optional"` + // The name of the flow. Not unique. + FlowName types.String `tfsdk:"flow_name" tf:"optional"` + // The optional host name where the event was triggered + Host types.String `tfsdk:"host" tf:"optional"` + // The id of a maintenance run. Globally unique. + MaintenanceId types.String `tfsdk:"maintenance_id" tf:"optional"` + // Materialization name. + MaterializationName types.String `tfsdk:"materialization_name" tf:"optional"` + // The org id of the user. Unique within a cloud. + OrgId types.Int64 `tfsdk:"org_id" tf:"optional"` + // The id of the pipeline. Globally unique. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // The name of the pipeline. Not unique. + PipelineName types.String `tfsdk:"pipeline_name" tf:"optional"` + // The cloud region. + Region types.String `tfsdk:"region" tf:"optional"` + // The id of the request that caused an update. + RequestId types.String `tfsdk:"request_id" tf:"optional"` + // The id of a (delta) table. Globally unique. + TableId types.String `tfsdk:"table_id" tf:"optional"` + // The Unity Catalog id of the MV or ST being updated. + UcResourceId types.String `tfsdk:"uc_resource_id" tf:"optional"` + // The id of an execution. Globally unique. + UpdateId types.String `tfsdk:"update_id" tf:"optional"` +} + +func (newState *Origin_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Origin_SdkV2) { +} + +func (newState *Origin_SdkV2) SyncEffectiveFieldsDuringRead(existingState Origin_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Origin. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Origin_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, Origin_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Origin_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "batch_id": o.BatchId, + "cloud": o.Cloud, + "cluster_id": o.ClusterId, + "dataset_name": o.DatasetName, + "flow_id": o.FlowId, + "flow_name": o.FlowName, + "host": o.Host, + "maintenance_id": o.MaintenanceId, + "materialization_name": o.MaterializationName, + "org_id": o.OrgId, + "pipeline_id": o.PipelineId, + "pipeline_name": o.PipelineName, + "region": o.Region, + "request_id": o.RequestId, + "table_id": o.TableId, + "uc_resource_id": o.UcResourceId, + "update_id": o.UpdateId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Origin_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "batch_id": types.Int64Type, + "cloud": types.StringType, + "cluster_id": types.StringType, + "dataset_name": types.StringType, + "flow_id": types.StringType, + "flow_name": types.StringType, + "host": types.StringType, + "maintenance_id": types.StringType, + "materialization_name": types.StringType, + "org_id": types.Int64Type, + "pipeline_id": types.StringType, + "pipeline_name": types.StringType, + "region": types.StringType, + "request_id": types.StringType, + "table_id": types.StringType, + "uc_resource_id": types.StringType, + "update_id": types.StringType, + }, + } +} + +type PipelineAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *PipelineAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlRequest_SdkV2) { +} + +func (newState *PipelineAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineAccessControlRequest_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, PipelineAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type PipelineAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *PipelineAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineAccessControlResponse_SdkV2) { +} + +func (newState *PipelineAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(PipelinePermission_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, PipelineAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: PipelinePermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in PipelineAccessControlResponse_SdkV2 as +// a slice of PipelinePermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]PipelinePermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []PipelinePermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in PipelineAccessControlResponse_SdkV2. +func (o *PipelineAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []PipelinePermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type PipelineCluster_SdkV2 struct { + // Note: This field won't be persisted. Only API users will check this + // field. + ApplyPolicyDefaultValues types.Bool `tfsdk:"apply_policy_default_values" tf:"optional"` + // Parameters needed in order to automatically scale clusters up and down + // based on load. Note: autoscaling works best with DB runtime versions 3.0 + // or later. + Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + // Attributes related to clusters running on Amazon Web Services. If not + // specified at cluster creation, a set of default values will be used. + AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + // Attributes related to clusters running on Microsoft Azure. If not + // specified at cluster creation, a set of default values will be used. + AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + // The configuration for delivering spark logs to a long-term storage + // destination. Only dbfs destinations are supported. Only one destination + // can be specified for one cluster. If the conf is given, the logs will be + // delivered to the destination every `5 mins`. The destination of driver + // logs is `$destination/$clusterId/driver`, while the destination of + // executor logs is `$destination/$clusterId/executor`. + ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + // Additional tags for cluster resources. Databricks will tag all cluster + // resources (e.g., AWS instances and EBS volumes) with these tags in + // addition to `default_tags`. Notes: + // + // - Currently, Databricks allows at most 45 custom tags + // + // - Clusters can only reuse cloud resources if the resources' tags are a + // subset of the cluster tags + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // The optional ID of the instance pool for the driver of the cluster + // belongs. The pool cluster uses the instance pool with id + // (instance_pool_id) if the driver pool is not assigned. + DriverInstancePoolId types.String `tfsdk:"driver_instance_pool_id" tf:"optional"` + // The node type of the Spark driver. Note that this field is optional; if + // unset, the driver node type will be set as the same value as + // `node_type_id` defined above. + DriverNodeTypeId types.String `tfsdk:"driver_node_type_id" tf:"optional"` + // Whether to enable local disk encryption for the cluster. + EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` + // Attributes related to clusters running on Google Cloud Platform. If not + // specified at cluster creation, a set of default values will be used. + GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + // The configuration for storing init scripts. Any number of destinations + // can be specified. The scripts are executed sequentially in the order + // provided. If `cluster_log_conf` is specified, init script logs are sent + // to `//init_scripts`. + InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` + // The optional ID of the instance pool to which the cluster belongs. + InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // A label for the cluster specification, either `default` to configure the + // default cluster, or `maintenance` to configure the maintenance cluster. + // This field is optional. The default value is `default`. + Label types.String `tfsdk:"label" tf:"optional"` + // This field encodes, through a single value, the resources available to + // each of the Spark nodes in this cluster. For example, the Spark nodes can + // be provisioned and optimized for memory or compute intensive workloads. A + // list of available node types can be retrieved by using the + // :method:clusters/listNodeTypes API call. + NodeTypeId types.String `tfsdk:"node_type_id" tf:"optional"` + // Number of worker nodes that this cluster should have. A cluster has one + // Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 + // Spark nodes. + // + // Note: When reading the properties of a cluster, this field reflects the + // desired number of workers rather than the actual current number of + // workers. For instance, if a cluster is resized from 5 to 10 workers, this + // field will immediately be updated to reflect the target size of 10 + // workers, whereas the workers listed in `spark_info` will gradually + // increase from 5 to 10 as the new nodes are provisioned. + NumWorkers types.Int64 `tfsdk:"num_workers" tf:"optional"` + // The ID of the cluster policy used to create the cluster if applicable. + PolicyId types.String `tfsdk:"policy_id" tf:"optional"` + // An object containing a set of optional, user-specified Spark + // configuration key-value pairs. See :method:clusters/create for more + // details. + SparkConf types.Map `tfsdk:"spark_conf" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs. Please note that key-value pair of the form + // (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the + // driver and workers. + // + // In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we + // recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the + // example below. This ensures that all default databricks managed + // environmental variables are included as well. + // + // Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", + // "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": + // "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` + SparkEnvVars types.Map `tfsdk:"spark_env_vars" tf:"optional"` + // SSH public key contents that will be added to each Spark node in this + // cluster. The corresponding private keys can be used to login with the + // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. + SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` +} + +func (newState *PipelineCluster_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineCluster_SdkV2) { +} + +func (newState *PipelineCluster_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineCluster_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineCluster. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineCluster_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "autoscale": reflect.TypeOf(PipelineClusterAutoscale_SdkV2{}), + "aws_attributes": reflect.TypeOf(compute_tf.AwsAttributes_SdkV2{}), + "azure_attributes": reflect.TypeOf(compute_tf.AzureAttributes_SdkV2{}), + "cluster_log_conf": reflect.TypeOf(compute_tf.ClusterLogConf_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "gcp_attributes": reflect.TypeOf(compute_tf.GcpAttributes_SdkV2{}), + "init_scripts": reflect.TypeOf(compute_tf.InitScriptInfo_SdkV2{}), + "spark_conf": reflect.TypeOf(types.String{}), + "spark_env_vars": reflect.TypeOf(types.String{}), + "ssh_public_keys": 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, PipelineCluster_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_policy_default_values": o.ApplyPolicyDefaultValues, + "autoscale": o.Autoscale, + "aws_attributes": o.AwsAttributes, + "azure_attributes": o.AzureAttributes, + "cluster_log_conf": o.ClusterLogConf, + "custom_tags": o.CustomTags, + "driver_instance_pool_id": o.DriverInstancePoolId, + "driver_node_type_id": o.DriverNodeTypeId, + "enable_local_disk_encryption": o.EnableLocalDiskEncryption, + "gcp_attributes": o.GcpAttributes, + "init_scripts": o.InitScripts, + "instance_pool_id": o.InstancePoolId, + "label": o.Label, + "node_type_id": o.NodeTypeId, + "num_workers": o.NumWorkers, + "policy_id": o.PolicyId, + "spark_conf": o.SparkConf, + "spark_env_vars": o.SparkEnvVars, + "ssh_public_keys": o.SshPublicKeys, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineCluster_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_policy_default_values": types.BoolType, + "autoscale": basetypes.ListType{ + ElemType: PipelineClusterAutoscale{}.Type(ctx), + }, + "aws_attributes": basetypes.ListType{ + ElemType: compute_tf.AwsAttributes{}.Type(ctx), + }, + "azure_attributes": basetypes.ListType{ + ElemType: compute_tf.AzureAttributes{}.Type(ctx), + }, + "cluster_log_conf": basetypes.ListType{ + ElemType: compute_tf.ClusterLogConf{}.Type(ctx), + }, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "driver_instance_pool_id": types.StringType, + "driver_node_type_id": types.StringType, + "enable_local_disk_encryption": types.BoolType, + "gcp_attributes": basetypes.ListType{ + ElemType: compute_tf.GcpAttributes{}.Type(ctx), + }, + "init_scripts": basetypes.ListType{ + ElemType: compute_tf.InitScriptInfo{}.Type(ctx), + }, + "instance_pool_id": types.StringType, + "label": types.StringType, + "node_type_id": types.StringType, + "num_workers": types.Int64Type, + "policy_id": types.StringType, + "spark_conf": basetypes.MapType{ + ElemType: types.StringType, + }, + "spark_env_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "ssh_public_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAutoscale returns the value of the Autoscale field in PipelineCluster_SdkV2 as +// a PipelineClusterAutoscale_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetAutoscale(ctx context.Context) (PipelineClusterAutoscale_SdkV2, bool) { + var e PipelineClusterAutoscale_SdkV2 + if o.Autoscale.IsNull() || o.Autoscale.IsUnknown() { + return e, false + } + var v []PipelineClusterAutoscale_SdkV2 + d := o.Autoscale.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoscale sets the value of the Autoscale field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetAutoscale(ctx context.Context, v PipelineClusterAutoscale_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] + o.Autoscale = types.ListValueMust(t, vs) +} + +// GetAwsAttributes returns the value of the AwsAttributes field in PipelineCluster_SdkV2 as +// a compute_tf.AwsAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetAwsAttributes(ctx context.Context) (compute_tf.AwsAttributes_SdkV2, bool) { + var e compute_tf.AwsAttributes_SdkV2 + if o.AwsAttributes.IsNull() || o.AwsAttributes.IsUnknown() { + return e, false + } + var v []compute_tf.AwsAttributes_SdkV2 + d := o.AwsAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsAttributes sets the value of the AwsAttributes field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetAwsAttributes(ctx context.Context, v compute_tf.AwsAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] + o.AwsAttributes = types.ListValueMust(t, vs) +} + +// GetAzureAttributes returns the value of the AzureAttributes field in PipelineCluster_SdkV2 as +// a compute_tf.AzureAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetAzureAttributes(ctx context.Context) (compute_tf.AzureAttributes_SdkV2, bool) { + var e compute_tf.AzureAttributes_SdkV2 + if o.AzureAttributes.IsNull() || o.AzureAttributes.IsUnknown() { + return e, false + } + var v []compute_tf.AzureAttributes_SdkV2 + d := o.AzureAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureAttributes sets the value of the AzureAttributes field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetAzureAttributes(ctx context.Context, v compute_tf.AzureAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] + o.AzureAttributes = types.ListValueMust(t, vs) +} + +// GetClusterLogConf returns the value of the ClusterLogConf field in PipelineCluster_SdkV2 as +// a compute_tf.ClusterLogConf_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetClusterLogConf(ctx context.Context) (compute_tf.ClusterLogConf_SdkV2, bool) { + var e compute_tf.ClusterLogConf_SdkV2 + if o.ClusterLogConf.IsNull() || o.ClusterLogConf.IsUnknown() { + return e, false + } + var v []compute_tf.ClusterLogConf_SdkV2 + d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetClusterLogConf sets the value of the ClusterLogConf field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetClusterLogConf(ctx context.Context, v compute_tf.ClusterLogConf_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] + o.ClusterLogConf = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in PipelineCluster_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 *PipelineCluster_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetGcpAttributes returns the value of the GcpAttributes field in PipelineCluster_SdkV2 as +// a compute_tf.GcpAttributes_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetGcpAttributes(ctx context.Context) (compute_tf.GcpAttributes_SdkV2, bool) { + var e compute_tf.GcpAttributes_SdkV2 + if o.GcpAttributes.IsNull() || o.GcpAttributes.IsUnknown() { + return e, false + } + var v []compute_tf.GcpAttributes_SdkV2 + d := o.GcpAttributes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpAttributes sets the value of the GcpAttributes field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetGcpAttributes(ctx context.Context, v compute_tf.GcpAttributes_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] + o.GcpAttributes = types.ListValueMust(t, vs) +} + +// GetInitScripts returns the value of the InitScripts field in PipelineCluster_SdkV2 as +// a slice of compute_tf.InitScriptInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetInitScripts(ctx context.Context) ([]compute_tf.InitScriptInfo_SdkV2, bool) { + if o.InitScripts.IsNull() || o.InitScripts.IsUnknown() { + return nil, false + } + var v []compute_tf.InitScriptInfo_SdkV2 + d := o.InitScripts.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInitScripts sets the value of the InitScripts field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetInitScripts(ctx context.Context, v []compute_tf.InitScriptInfo_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["init_scripts"] + t = t.(attr.TypeWithElementType).ElementType() + o.InitScripts = types.ListValueMust(t, vs) +} + +// GetSparkConf returns the value of the SparkConf field in PipelineCluster_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 *PipelineCluster_SdkV2) GetSparkConf(ctx context.Context) (map[string]types.String, bool) { + if o.SparkConf.IsNull() || o.SparkConf.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkConf.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkConf sets the value of the SparkConf field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetSparkConf(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["spark_conf"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkConf = types.MapValueMust(t, vs) +} + +// GetSparkEnvVars returns the value of the SparkEnvVars field in PipelineCluster_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 *PipelineCluster_SdkV2) GetSparkEnvVars(ctx context.Context) (map[string]types.String, bool) { + if o.SparkEnvVars.IsNull() || o.SparkEnvVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.SparkEnvVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSparkEnvVars sets the value of the SparkEnvVars field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetSparkEnvVars(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["spark_env_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.SparkEnvVars = types.MapValueMust(t, vs) +} + +// GetSshPublicKeys returns the value of the SshPublicKeys field in PipelineCluster_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineCluster_SdkV2) GetSshPublicKeys(ctx context.Context) ([]types.String, bool) { + if o.SshPublicKeys.IsNull() || o.SshPublicKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SshPublicKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSshPublicKeys sets the value of the SshPublicKeys field in PipelineCluster_SdkV2. +func (o *PipelineCluster_SdkV2) SetSshPublicKeys(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["ssh_public_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.SshPublicKeys = types.ListValueMust(t, vs) +} + +type PipelineClusterAutoscale_SdkV2 struct { + // The maximum number of workers to which the cluster can scale up when + // overloaded. `max_workers` must be strictly greater than `min_workers`. + MaxWorkers types.Int64 `tfsdk:"max_workers" tf:""` + // The minimum number of workers the cluster can scale down to when + // underutilized. It is also the initial number of workers the cluster will + // have after creation. + MinWorkers types.Int64 `tfsdk:"min_workers" tf:""` + // Databricks Enhanced Autoscaling optimizes cluster utilization by + // automatically allocating cluster resources based on workload volume, with + // minimal impact to the data processing latency of your pipelines. Enhanced + // Autoscaling is available for `updates` clusters only. The legacy + // autoscaling feature is used for `maintenance` clusters. + Mode types.String `tfsdk:"mode" tf:"optional"` +} + +func (newState *PipelineClusterAutoscale_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineClusterAutoscale_SdkV2) { +} + +func (newState *PipelineClusterAutoscale_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineClusterAutoscale_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineClusterAutoscale. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineClusterAutoscale_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, PipelineClusterAutoscale_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineClusterAutoscale_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_workers": o.MaxWorkers, + "min_workers": o.MinWorkers, + "mode": o.Mode, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineClusterAutoscale_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_workers": types.Int64Type, + "min_workers": types.Int64Type, + "mode": types.StringType, + }, + } +} + +type PipelineDeployment_SdkV2 struct { + // The deployment method that manages the pipeline. + Kind types.String `tfsdk:"kind" tf:"optional"` + // The path to the file containing metadata about the deployment. + MetadataFilePath types.String `tfsdk:"metadata_file_path" tf:"optional"` +} + +func (newState *PipelineDeployment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineDeployment_SdkV2) { +} + +func (newState *PipelineDeployment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineDeployment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineDeployment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineDeployment_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, PipelineDeployment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineDeployment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "kind": o.Kind, + "metadata_file_path": o.MetadataFilePath, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineDeployment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "kind": types.StringType, + "metadata_file_path": types.StringType, + }, + } +} + +type PipelineEvent_SdkV2 struct { + // Information about an error captured by the event. + Error types.List `tfsdk:"error" tf:"optional,object"` + // The event type. Should always correspond to the details + EventType types.String `tfsdk:"event_type" tf:"optional"` + // A time-based, globally unique id. + Id types.String `tfsdk:"id" tf:"optional"` + // The severity level of the event. + Level types.String `tfsdk:"level" tf:"optional"` + // Maturity level for event_type. + MaturityLevel types.String `tfsdk:"maturity_level" tf:"optional"` + // The display message associated with the event. + Message types.String `tfsdk:"message" tf:"optional"` + // Describes where the event originates from. + Origin types.List `tfsdk:"origin" tf:"optional,object"` + // A sequencing object to identify and order events. + Sequence types.List `tfsdk:"sequence" tf:"optional,object"` + // The time of the event. + Timestamp types.String `tfsdk:"timestamp" tf:"optional"` +} + +func (newState *PipelineEvent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineEvent_SdkV2) { +} + +func (newState *PipelineEvent_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineEvent_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineEvent. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineEvent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "error": reflect.TypeOf(ErrorDetail_SdkV2{}), + "origin": reflect.TypeOf(Origin_SdkV2{}), + "sequence": reflect.TypeOf(Sequencing_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, PipelineEvent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineEvent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error": o.Error, + "event_type": o.EventType, + "id": o.Id, + "level": o.Level, + "maturity_level": o.MaturityLevel, + "message": o.Message, + "origin": o.Origin, + "sequence": o.Sequence, + "timestamp": o.Timestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineEvent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error": basetypes.ListType{ + ElemType: ErrorDetail{}.Type(ctx), + }, + "event_type": types.StringType, + "id": types.StringType, + "level": types.StringType, + "maturity_level": types.StringType, + "message": types.StringType, + "origin": basetypes.ListType{ + ElemType: Origin{}.Type(ctx), + }, + "sequence": basetypes.ListType{ + ElemType: Sequencing{}.Type(ctx), + }, + "timestamp": types.StringType, + }, + } +} + +// GetError returns the value of the Error field in PipelineEvent_SdkV2 as +// a ErrorDetail_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineEvent_SdkV2) GetError(ctx context.Context) (ErrorDetail_SdkV2, bool) { + var e ErrorDetail_SdkV2 + if o.Error.IsNull() || o.Error.IsUnknown() { + return e, false + } + var v []ErrorDetail_SdkV2 + d := o.Error.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetError sets the value of the Error field in PipelineEvent_SdkV2. +func (o *PipelineEvent_SdkV2) SetError(ctx context.Context, v ErrorDetail_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] + o.Error = types.ListValueMust(t, vs) +} + +// GetOrigin returns the value of the Origin field in PipelineEvent_SdkV2 as +// a Origin_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineEvent_SdkV2) GetOrigin(ctx context.Context) (Origin_SdkV2, bool) { + var e Origin_SdkV2 + if o.Origin.IsNull() || o.Origin.IsUnknown() { + return e, false + } + var v []Origin_SdkV2 + d := o.Origin.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOrigin sets the value of the Origin field in PipelineEvent_SdkV2. +func (o *PipelineEvent_SdkV2) SetOrigin(ctx context.Context, v Origin_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["origin"] + o.Origin = types.ListValueMust(t, vs) +} + +// GetSequence returns the value of the Sequence field in PipelineEvent_SdkV2 as +// a Sequencing_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineEvent_SdkV2) GetSequence(ctx context.Context) (Sequencing_SdkV2, bool) { + var e Sequencing_SdkV2 + if o.Sequence.IsNull() || o.Sequence.IsUnknown() { + return e, false + } + var v []Sequencing_SdkV2 + d := o.Sequence.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSequence sets the value of the Sequence field in PipelineEvent_SdkV2. +func (o *PipelineEvent_SdkV2) SetSequence(ctx context.Context, v Sequencing_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sequence"] + o.Sequence = types.ListValueMust(t, vs) +} + +type PipelineLibrary_SdkV2 struct { + // The path to a file that defines a pipeline and is stored in the + // Databricks Repos. + File types.List `tfsdk:"file" tf:"optional,object"` + // URI of the jar to be installed. Currently only DBFS is supported. + Jar types.String `tfsdk:"jar" tf:"optional"` + // Specification of a maven library to be installed. + Maven types.List `tfsdk:"maven" tf:"optional,object"` + // The path to a notebook that defines a pipeline and is stored in the + // Databricks workspace. + Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + // URI of the whl to be installed. + Whl types.String `tfsdk:"whl" tf:"optional"` +} + +func (newState *PipelineLibrary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineLibrary_SdkV2) { +} + +func (newState *PipelineLibrary_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineLibrary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineLibrary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineLibrary_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "file": reflect.TypeOf(FileLibrary_SdkV2{}), + "maven": reflect.TypeOf(compute_tf.MavenLibrary_SdkV2{}), + "notebook": reflect.TypeOf(NotebookLibrary_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, PipelineLibrary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineLibrary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "file": o.File, + "jar": o.Jar, + "maven": o.Maven, + "notebook": o.Notebook, + "whl": o.Whl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineLibrary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "file": basetypes.ListType{ + ElemType: FileLibrary{}.Type(ctx), + }, + "jar": types.StringType, + "maven": basetypes.ListType{ + ElemType: compute_tf.MavenLibrary{}.Type(ctx), + }, + "notebook": basetypes.ListType{ + ElemType: NotebookLibrary{}.Type(ctx), + }, + "whl": types.StringType, + }, + } +} + +// GetFile returns the value of the File field in PipelineLibrary_SdkV2 as +// a FileLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineLibrary_SdkV2) GetFile(ctx context.Context) (FileLibrary_SdkV2, bool) { + var e FileLibrary_SdkV2 + if o.File.IsNull() || o.File.IsUnknown() { + return e, false + } + var v []FileLibrary_SdkV2 + d := o.File.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFile sets the value of the File field in PipelineLibrary_SdkV2. +func (o *PipelineLibrary_SdkV2) SetFile(ctx context.Context, v FileLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] + o.File = types.ListValueMust(t, vs) +} + +// GetMaven returns the value of the Maven field in PipelineLibrary_SdkV2 as +// a compute_tf.MavenLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineLibrary_SdkV2) GetMaven(ctx context.Context) (compute_tf.MavenLibrary_SdkV2, bool) { + var e compute_tf.MavenLibrary_SdkV2 + if o.Maven.IsNull() || o.Maven.IsUnknown() { + return e, false + } + var v []compute_tf.MavenLibrary_SdkV2 + d := o.Maven.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMaven sets the value of the Maven field in PipelineLibrary_SdkV2. +func (o *PipelineLibrary_SdkV2) SetMaven(ctx context.Context, v compute_tf.MavenLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maven"] + o.Maven = types.ListValueMust(t, vs) +} + +// GetNotebook returns the value of the Notebook field in PipelineLibrary_SdkV2 as +// a NotebookLibrary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineLibrary_SdkV2) GetNotebook(ctx context.Context) (NotebookLibrary_SdkV2, bool) { + var e NotebookLibrary_SdkV2 + if o.Notebook.IsNull() || o.Notebook.IsUnknown() { + return e, false + } + var v []NotebookLibrary_SdkV2 + d := o.Notebook.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNotebook sets the value of the Notebook field in PipelineLibrary_SdkV2. +func (o *PipelineLibrary_SdkV2) SetNotebook(ctx context.Context, v NotebookLibrary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook"] + o.Notebook = types.ListValueMust(t, vs) +} + +type PipelinePermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PipelinePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermission_SdkV2) { +} + +func (newState *PipelinePermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelinePermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, PipelinePermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelinePermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelinePermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in PipelinePermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelinePermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in PipelinePermission_SdkV2. +func (o *PipelinePermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type PipelinePermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *PipelinePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissions_SdkV2) { +} + +func (newState *PipelinePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelinePermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(PipelineAccessControlResponse_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, PipelinePermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelinePermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: PipelineAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in PipelinePermissions_SdkV2 as +// a slice of PipelineAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelinePermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]PipelineAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []PipelineAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in PipelinePermissions_SdkV2. +func (o *PipelinePermissions_SdkV2) SetAccessControlList(ctx context.Context, v []PipelineAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type PipelinePermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *PipelinePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsDescription_SdkV2) { +} + +func (newState *PipelinePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelinePermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelinePermissionsDescription_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, PipelinePermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelinePermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type PipelinePermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The pipeline for which to get or manage permissions. + PipelineId types.String `tfsdk:"-"` +} + +func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelinePermissionsRequest_SdkV2) { +} + +func (newState *PipelinePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelinePermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelinePermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(PipelineAccessControlRequest_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, PipelinePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelinePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: PipelineAccessControlRequest{}.Type(ctx), + }, + "pipeline_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in PipelinePermissionsRequest_SdkV2 as +// a slice of PipelineAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelinePermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]PipelineAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []PipelineAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in PipelinePermissionsRequest_SdkV2. +func (o *PipelinePermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []PipelineAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type PipelineSpec_SdkV2 struct { + // Budget policy of this pipeline. + BudgetPolicyId types.String `tfsdk:"budget_policy_id" tf:"optional"` + // A catalog in Unity Catalog to publish data from this pipeline to. If + // `target` is specified, tables in this pipeline are published to a + // `target` schema inside `catalog` (for example, + // `catalog`.`target`.`table`). If `target` is not specified, no data is + // published to Unity Catalog. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // DLT Release Channel that specifies which version to use. + Channel types.String `tfsdk:"channel" tf:"optional"` + // Cluster settings for this pipeline deployment. + Clusters types.List `tfsdk:"clusters" tf:"optional"` + // String-String configuration for this pipeline execution. + Configuration types.Map `tfsdk:"configuration" tf:"optional"` + // Whether the pipeline is continuous or triggered. This replaces `trigger`. + Continuous types.Bool `tfsdk:"continuous" tf:"optional"` + // Deployment type of this pipeline. + Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + // Whether the pipeline is in Development mode. Defaults to false. + Development types.Bool `tfsdk:"development" tf:"optional"` + // Pipeline product edition. + Edition types.String `tfsdk:"edition" tf:"optional"` + // Filters on which Pipeline packages to include in the deployed graph. + Filters types.List `tfsdk:"filters" tf:"optional,object"` + // The definition of a gateway pipeline to support change data capture. + GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + // Unique identifier for this pipeline. + Id types.String `tfsdk:"id" tf:"optional"` + // The configuration for a managed ingestion pipeline. These settings cannot + // be used with the 'libraries', 'target' or 'catalog' settings. + IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + // Libraries or code needed by this deployment. + Libraries types.List `tfsdk:"libraries" tf:"optional"` + // Friendly identifier for this pipeline. + Name types.String `tfsdk:"name" tf:"optional"` + // List of notification settings for this pipeline. + Notifications types.List `tfsdk:"notifications" tf:"optional"` + // Whether Photon is enabled for this pipeline. + Photon types.Bool `tfsdk:"photon" tf:"optional"` + // Restart window of this pipeline. + RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + // The default schema (database) where tables are read from or published to. + // The presence of this field implies that the pipeline is in direct + // publishing mode. + Schema types.String `tfsdk:"schema" tf:"optional"` + // Whether serverless compute is enabled for this pipeline. + Serverless types.Bool `tfsdk:"serverless" tf:"optional"` + // DBFS root directory for storing checkpoints and tables. + Storage types.String `tfsdk:"storage" tf:"optional"` + // Target schema (database) to add tables in this pipeline to. If not + // specified, no data is published to the Hive metastore or Unity Catalog. + // To publish to Unity Catalog, also specify `catalog`. + Target types.String `tfsdk:"target" tf:"optional"` + // Which pipeline trigger to use. Deprecated: Use `continuous` instead. + Trigger types.List `tfsdk:"trigger" tf:"optional,object"` +} + +func (newState *PipelineSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineSpec_SdkV2) { +} + +func (newState *PipelineSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "clusters": reflect.TypeOf(PipelineCluster_SdkV2{}), + "configuration": reflect.TypeOf(types.String{}), + "deployment": reflect.TypeOf(PipelineDeployment_SdkV2{}), + "filters": reflect.TypeOf(Filters_SdkV2{}), + "gateway_definition": reflect.TypeOf(IngestionGatewayPipelineDefinition_SdkV2{}), + "ingestion_definition": reflect.TypeOf(IngestionPipelineDefinition_SdkV2{}), + "libraries": reflect.TypeOf(PipelineLibrary_SdkV2{}), + "notifications": reflect.TypeOf(Notifications_SdkV2{}), + "restart_window": reflect.TypeOf(RestartWindow_SdkV2{}), + "trigger": reflect.TypeOf(PipelineTrigger_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, PipelineSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "budget_policy_id": o.BudgetPolicyId, + "catalog": o.Catalog, + "channel": o.Channel, + "clusters": o.Clusters, + "configuration": o.Configuration, + "continuous": o.Continuous, + "deployment": o.Deployment, + "development": o.Development, + "edition": o.Edition, + "filters": o.Filters, + "gateway_definition": o.GatewayDefinition, + "id": o.Id, + "ingestion_definition": o.IngestionDefinition, + "libraries": o.Libraries, + "name": o.Name, + "notifications": o.Notifications, + "photon": o.Photon, + "restart_window": o.RestartWindow, + "schema": o.Schema, + "serverless": o.Serverless, + "storage": o.Storage, + "target": o.Target, + "trigger": o.Trigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "budget_policy_id": types.StringType, + "catalog": types.StringType, + "channel": types.StringType, + "clusters": basetypes.ListType{ + ElemType: PipelineCluster{}.Type(ctx), + }, + "configuration": basetypes.MapType{ + ElemType: types.StringType, + }, + "continuous": types.BoolType, + "deployment": basetypes.ListType{ + ElemType: PipelineDeployment{}.Type(ctx), + }, + "development": types.BoolType, + "edition": types.StringType, + "filters": basetypes.ListType{ + ElemType: Filters{}.Type(ctx), + }, + "gateway_definition": basetypes.ListType{ + ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + }, + "id": types.StringType, + "ingestion_definition": basetypes.ListType{ + ElemType: IngestionPipelineDefinition{}.Type(ctx), + }, + "libraries": basetypes.ListType{ + ElemType: PipelineLibrary{}.Type(ctx), + }, + "name": types.StringType, + "notifications": basetypes.ListType{ + ElemType: Notifications{}.Type(ctx), + }, + "photon": types.BoolType, + "restart_window": basetypes.ListType{ + ElemType: RestartWindow{}.Type(ctx), + }, + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": basetypes.ListType{ + ElemType: PipelineTrigger{}.Type(ctx), + }, + }, + } +} + +// GetClusters returns the value of the Clusters field in PipelineSpec_SdkV2 as +// a slice of PipelineCluster_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetClusters(ctx context.Context) ([]PipelineCluster_SdkV2, bool) { + if o.Clusters.IsNull() || o.Clusters.IsUnknown() { + return nil, false + } + var v []PipelineCluster_SdkV2 + d := o.Clusters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetClusters sets the value of the Clusters field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetClusters(ctx context.Context, v []PipelineCluster_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["clusters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Clusters = types.ListValueMust(t, vs) +} + +// GetConfiguration returns the value of the Configuration field in PipelineSpec_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 *PipelineSpec_SdkV2) GetConfiguration(ctx context.Context) (map[string]types.String, bool) { + if o.Configuration.IsNull() || o.Configuration.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Configuration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConfiguration sets the value of the Configuration field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetConfiguration(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["configuration"] + t = t.(attr.TypeWithElementType).ElementType() + o.Configuration = types.MapValueMust(t, vs) +} + +// GetDeployment returns the value of the Deployment field in PipelineSpec_SdkV2 as +// a PipelineDeployment_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetDeployment(ctx context.Context) (PipelineDeployment_SdkV2, bool) { + var e PipelineDeployment_SdkV2 + if o.Deployment.IsNull() || o.Deployment.IsUnknown() { + return e, false + } + var v []PipelineDeployment_SdkV2 + d := o.Deployment.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeployment sets the value of the Deployment field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetDeployment(ctx context.Context, v PipelineDeployment_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] + o.Deployment = types.ListValueMust(t, vs) +} + +// GetFilters returns the value of the Filters field in PipelineSpec_SdkV2 as +// a Filters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetFilters(ctx context.Context) (Filters_SdkV2, bool) { + var e Filters_SdkV2 + if o.Filters.IsNull() || o.Filters.IsUnknown() { + return e, false + } + var v []Filters_SdkV2 + d := o.Filters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilters sets the value of the Filters field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetFilters(ctx context.Context, v Filters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] + o.Filters = types.ListValueMust(t, vs) +} + +// GetGatewayDefinition returns the value of the GatewayDefinition field in PipelineSpec_SdkV2 as +// a IngestionGatewayPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetGatewayDefinition(ctx context.Context) (IngestionGatewayPipelineDefinition_SdkV2, bool) { + var e IngestionGatewayPipelineDefinition_SdkV2 + if o.GatewayDefinition.IsNull() || o.GatewayDefinition.IsUnknown() { + return e, false + } + var v []IngestionGatewayPipelineDefinition_SdkV2 + d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGatewayDefinition sets the value of the GatewayDefinition field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] + o.GatewayDefinition = types.ListValueMust(t, vs) +} + +// GetIngestionDefinition returns the value of the IngestionDefinition field in PipelineSpec_SdkV2 as +// a IngestionPipelineDefinition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetIngestionDefinition(ctx context.Context) (IngestionPipelineDefinition_SdkV2, bool) { + var e IngestionPipelineDefinition_SdkV2 + if o.IngestionDefinition.IsNull() || o.IngestionDefinition.IsUnknown() { + return e, false + } + var v []IngestionPipelineDefinition_SdkV2 + d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIngestionDefinition sets the value of the IngestionDefinition field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] + o.IngestionDefinition = types.ListValueMust(t, vs) +} + +// GetLibraries returns the value of the Libraries field in PipelineSpec_SdkV2 as +// a slice of PipelineLibrary_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetLibraries(ctx context.Context) ([]PipelineLibrary_SdkV2, bool) { + if o.Libraries.IsNull() || o.Libraries.IsUnknown() { + return nil, false + } + var v []PipelineLibrary_SdkV2 + d := o.Libraries.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLibraries sets the value of the Libraries field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetLibraries(ctx context.Context, v []PipelineLibrary_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["libraries"] + t = t.(attr.TypeWithElementType).ElementType() + o.Libraries = types.ListValueMust(t, vs) +} + +// GetNotifications returns the value of the Notifications field in PipelineSpec_SdkV2 as +// a slice of Notifications_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetNotifications(ctx context.Context) ([]Notifications_SdkV2, bool) { + if o.Notifications.IsNull() || o.Notifications.IsUnknown() { + return nil, false + } + var v []Notifications_SdkV2 + d := o.Notifications.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotifications sets the value of the Notifications field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetNotifications(ctx context.Context, v []Notifications_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["notifications"] + t = t.(attr.TypeWithElementType).ElementType() + o.Notifications = types.ListValueMust(t, vs) +} + +// GetRestartWindow returns the value of the RestartWindow field in PipelineSpec_SdkV2 as +// a RestartWindow_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetRestartWindow(ctx context.Context) (RestartWindow_SdkV2, bool) { + var e RestartWindow_SdkV2 + if o.RestartWindow.IsNull() || o.RestartWindow.IsUnknown() { + return e, false + } + var v []RestartWindow_SdkV2 + d := o.RestartWindow.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRestartWindow sets the value of the RestartWindow field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetRestartWindow(ctx context.Context, v RestartWindow_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] + o.RestartWindow = types.ListValueMust(t, vs) +} + +// GetTrigger returns the value of the Trigger field in PipelineSpec_SdkV2 as +// a PipelineTrigger_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineSpec_SdkV2) GetTrigger(ctx context.Context) (PipelineTrigger_SdkV2, bool) { + var e PipelineTrigger_SdkV2 + if o.Trigger.IsNull() || o.Trigger.IsUnknown() { + return e, false + } + var v []PipelineTrigger_SdkV2 + d := o.Trigger.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrigger sets the value of the Trigger field in PipelineSpec_SdkV2. +func (o *PipelineSpec_SdkV2) SetTrigger(ctx context.Context, v PipelineTrigger_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] + o.Trigger = types.ListValueMust(t, vs) +} + +type PipelineStateInfo_SdkV2 struct { + // The unique identifier of the cluster running the pipeline. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The username of the pipeline creator. + CreatorUserName types.String `tfsdk:"creator_user_name" tf:"optional"` + // The health of a pipeline. + Health types.String `tfsdk:"health" tf:"optional"` + // Status of the latest updates for the pipeline. Ordered with the newest + // update first. + LatestUpdates types.List `tfsdk:"latest_updates" tf:"optional"` + // The user-friendly name of the pipeline. + Name types.String `tfsdk:"name" tf:"optional"` + // The unique identifier of the pipeline. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // The username that the pipeline runs as. This is a read only value derived + // from the pipeline owner. + RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` + // The pipeline state. + State types.String `tfsdk:"state" tf:"optional"` +} + +func (newState *PipelineStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineStateInfo_SdkV2) { +} + +func (newState *PipelineStateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineStateInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineStateInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineStateInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "latest_updates": reflect.TypeOf(UpdateStateInfo_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, PipelineStateInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineStateInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "creator_user_name": o.CreatorUserName, + "health": o.Health, + "latest_updates": o.LatestUpdates, + "name": o.Name, + "pipeline_id": o.PipelineId, + "run_as_user_name": o.RunAsUserName, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineStateInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cluster_id": types.StringType, + "creator_user_name": types.StringType, + "health": types.StringType, + "latest_updates": basetypes.ListType{ + ElemType: UpdateStateInfo{}.Type(ctx), + }, + "name": types.StringType, + "pipeline_id": types.StringType, + "run_as_user_name": types.StringType, + "state": types.StringType, + }, + } +} + +// GetLatestUpdates returns the value of the LatestUpdates field in PipelineStateInfo_SdkV2 as +// a slice of UpdateStateInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineStateInfo_SdkV2) GetLatestUpdates(ctx context.Context) ([]UpdateStateInfo_SdkV2, bool) { + if o.LatestUpdates.IsNull() || o.LatestUpdates.IsUnknown() { + return nil, false + } + var v []UpdateStateInfo_SdkV2 + d := o.LatestUpdates.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetLatestUpdates sets the value of the LatestUpdates field in PipelineStateInfo_SdkV2. +func (o *PipelineStateInfo_SdkV2) SetLatestUpdates(ctx context.Context, v []UpdateStateInfo_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["latest_updates"] + t = t.(attr.TypeWithElementType).ElementType() + o.LatestUpdates = types.ListValueMust(t, vs) +} + +type PipelineTrigger_SdkV2 struct { + Cron types.List `tfsdk:"cron" tf:"optional,object"` + + Manual types.List `tfsdk:"manual" tf:"optional,object"` +} + +func (newState *PipelineTrigger_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineTrigger_SdkV2) { +} + +func (newState *PipelineTrigger_SdkV2) SyncEffectiveFieldsDuringRead(existingState PipelineTrigger_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PipelineTrigger. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PipelineTrigger_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cron": reflect.TypeOf(CronTrigger_SdkV2{}), + "manual": reflect.TypeOf(ManualTrigger_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, PipelineTrigger_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PipelineTrigger_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cron": o.Cron, + "manual": o.Manual, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PipelineTrigger_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cron": basetypes.ListType{ + ElemType: CronTrigger{}.Type(ctx), + }, + "manual": basetypes.ListType{ + ElemType: ManualTrigger{}.Type(ctx), + }, + }, + } +} + +// GetCron returns the value of the Cron field in PipelineTrigger_SdkV2 as +// a CronTrigger_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineTrigger_SdkV2) GetCron(ctx context.Context) (CronTrigger_SdkV2, bool) { + var e CronTrigger_SdkV2 + if o.Cron.IsNull() || o.Cron.IsUnknown() { + return e, false + } + var v []CronTrigger_SdkV2 + d := o.Cron.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCron sets the value of the Cron field in PipelineTrigger_SdkV2. +func (o *PipelineTrigger_SdkV2) SetCron(ctx context.Context, v CronTrigger_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cron"] + o.Cron = types.ListValueMust(t, vs) +} + +// GetManual returns the value of the Manual field in PipelineTrigger_SdkV2 as +// a ManualTrigger_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PipelineTrigger_SdkV2) GetManual(ctx context.Context) (ManualTrigger_SdkV2, bool) { + var e ManualTrigger_SdkV2 + if o.Manual.IsNull() || o.Manual.IsUnknown() { + return e, false + } + var v []ManualTrigger_SdkV2 + d := o.Manual.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetManual sets the value of the Manual field in PipelineTrigger_SdkV2. +func (o *PipelineTrigger_SdkV2) SetManual(ctx context.Context, v ManualTrigger_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manual"] + o.Manual = types.ListValueMust(t, vs) +} + +type ReportSpec_SdkV2 struct { + // Required. Destination catalog to store table. + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + // Required. Destination schema to store table. + DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + // Required. Destination table name. The pipeline fails if a table with that + // name already exists. + DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + // Required. Report URL in the source system. + SourceUrl types.String `tfsdk:"source_url" tf:"optional"` + // Configuration settings to control the ingestion of tables. These settings + // override the table_configuration defined in the + // IngestionPipelineDefinition object. + TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` +} + +func (newState *ReportSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReportSpec_SdkV2) { +} + +func (newState *ReportSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReportSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReportSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReportSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "table_configuration": reflect.TypeOf(TableSpecificConfig_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, ReportSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReportSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_catalog": o.DestinationCatalog, + "destination_schema": o.DestinationSchema, + "destination_table": o.DestinationTable, + "source_url": o.SourceUrl, + "table_configuration": o.TableConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ReportSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_catalog": types.StringType, + "destination_schema": types.StringType, + "destination_table": types.StringType, + "source_url": types.StringType, + "table_configuration": basetypes.ListType{ + ElemType: TableSpecificConfig{}.Type(ctx), + }, + }, + } +} + +// GetTableConfiguration returns the value of the TableConfiguration field in ReportSpec_SdkV2 as +// a TableSpecificConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ReportSpec_SdkV2) GetTableConfiguration(ctx context.Context) (TableSpecificConfig_SdkV2, bool) { + var e TableSpecificConfig_SdkV2 + if o.TableConfiguration.IsNull() || o.TableConfiguration.IsUnknown() { + return e, false + } + var v []TableSpecificConfig_SdkV2 + d := o.TableConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableConfiguration sets the value of the TableConfiguration field in ReportSpec_SdkV2. +func (o *ReportSpec_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpecificConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] + o.TableConfiguration = types.ListValueMust(t, vs) +} + +type RestartWindow_SdkV2 struct { + // Days of week in which the restart is allowed to happen (within a + // five-hour window starting at start_hour). If not specified all days of + // the week will be used. + DaysOfWeek types.String `tfsdk:"days_of_week" tf:"optional"` + // An integer between 0 and 23 denoting the start hour for the restart + // window in the 24-hour day. Continuous pipeline restart is triggered only + // within a five-hour window starting at this hour. + StartHour types.Int64 `tfsdk:"start_hour" tf:""` + // Time zone id of restart window. See + // https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html + // for details. If not specified, UTC will be used. + TimeZoneId types.String `tfsdk:"time_zone_id" tf:"optional"` +} + +func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestartWindow_SdkV2) { +} + +func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestartWindow_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestartWindow. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestartWindow_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, RestartWindow_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestartWindow_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "days_of_week": o.DaysOfWeek, + "start_hour": o.StartHour, + "time_zone_id": o.TimeZoneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestartWindow_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "days_of_week": types.StringType, + "start_hour": types.Int64Type, + "time_zone_id": types.StringType, + }, + } +} + +type SchemaSpec_SdkV2 struct { + // Required. Destination catalog to store tables. + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + // Required. Destination schema to store tables in. Tables with the same + // name as the source tables are created in this destination schema. The + // pipeline fails If a table with the same name already exists. + DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + // The source catalog name. Might be optional depending on the type of + // source. + SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + // Required. Schema name in the source database. + SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + // Configuration settings to control the ingestion of tables. These settings + // are applied to all tables in this schema and override the + // table_configuration defined in the IngestionPipelineDefinition object. + TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` +} + +func (newState *SchemaSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaSpec_SdkV2) { +} + +func (newState *SchemaSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState SchemaSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SchemaSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SchemaSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "table_configuration": reflect.TypeOf(TableSpecificConfig_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, SchemaSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SchemaSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_catalog": o.DestinationCatalog, + "destination_schema": o.DestinationSchema, + "source_catalog": o.SourceCatalog, + "source_schema": o.SourceSchema, + "table_configuration": o.TableConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SchemaSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_catalog": types.StringType, + "destination_schema": types.StringType, + "source_catalog": types.StringType, + "source_schema": types.StringType, + "table_configuration": basetypes.ListType{ + ElemType: TableSpecificConfig{}.Type(ctx), + }, + }, + } +} + +// GetTableConfiguration returns the value of the TableConfiguration field in SchemaSpec_SdkV2 as +// a TableSpecificConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SchemaSpec_SdkV2) GetTableConfiguration(ctx context.Context) (TableSpecificConfig_SdkV2, bool) { + var e TableSpecificConfig_SdkV2 + if o.TableConfiguration.IsNull() || o.TableConfiguration.IsUnknown() { + return e, false + } + var v []TableSpecificConfig_SdkV2 + d := o.TableConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableConfiguration sets the value of the TableConfiguration field in SchemaSpec_SdkV2. +func (o *SchemaSpec_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpecificConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] + o.TableConfiguration = types.ListValueMust(t, vs) +} + +type Sequencing_SdkV2 struct { + // A sequence number, unique and increasing within the control plane. + ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:"optional"` + // the ID assigned by the data plane. + DataPlaneId types.List `tfsdk:"data_plane_id" tf:"optional,object"` +} + +func (newState *Sequencing_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sequencing_SdkV2) { +} + +func (newState *Sequencing_SdkV2) SyncEffectiveFieldsDuringRead(existingState Sequencing_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Sequencing. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Sequencing_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data_plane_id": reflect.TypeOf(DataPlaneId_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, Sequencing_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Sequencing_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "control_plane_seq_no": o.ControlPlaneSeqNo, + "data_plane_id": o.DataPlaneId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Sequencing_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "control_plane_seq_no": types.Int64Type, + "data_plane_id": basetypes.ListType{ + ElemType: DataPlaneId{}.Type(ctx), + }, + }, + } +} + +// GetDataPlaneId returns the value of the DataPlaneId field in Sequencing_SdkV2 as +// a DataPlaneId_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Sequencing_SdkV2) GetDataPlaneId(ctx context.Context) (DataPlaneId_SdkV2, bool) { + var e DataPlaneId_SdkV2 + if o.DataPlaneId.IsNull() || o.DataPlaneId.IsUnknown() { + return e, false + } + var v []DataPlaneId_SdkV2 + d := o.DataPlaneId.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataPlaneId sets the value of the DataPlaneId field in Sequencing_SdkV2. +func (o *Sequencing_SdkV2) SetDataPlaneId(ctx context.Context, v DataPlaneId_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_id"] + o.DataPlaneId = types.ListValueMust(t, vs) +} + +type SerializedException_SdkV2 struct { + // Runtime class of the exception + ClassName types.String `tfsdk:"class_name" tf:"optional"` + // Exception message + Message types.String `tfsdk:"message" tf:"optional"` + // Stack trace consisting of a list of stack frames + Stack types.List `tfsdk:"stack" tf:"optional"` +} + +func (newState *SerializedException_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SerializedException_SdkV2) { +} + +func (newState *SerializedException_SdkV2) SyncEffectiveFieldsDuringRead(existingState SerializedException_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SerializedException. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SerializedException_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "stack": reflect.TypeOf(StackFrame_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, SerializedException_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SerializedException_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "class_name": o.ClassName, + "message": o.Message, + "stack": o.Stack, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SerializedException_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "class_name": types.StringType, + "message": types.StringType, + "stack": basetypes.ListType{ + ElemType: StackFrame{}.Type(ctx), + }, + }, + } +} + +// GetStack returns the value of the Stack field in SerializedException_SdkV2 as +// a slice of StackFrame_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SerializedException_SdkV2) GetStack(ctx context.Context) ([]StackFrame_SdkV2, bool) { + if o.Stack.IsNull() || o.Stack.IsUnknown() { + return nil, false + } + var v []StackFrame_SdkV2 + d := o.Stack.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStack sets the value of the Stack field in SerializedException_SdkV2. +func (o *SerializedException_SdkV2) SetStack(ctx context.Context, v []StackFrame_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["stack"] + t = t.(attr.TypeWithElementType).ElementType() + o.Stack = types.ListValueMust(t, vs) +} + +type StackFrame_SdkV2 struct { + // Class from which the method call originated + DeclaringClass types.String `tfsdk:"declaring_class" tf:"optional"` + // File where the method is defined + FileName types.String `tfsdk:"file_name" tf:"optional"` + // Line from which the method was called + LineNumber types.Int64 `tfsdk:"line_number" tf:"optional"` + // Name of the method which was called + MethodName types.String `tfsdk:"method_name" tf:"optional"` +} + +func (newState *StackFrame_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StackFrame_SdkV2) { +} + +func (newState *StackFrame_SdkV2) SyncEffectiveFieldsDuringRead(existingState StackFrame_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StackFrame. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StackFrame_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, StackFrame_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StackFrame_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "declaring_class": o.DeclaringClass, + "file_name": o.FileName, + "line_number": o.LineNumber, + "method_name": o.MethodName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StackFrame_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "declaring_class": types.StringType, + "file_name": types.StringType, + "line_number": types.Int64Type, + "method_name": types.StringType, + }, + } +} + +type StartUpdate_SdkV2 struct { + Cause types.String `tfsdk:"cause" tf:"optional"` + // If true, this update will reset all tables before running. + FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + // A list of tables to update with fullRefresh. If both refresh_selection + // and full_refresh_selection are empty, this is a full graph update. Full + // Refresh on a table means that the states of the table will be reset + // before the refresh. + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + + PipelineId types.String `tfsdk:"-"` + // A list of tables to update without fullRefresh. If both refresh_selection + // and full_refresh_selection are empty, this is a full graph update. Full + // Refresh on a table means that the states of the table will be reset + // before the refresh. + RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + // If true, this update only validates the correctness of pipeline source + // code but does not materialize or publish any datasets. + ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` +} + +func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdate_SdkV2) { +} + +func (newState *StartUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartUpdate_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartUpdate_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "full_refresh_selection": reflect.TypeOf(types.String{}), + "refresh_selection": 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, StartUpdate_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartUpdate_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cause": o.Cause, + "full_refresh": o.FullRefresh, + "full_refresh_selection": o.FullRefreshSelection, + "pipeline_id": o.PipelineId, + "refresh_selection": o.RefreshSelection, + "validate_only": o.ValidateOnly, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StartUpdate_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cause": types.StringType, + "full_refresh": types.BoolType, + "full_refresh_selection": basetypes.ListType{ + ElemType: types.StringType, + }, + "pipeline_id": types.StringType, + "refresh_selection": basetypes.ListType{ + ElemType: types.StringType, + }, + "validate_only": types.BoolType, + }, + } +} + +// GetFullRefreshSelection returns the value of the FullRefreshSelection field in StartUpdate_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *StartUpdate_SdkV2) GetFullRefreshSelection(ctx context.Context) ([]types.String, bool) { + if o.FullRefreshSelection.IsNull() || o.FullRefreshSelection.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FullRefreshSelection.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFullRefreshSelection sets the value of the FullRefreshSelection field in StartUpdate_SdkV2. +func (o *StartUpdate_SdkV2) SetFullRefreshSelection(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["full_refresh_selection"] + t = t.(attr.TypeWithElementType).ElementType() + o.FullRefreshSelection = types.ListValueMust(t, vs) +} + +// GetRefreshSelection returns the value of the RefreshSelection field in StartUpdate_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *StartUpdate_SdkV2) GetRefreshSelection(ctx context.Context) ([]types.String, bool) { + if o.RefreshSelection.IsNull() || o.RefreshSelection.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RefreshSelection.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRefreshSelection sets the value of the RefreshSelection field in StartUpdate_SdkV2. +func (o *StartUpdate_SdkV2) SetRefreshSelection(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["refresh_selection"] + t = t.(attr.TypeWithElementType).ElementType() + o.RefreshSelection = types.ListValueMust(t, vs) +} + +type StartUpdateResponse_SdkV2 struct { + UpdateId types.String `tfsdk:"update_id" tf:"optional"` +} + +func (newState *StartUpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartUpdateResponse_SdkV2) { +} + +func (newState *StartUpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartUpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StartUpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartUpdateResponse_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, StartUpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartUpdateResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "update_id": o.UpdateId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StartUpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "update_id": types.StringType, + }, + } +} + +type StopPipelineResponse_SdkV2 struct { +} + +func (newState *StopPipelineResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopPipelineResponse_SdkV2) { +} + +func (newState *StopPipelineResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopPipelineResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StopPipelineResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StopPipelineResponse_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, StopPipelineResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StopPipelineResponse_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 StopPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Stop a pipeline +type StopRequest_SdkV2 struct { + PipelineId types.String `tfsdk:"-"` +} + +func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest_SdkV2) { +} + +func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StopRequest_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, StopRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StopRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StopRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "pipeline_id": types.StringType, + }, + } +} + +type TableSpec_SdkV2 struct { + // Required. Destination catalog to store table. + DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` + // Required. Destination schema to store table. + DestinationSchema types.String `tfsdk:"destination_schema" tf:"optional"` + // Optional. Destination table name. The pipeline fails if a table with that + // name already exists. If not set, the source table name is used. + DestinationTable types.String `tfsdk:"destination_table" tf:"optional"` + // Source catalog name. Might be optional depending on the type of source. + SourceCatalog types.String `tfsdk:"source_catalog" tf:"optional"` + // Schema name in the source database. Might be optional depending on the + // type of source. + SourceSchema types.String `tfsdk:"source_schema" tf:"optional"` + // Required. Table name in the source database. + SourceTable types.String `tfsdk:"source_table" tf:"optional"` + // Configuration settings to control the ingestion of tables. These settings + // override the table_configuration defined in the + // IngestionPipelineDefinition object and the SchemaSpec. + TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` +} + +func (newState *TableSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpec_SdkV2) { +} + +func (newState *TableSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "table_configuration": reflect.TypeOf(TableSpecificConfig_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, TableSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_catalog": o.DestinationCatalog, + "destination_schema": o.DestinationSchema, + "destination_table": o.DestinationTable, + "source_catalog": o.SourceCatalog, + "source_schema": o.SourceSchema, + "source_table": o.SourceTable, + "table_configuration": o.TableConfiguration, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_catalog": types.StringType, + "destination_schema": types.StringType, + "destination_table": types.StringType, + "source_catalog": types.StringType, + "source_schema": types.StringType, + "source_table": types.StringType, + "table_configuration": basetypes.ListType{ + ElemType: TableSpecificConfig{}.Type(ctx), + }, + }, + } +} + +// GetTableConfiguration returns the value of the TableConfiguration field in TableSpec_SdkV2 as +// a TableSpecificConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TableSpec_SdkV2) GetTableConfiguration(ctx context.Context) (TableSpecificConfig_SdkV2, bool) { + var e TableSpecificConfig_SdkV2 + if o.TableConfiguration.IsNull() || o.TableConfiguration.IsUnknown() { + return e, false + } + var v []TableSpecificConfig_SdkV2 + d := o.TableConfiguration.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTableConfiguration sets the value of the TableConfiguration field in TableSpec_SdkV2. +func (o *TableSpec_SdkV2) SetTableConfiguration(ctx context.Context, v TableSpecificConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] + o.TableConfiguration = types.ListValueMust(t, vs) +} + +type TableSpecificConfig_SdkV2 struct { + // The primary key of the table used to apply changes. + PrimaryKeys types.List `tfsdk:"primary_keys" tf:"optional"` + // If true, formula fields defined in the table are included in the + // ingestion. This setting is only valid for the Salesforce connector + SalesforceIncludeFormulaFields types.Bool `tfsdk:"salesforce_include_formula_fields" tf:"optional"` + // The SCD type to use to ingest the table. + ScdType types.String `tfsdk:"scd_type" tf:"optional"` + // The column names specifying the logical order of events in the source + // data. Delta Live Tables uses this sequencing to handle change events that + // arrive out of order. + SequenceBy types.List `tfsdk:"sequence_by" tf:"optional"` +} + +func (newState *TableSpecificConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpecificConfig_SdkV2) { +} + +func (newState *TableSpecificConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState TableSpecificConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TableSpecificConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TableSpecificConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "primary_keys": reflect.TypeOf(types.String{}), + "sequence_by": 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, TableSpecificConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TableSpecificConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "primary_keys": o.PrimaryKeys, + "salesforce_include_formula_fields": o.SalesforceIncludeFormulaFields, + "scd_type": o.ScdType, + "sequence_by": o.SequenceBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TableSpecificConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "primary_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "salesforce_include_formula_fields": types.BoolType, + "scd_type": types.StringType, + "sequence_by": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPrimaryKeys returns the value of the PrimaryKeys field in TableSpecificConfig_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TableSpecificConfig_SdkV2) GetPrimaryKeys(ctx context.Context) ([]types.String, bool) { + if o.PrimaryKeys.IsNull() || o.PrimaryKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PrimaryKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrimaryKeys sets the value of the PrimaryKeys field in TableSpecificConfig_SdkV2. +func (o *TableSpecificConfig_SdkV2) SetPrimaryKeys(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["primary_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrimaryKeys = types.ListValueMust(t, vs) +} + +// GetSequenceBy returns the value of the SequenceBy field in TableSpecificConfig_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TableSpecificConfig_SdkV2) GetSequenceBy(ctx context.Context) ([]types.String, bool) { + if o.SequenceBy.IsNull() || o.SequenceBy.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SequenceBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSequenceBy sets the value of the SequenceBy field in TableSpecificConfig_SdkV2. +func (o *TableSpecificConfig_SdkV2) SetSequenceBy(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["sequence_by"] + t = t.(attr.TypeWithElementType).ElementType() + o.SequenceBy = types.ListValueMust(t, vs) +} + +type UpdateInfo_SdkV2 struct { + // What triggered this update. + Cause types.String `tfsdk:"cause" tf:"optional"` + // The ID of the cluster that the update is running on. + ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` + // The pipeline configuration with system defaults applied where unspecified + // by the user. Not returned by ListUpdates. + Config types.List `tfsdk:"config" tf:"optional,object"` + // The time when this update was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + // If true, this update will reset all tables before running. + FullRefresh types.Bool `tfsdk:"full_refresh" tf:"optional"` + // A list of tables to update with fullRefresh. If both refresh_selection + // and full_refresh_selection are empty, this is a full graph update. Full + // Refresh on a table means that the states of the table will be reset + // before the refresh. + FullRefreshSelection types.List `tfsdk:"full_refresh_selection" tf:"optional"` + // The ID of the pipeline. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // A list of tables to update without fullRefresh. If both refresh_selection + // and full_refresh_selection are empty, this is a full graph update. Full + // Refresh on a table means that the states of the table will be reset + // before the refresh. + RefreshSelection types.List `tfsdk:"refresh_selection" tf:"optional"` + // The update state. + State types.String `tfsdk:"state" tf:"optional"` + // The ID of this update. + UpdateId types.String `tfsdk:"update_id" tf:"optional"` + // If true, this update only validates the correctness of pipeline source + // code but does not materialize or publish any datasets. + ValidateOnly types.Bool `tfsdk:"validate_only" tf:"optional"` +} + +func (newState *UpdateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateInfo_SdkV2) { +} + +func (newState *UpdateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "config": reflect.TypeOf(PipelineSpec_SdkV2{}), + "full_refresh_selection": reflect.TypeOf(types.String{}), + "refresh_selection": 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, UpdateInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cause": o.Cause, + "cluster_id": o.ClusterId, + "config": o.Config, + "creation_time": o.CreationTime, + "full_refresh": o.FullRefresh, + "full_refresh_selection": o.FullRefreshSelection, + "pipeline_id": o.PipelineId, + "refresh_selection": o.RefreshSelection, + "state": o.State, + "update_id": o.UpdateId, + "validate_only": o.ValidateOnly, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cause": types.StringType, + "cluster_id": types.StringType, + "config": basetypes.ListType{ + ElemType: PipelineSpec{}.Type(ctx), + }, + "creation_time": types.Int64Type, + "full_refresh": types.BoolType, + "full_refresh_selection": basetypes.ListType{ + ElemType: types.StringType, + }, + "pipeline_id": types.StringType, + "refresh_selection": basetypes.ListType{ + ElemType: types.StringType, + }, + "state": types.StringType, + "update_id": types.StringType, + "validate_only": types.BoolType, + }, + } +} + +// GetConfig returns the value of the Config field in UpdateInfo_SdkV2 as +// a PipelineSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateInfo_SdkV2) GetConfig(ctx context.Context) (PipelineSpec_SdkV2, bool) { + var e PipelineSpec_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []PipelineSpec_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in UpdateInfo_SdkV2. +func (o *UpdateInfo_SdkV2) SetConfig(ctx context.Context, v PipelineSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// GetFullRefreshSelection returns the value of the FullRefreshSelection field in UpdateInfo_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateInfo_SdkV2) GetFullRefreshSelection(ctx context.Context) ([]types.String, bool) { + if o.FullRefreshSelection.IsNull() || o.FullRefreshSelection.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FullRefreshSelection.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFullRefreshSelection sets the value of the FullRefreshSelection field in UpdateInfo_SdkV2. +func (o *UpdateInfo_SdkV2) SetFullRefreshSelection(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["full_refresh_selection"] + t = t.(attr.TypeWithElementType).ElementType() + o.FullRefreshSelection = types.ListValueMust(t, vs) +} + +// GetRefreshSelection returns the value of the RefreshSelection field in UpdateInfo_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateInfo_SdkV2) GetRefreshSelection(ctx context.Context) ([]types.String, bool) { + if o.RefreshSelection.IsNull() || o.RefreshSelection.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RefreshSelection.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRefreshSelection sets the value of the RefreshSelection field in UpdateInfo_SdkV2. +func (o *UpdateInfo_SdkV2) SetRefreshSelection(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["refresh_selection"] + t = t.(attr.TypeWithElementType).ElementType() + o.RefreshSelection = types.ListValueMust(t, vs) +} + +type UpdateStateInfo_SdkV2 struct { + CreationTime types.String `tfsdk:"creation_time" tf:"optional"` + + State types.String `tfsdk:"state" tf:"optional"` + + UpdateId types.String `tfsdk:"update_id" tf:"optional"` +} + +func (newState *UpdateStateInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateStateInfo_SdkV2) { +} + +func (newState *UpdateStateInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateStateInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateStateInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateStateInfo_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, UpdateStateInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateStateInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_time": o.CreationTime, + "state": o.State, + "update_id": o.UpdateId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateStateInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_time": types.StringType, + "state": types.StringType, + "update_id": types.StringType, + }, + } +} diff --git a/internal/service/pipelines_tf/model.go b/internal/service/pipelines_tf/model.go index 311cb5ccb..d863ed263 100755 --- a/internal/service/pipelines_tf/model.go +++ b/internal/service/pipelines_tf/model.go @@ -43,7 +43,7 @@ type CreatePipeline struct { // Whether the pipeline is continuous or triggered. This replaces `trigger`. Continuous types.Bool `tfsdk:"continuous" tf:"optional"` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` // Whether the pipeline is in Development mode. Defaults to false. Development types.Bool `tfsdk:"development" tf:"optional"` @@ -51,14 +51,14 @@ type CreatePipeline struct { // Pipeline product edition. Edition types.String `tfsdk:"edition" tf:"optional"` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"optional,object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` // Unique identifier for this pipeline. Id types.String `tfsdk:"id" tf:"optional"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` // Libraries or code needed by this deployment. Libraries types.List `tfsdk:"libraries" tf:"optional"` // Friendly identifier for this pipeline. @@ -68,7 +68,7 @@ type CreatePipeline struct { // Whether Photon is enabled for this pipeline. Photon types.Bool `tfsdk:"photon" tf:"optional"` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. @@ -82,7 +82,7 @@ type CreatePipeline struct { // To publish to Unity Catalog, also specify `catalog`. Target types.String `tfsdk:"target" tf:"optional"` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` } func (newState *CreatePipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePipeline) { @@ -162,23 +162,15 @@ func (o CreatePipeline) Type(ctx context.Context) attr.Type { "configuration": basetypes.MapType{ ElemType: types.StringType, }, - "continuous": types.BoolType, - "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), - }, - "development": types.BoolType, - "dry_run": types.BoolType, - "edition": types.StringType, - "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), - }, - "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), - }, - "id": types.StringType, - "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), - }, + "continuous": types.BoolType, + "deployment": PipelineDeployment{}.Type(ctx), + "development": types.BoolType, + "dry_run": types.BoolType, + "edition": types.StringType, + "filters": Filters{}.Type(ctx), + "gateway_definition": IngestionGatewayPipelineDefinition{}.Type(ctx), + "id": types.StringType, + "ingestion_definition": IngestionPipelineDefinition{}.Type(ctx), "libraries": basetypes.ListType{ ElemType: PipelineLibrary{}.Type(ctx), }, @@ -186,17 +178,13 @@ func (o CreatePipeline) Type(ctx context.Context) attr.Type { "notifications": basetypes.ListType{ ElemType: Notifications{}.Type(ctx), }, - "photon": types.BoolType, - "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), - }, - "schema": types.StringType, - "serverless": types.BoolType, - "storage": types.StringType, - "target": types.StringType, - "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), - }, + "photon": types.BoolType, + "restart_window": RestartWindow{}.Type(ctx), + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": PipelineTrigger{}.Type(ctx), }, } } @@ -262,7 +250,10 @@ func (o *CreatePipeline) GetDeployment(ctx context.Context) (PipelineDeployment, return e, false } var v []PipelineDeployment - d := o.Deployment.ElementsAs(ctx, &v, true) + d := o.Deployment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -274,9 +265,8 @@ func (o *CreatePipeline) GetDeployment(ctx context.Context) (PipelineDeployment, // SetDeployment sets the value of the Deployment field in CreatePipeline. func (o *CreatePipeline) SetDeployment(ctx context.Context, v PipelineDeployment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] - o.Deployment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Deployment = vs } // GetFilters returns the value of the Filters field in CreatePipeline as @@ -288,7 +278,10 @@ func (o *CreatePipeline) GetFilters(ctx context.Context) (Filters, bool) { return e, false } var v []Filters - d := o.Filters.ElementsAs(ctx, &v, true) + d := o.Filters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -300,9 +293,8 @@ func (o *CreatePipeline) GetFilters(ctx context.Context) (Filters, bool) { // SetFilters sets the value of the Filters field in CreatePipeline. func (o *CreatePipeline) SetFilters(ctx context.Context, v Filters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] - o.Filters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filters = vs } // GetGatewayDefinition returns the value of the GatewayDefinition field in CreatePipeline as @@ -314,7 +306,10 @@ func (o *CreatePipeline) GetGatewayDefinition(ctx context.Context) (IngestionGat return e, false } var v []IngestionGatewayPipelineDefinition - d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + d := o.GatewayDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -326,9 +321,8 @@ func (o *CreatePipeline) GetGatewayDefinition(ctx context.Context) (IngestionGat // SetGatewayDefinition sets the value of the GatewayDefinition field in CreatePipeline. func (o *CreatePipeline) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] - o.GatewayDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GatewayDefinition = vs } // GetIngestionDefinition returns the value of the IngestionDefinition field in CreatePipeline as @@ -340,7 +334,10 @@ func (o *CreatePipeline) GetIngestionDefinition(ctx context.Context) (IngestionP return e, false } var v []IngestionPipelineDefinition - d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + d := o.IngestionDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -352,9 +349,8 @@ func (o *CreatePipeline) GetIngestionDefinition(ctx context.Context) (IngestionP // SetIngestionDefinition sets the value of the IngestionDefinition field in CreatePipeline. func (o *CreatePipeline) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] - o.IngestionDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IngestionDefinition = vs } // GetLibraries returns the value of the Libraries field in CreatePipeline as @@ -418,7 +414,10 @@ func (o *CreatePipeline) GetRestartWindow(ctx context.Context) (RestartWindow, b return e, false } var v []RestartWindow - d := o.RestartWindow.ElementsAs(ctx, &v, true) + d := o.RestartWindow.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -430,9 +429,8 @@ func (o *CreatePipeline) GetRestartWindow(ctx context.Context) (RestartWindow, b // SetRestartWindow sets the value of the RestartWindow field in CreatePipeline. func (o *CreatePipeline) SetRestartWindow(ctx context.Context, v RestartWindow) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] - o.RestartWindow = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RestartWindow = vs } // GetTrigger returns the value of the Trigger field in CreatePipeline as @@ -444,7 +442,10 @@ func (o *CreatePipeline) GetTrigger(ctx context.Context) (PipelineTrigger, bool) return e, false } var v []PipelineTrigger - d := o.Trigger.ElementsAs(ctx, &v, true) + d := o.Trigger.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -456,14 +457,13 @@ func (o *CreatePipeline) GetTrigger(ctx context.Context) (PipelineTrigger, bool) // SetTrigger sets the value of the Trigger field in CreatePipeline. func (o *CreatePipeline) SetTrigger(ctx context.Context, v PipelineTrigger) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] - o.Trigger = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Trigger = vs } type CreatePipelineResponse struct { // Only returned when dry_run is true. - EffectiveSettings types.List `tfsdk:"effective_settings" tf:"optional,object"` + EffectiveSettings types.Object `tfsdk:"effective_settings" tf:"optional,object"` // The unique identifier for the newly created pipeline. Only returned when // dry_run is false. PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` @@ -504,10 +504,8 @@ func (o CreatePipelineResponse) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreatePipelineResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "effective_settings": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), - }, - "pipeline_id": types.StringType, + "effective_settings": PipelineSpec{}.Type(ctx), + "pipeline_id": types.StringType, }, } } @@ -521,7 +519,10 @@ func (o *CreatePipelineResponse) GetEffectiveSettings(ctx context.Context) (Pipe return e, false } var v []PipelineSpec - d := o.EffectiveSettings.ElementsAs(ctx, &v, true) + d := o.EffectiveSettings.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -533,9 +534,8 @@ func (o *CreatePipelineResponse) GetEffectiveSettings(ctx context.Context) (Pipe // SetEffectiveSettings sets the value of the EffectiveSettings field in CreatePipelineResponse. func (o *CreatePipelineResponse) SetEffectiveSettings(ctx context.Context, v PipelineSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["effective_settings"] - o.EffectiveSettings = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EffectiveSettings = vs } type CronTrigger struct { @@ -728,7 +728,7 @@ type EditPipeline struct { // Whether the pipeline is continuous or triggered. This replaces `trigger`. Continuous types.Bool `tfsdk:"continuous" tf:"optional"` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` // Whether the pipeline is in Development mode. Defaults to false. Development types.Bool `tfsdk:"development" tf:"optional"` // Pipeline product edition. @@ -738,14 +738,14 @@ type EditPipeline struct { // will fail with a conflict. ExpectedLastModified types.Int64 `tfsdk:"expected_last_modified" tf:"optional"` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"optional,object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` // Unique identifier for this pipeline. Id types.String `tfsdk:"id" tf:"optional"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` // Libraries or code needed by this deployment. Libraries types.List `tfsdk:"libraries" tf:"optional"` // Friendly identifier for this pipeline. @@ -757,7 +757,7 @@ type EditPipeline struct { // Unique identifier for this pipeline. PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. @@ -771,7 +771,7 @@ type EditPipeline struct { // To publish to Unity Catalog, also specify `catalog`. Target types.String `tfsdk:"target" tf:"optional"` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` } func (newState *EditPipeline) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditPipeline) { @@ -852,23 +852,15 @@ func (o EditPipeline) Type(ctx context.Context) attr.Type { "configuration": basetypes.MapType{ ElemType: types.StringType, }, - "continuous": types.BoolType, - "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), - }, + "continuous": types.BoolType, + "deployment": PipelineDeployment{}.Type(ctx), "development": types.BoolType, "edition": types.StringType, "expected_last_modified": types.Int64Type, - "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), - }, - "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), - }, - "id": types.StringType, - "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), - }, + "filters": Filters{}.Type(ctx), + "gateway_definition": IngestionGatewayPipelineDefinition{}.Type(ctx), + "id": types.StringType, + "ingestion_definition": IngestionPipelineDefinition{}.Type(ctx), "libraries": basetypes.ListType{ ElemType: PipelineLibrary{}.Type(ctx), }, @@ -876,18 +868,14 @@ func (o EditPipeline) Type(ctx context.Context) attr.Type { "notifications": basetypes.ListType{ ElemType: Notifications{}.Type(ctx), }, - "photon": types.BoolType, - "pipeline_id": types.StringType, - "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), - }, - "schema": types.StringType, - "serverless": types.BoolType, - "storage": types.StringType, - "target": types.StringType, - "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), - }, + "photon": types.BoolType, + "pipeline_id": types.StringType, + "restart_window": RestartWindow{}.Type(ctx), + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": PipelineTrigger{}.Type(ctx), }, } } @@ -953,7 +941,10 @@ func (o *EditPipeline) GetDeployment(ctx context.Context) (PipelineDeployment, b return e, false } var v []PipelineDeployment - d := o.Deployment.ElementsAs(ctx, &v, true) + d := o.Deployment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -965,9 +956,8 @@ func (o *EditPipeline) GetDeployment(ctx context.Context) (PipelineDeployment, b // SetDeployment sets the value of the Deployment field in EditPipeline. func (o *EditPipeline) SetDeployment(ctx context.Context, v PipelineDeployment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] - o.Deployment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Deployment = vs } // GetFilters returns the value of the Filters field in EditPipeline as @@ -979,7 +969,10 @@ func (o *EditPipeline) GetFilters(ctx context.Context) (Filters, bool) { return e, false } var v []Filters - d := o.Filters.ElementsAs(ctx, &v, true) + d := o.Filters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -991,9 +984,8 @@ func (o *EditPipeline) GetFilters(ctx context.Context) (Filters, bool) { // SetFilters sets the value of the Filters field in EditPipeline. func (o *EditPipeline) SetFilters(ctx context.Context, v Filters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] - o.Filters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filters = vs } // GetGatewayDefinition returns the value of the GatewayDefinition field in EditPipeline as @@ -1005,7 +997,10 @@ func (o *EditPipeline) GetGatewayDefinition(ctx context.Context) (IngestionGatew return e, false } var v []IngestionGatewayPipelineDefinition - d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + d := o.GatewayDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1017,9 +1012,8 @@ func (o *EditPipeline) GetGatewayDefinition(ctx context.Context) (IngestionGatew // SetGatewayDefinition sets the value of the GatewayDefinition field in EditPipeline. func (o *EditPipeline) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] - o.GatewayDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GatewayDefinition = vs } // GetIngestionDefinition returns the value of the IngestionDefinition field in EditPipeline as @@ -1031,7 +1025,10 @@ func (o *EditPipeline) GetIngestionDefinition(ctx context.Context) (IngestionPip return e, false } var v []IngestionPipelineDefinition - d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + d := o.IngestionDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1043,9 +1040,8 @@ func (o *EditPipeline) GetIngestionDefinition(ctx context.Context) (IngestionPip // SetIngestionDefinition sets the value of the IngestionDefinition field in EditPipeline. func (o *EditPipeline) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] - o.IngestionDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IngestionDefinition = vs } // GetLibraries returns the value of the Libraries field in EditPipeline as @@ -1109,7 +1105,10 @@ func (o *EditPipeline) GetRestartWindow(ctx context.Context) (RestartWindow, boo return e, false } var v []RestartWindow - d := o.RestartWindow.ElementsAs(ctx, &v, true) + d := o.RestartWindow.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1121,9 +1120,8 @@ func (o *EditPipeline) GetRestartWindow(ctx context.Context) (RestartWindow, boo // SetRestartWindow sets the value of the RestartWindow field in EditPipeline. func (o *EditPipeline) SetRestartWindow(ctx context.Context, v RestartWindow) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] - o.RestartWindow = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RestartWindow = vs } // GetTrigger returns the value of the Trigger field in EditPipeline as @@ -1135,7 +1133,10 @@ func (o *EditPipeline) GetTrigger(ctx context.Context) (PipelineTrigger, bool) { return e, false } var v []PipelineTrigger - d := o.Trigger.ElementsAs(ctx, &v, true) + d := o.Trigger.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1147,9 +1148,8 @@ func (o *EditPipeline) GetTrigger(ctx context.Context) (PipelineTrigger, bool) { // SetTrigger sets the value of the Trigger field in EditPipeline. func (o *EditPipeline) SetTrigger(ctx context.Context, v PipelineTrigger) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] - o.Trigger = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Trigger = vs } type EditPipelineResponse struct { @@ -1635,7 +1635,7 @@ type GetPipelineResponse struct { RunAsUserName types.String `tfsdk:"run_as_user_name" tf:"optional"` // The pipeline specification. This field is not returned when called by // `ListPipelines`. - Spec types.List `tfsdk:"spec" tf:"optional,object"` + Spec types.Object `tfsdk:"spec" tf:"optional,object"` // The pipeline state. State types.String `tfsdk:"state" tf:"optional"` } @@ -1698,10 +1698,8 @@ func (o GetPipelineResponse) Type(ctx context.Context) attr.Type { "name": types.StringType, "pipeline_id": types.StringType, "run_as_user_name": types.StringType, - "spec": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), - }, - "state": types.StringType, + "spec": PipelineSpec{}.Type(ctx), + "state": types.StringType, }, } } @@ -1741,7 +1739,10 @@ func (o *GetPipelineResponse) GetSpec(ctx context.Context) (PipelineSpec, bool) return e, false } var v []PipelineSpec - d := o.Spec.ElementsAs(ctx, &v, true) + d := o.Spec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1753,9 +1754,8 @@ func (o *GetPipelineResponse) GetSpec(ctx context.Context) (PipelineSpec, bool) // SetSpec sets the value of the Spec field in GetPipelineResponse. func (o *GetPipelineResponse) SetSpec(ctx context.Context, v PipelineSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["spec"] - o.Spec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Spec = vs } // Get a pipeline update @@ -1807,7 +1807,7 @@ func (o GetUpdateRequest) Type(ctx context.Context) attr.Type { type GetUpdateResponse struct { // The current update info. - Update types.List `tfsdk:"update" tf:"optional,object"` + Update types.Object `tfsdk:"update" tf:"optional,object"` } func (newState *GetUpdateResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetUpdateResponse) { @@ -1844,9 +1844,7 @@ func (o GetUpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o GetUpdateResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "update": basetypes.ListType{ - ElemType: UpdateInfo{}.Type(ctx), - }, + "update": UpdateInfo{}.Type(ctx), }, } } @@ -1860,7 +1858,10 @@ func (o *GetUpdateResponse) GetUpdate(ctx context.Context) (UpdateInfo, bool) { return e, false } var v []UpdateInfo - d := o.Update.ElementsAs(ctx, &v, true) + d := o.Update.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1872,18 +1873,17 @@ func (o *GetUpdateResponse) GetUpdate(ctx context.Context) (UpdateInfo, bool) { // SetUpdate sets the value of the Update field in GetUpdateResponse. func (o *GetUpdateResponse) SetUpdate(ctx context.Context, v UpdateInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["update"] - o.Update = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Update = vs } type IngestionConfig struct { // Select a specific source report. - Report types.List `tfsdk:"report" tf:"optional,object"` + Report types.Object `tfsdk:"report" tf:"optional,object"` // Select all tables from a specific source schema. - Schema types.List `tfsdk:"schema" tf:"optional,object"` + Schema types.Object `tfsdk:"schema" tf:"optional,object"` // Select a specific source table. - Table types.List `tfsdk:"table" tf:"optional,object"` + Table types.Object `tfsdk:"table" tf:"optional,object"` } func (newState *IngestionConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionConfig) { @@ -1924,15 +1924,9 @@ func (o IngestionConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o IngestionConfig) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "report": basetypes.ListType{ - ElemType: ReportSpec{}.Type(ctx), - }, - "schema": basetypes.ListType{ - ElemType: SchemaSpec{}.Type(ctx), - }, - "table": basetypes.ListType{ - ElemType: TableSpec{}.Type(ctx), - }, + "report": ReportSpec{}.Type(ctx), + "schema": SchemaSpec{}.Type(ctx), + "table": TableSpec{}.Type(ctx), }, } } @@ -1946,7 +1940,10 @@ func (o *IngestionConfig) GetReport(ctx context.Context) (ReportSpec, bool) { return e, false } var v []ReportSpec - d := o.Report.ElementsAs(ctx, &v, true) + d := o.Report.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1958,9 +1955,8 @@ func (o *IngestionConfig) GetReport(ctx context.Context) (ReportSpec, bool) { // SetReport sets the value of the Report field in IngestionConfig. func (o *IngestionConfig) SetReport(ctx context.Context, v ReportSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["report"] - o.Report = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Report = vs } // GetSchema returns the value of the Schema field in IngestionConfig as @@ -1972,7 +1968,10 @@ func (o *IngestionConfig) GetSchema(ctx context.Context) (SchemaSpec, bool) { return e, false } var v []SchemaSpec - d := o.Schema.ElementsAs(ctx, &v, true) + d := o.Schema.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1984,9 +1983,8 @@ func (o *IngestionConfig) GetSchema(ctx context.Context) (SchemaSpec, bool) { // SetSchema sets the value of the Schema field in IngestionConfig. func (o *IngestionConfig) SetSchema(ctx context.Context, v SchemaSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schema"] - o.Schema = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schema = vs } // GetTable returns the value of the Table field in IngestionConfig as @@ -1998,7 +1996,10 @@ func (o *IngestionConfig) GetTable(ctx context.Context) (TableSpec, bool) { return e, false } var v []TableSpec - d := o.Table.ElementsAs(ctx, &v, true) + d := o.Table.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2010,9 +2011,8 @@ func (o *IngestionConfig) GetTable(ctx context.Context) (TableSpec, bool) { // SetTable sets the value of the Table field in IngestionConfig. func (o *IngestionConfig) SetTable(ctx context.Context, v TableSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table"] - o.Table = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Table = vs } type IngestionGatewayPipelineDefinition struct { @@ -2095,7 +2095,7 @@ type IngestionPipelineDefinition struct { Objects types.List `tfsdk:"objects" tf:"optional"` // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in the pipeline. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` } func (newState *IngestionPipelineDefinition) SyncEffectiveFieldsDuringCreateOrUpdate(plan IngestionPipelineDefinition) { @@ -2141,9 +2141,7 @@ func (o IngestionPipelineDefinition) Type(ctx context.Context) attr.Type { "objects": basetypes.ListType{ ElemType: IngestionConfig{}.Type(ctx), }, - "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), - }, + "table_configuration": TableSpecificConfig{}.Type(ctx), }, } } @@ -2183,7 +2181,10 @@ func (o *IngestionPipelineDefinition) GetTableConfiguration(ctx context.Context) return e, false } var v []TableSpecificConfig - d := o.TableConfiguration.ElementsAs(ctx, &v, true) + d := o.TableConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2195,9 +2196,8 @@ func (o *IngestionPipelineDefinition) GetTableConfiguration(ctx context.Context) // SetTableConfiguration sets the value of the TableConfiguration field in IngestionPipelineDefinition. func (o *IngestionPipelineDefinition) SetTableConfiguration(ctx context.Context, v TableSpecificConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] - o.TableConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableConfiguration = vs } // List pipeline events @@ -3138,20 +3138,20 @@ type PipelineCluster struct { // Parameters needed in order to automatically scale clusters up and down // based on load. Note: autoscaling works best with DB runtime versions 3.0 // or later. - Autoscale types.List `tfsdk:"autoscale" tf:"optional,object"` + Autoscale types.Object `tfsdk:"autoscale" tf:"optional,object"` // Attributes related to clusters running on Amazon Web Services. If not // specified at cluster creation, a set of default values will be used. - AwsAttributes types.List `tfsdk:"aws_attributes" tf:"optional,object"` + AwsAttributes types.Object `tfsdk:"aws_attributes" tf:"optional,object"` // Attributes related to clusters running on Microsoft Azure. If not // specified at cluster creation, a set of default values will be used. - AzureAttributes types.List `tfsdk:"azure_attributes" tf:"optional,object"` + AzureAttributes types.Object `tfsdk:"azure_attributes" tf:"optional,object"` // The configuration for delivering spark logs to a long-term storage // destination. Only dbfs destinations are supported. Only one destination // can be specified for one cluster. If the conf is given, the logs will be // delivered to the destination every `5 mins`. The destination of driver // logs is `$destination/$clusterId/driver`, while the destination of // executor logs is `$destination/$clusterId/executor`. - ClusterLogConf types.List `tfsdk:"cluster_log_conf" tf:"optional,object"` + ClusterLogConf types.Object `tfsdk:"cluster_log_conf" tf:"optional,object"` // Additional tags for cluster resources. Databricks will tag all cluster // resources (e.g., AWS instances and EBS volumes) with these tags in // addition to `default_tags`. Notes: @@ -3173,7 +3173,7 @@ type PipelineCluster struct { EnableLocalDiskEncryption types.Bool `tfsdk:"enable_local_disk_encryption" tf:"optional"` // Attributes related to clusters running on Google Cloud Platform. If not // specified at cluster creation, a set of default values will be used. - GcpAttributes types.List `tfsdk:"gcp_attributes" tf:"optional,object"` + GcpAttributes types.Object `tfsdk:"gcp_attributes" tf:"optional,object"` // The configuration for storing init scripts. Any number of destinations // can be specified. The scripts are executed sequentially in the order // provided. If `cluster_log_conf` is specified, init script logs are sent @@ -3290,27 +3290,17 @@ func (o PipelineCluster) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, - "autoscale": basetypes.ListType{ - ElemType: PipelineClusterAutoscale{}.Type(ctx), - }, - "aws_attributes": basetypes.ListType{ - ElemType: compute_tf.AwsAttributes{}.Type(ctx), - }, - "azure_attributes": basetypes.ListType{ - ElemType: compute_tf.AzureAttributes{}.Type(ctx), - }, - "cluster_log_conf": basetypes.ListType{ - ElemType: compute_tf.ClusterLogConf{}.Type(ctx), - }, + "autoscale": PipelineClusterAutoscale{}.Type(ctx), + "aws_attributes": compute_tf.AwsAttributes{}.Type(ctx), + "azure_attributes": compute_tf.AzureAttributes{}.Type(ctx), + "cluster_log_conf": compute_tf.ClusterLogConf{}.Type(ctx), "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_local_disk_encryption": types.BoolType, - "gcp_attributes": basetypes.ListType{ - ElemType: compute_tf.GcpAttributes{}.Type(ctx), - }, + "gcp_attributes": compute_tf.GcpAttributes{}.Type(ctx), "init_scripts": basetypes.ListType{ ElemType: compute_tf.InitScriptInfo{}.Type(ctx), }, @@ -3341,7 +3331,10 @@ func (o *PipelineCluster) GetAutoscale(ctx context.Context) (PipelineClusterAuto return e, false } var v []PipelineClusterAutoscale - d := o.Autoscale.ElementsAs(ctx, &v, true) + d := o.Autoscale.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3353,9 +3346,8 @@ func (o *PipelineCluster) GetAutoscale(ctx context.Context) (PipelineClusterAuto // SetAutoscale sets the value of the Autoscale field in PipelineCluster. func (o *PipelineCluster) SetAutoscale(ctx context.Context, v PipelineClusterAutoscale) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["autoscale"] - o.Autoscale = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Autoscale = vs } // GetAwsAttributes returns the value of the AwsAttributes field in PipelineCluster as @@ -3367,7 +3359,10 @@ func (o *PipelineCluster) GetAwsAttributes(ctx context.Context) (compute_tf.AwsA return e, false } var v []compute_tf.AwsAttributes - d := o.AwsAttributes.ElementsAs(ctx, &v, true) + d := o.AwsAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3379,9 +3374,8 @@ func (o *PipelineCluster) GetAwsAttributes(ctx context.Context) (compute_tf.AwsA // SetAwsAttributes sets the value of the AwsAttributes field in PipelineCluster. func (o *PipelineCluster) SetAwsAttributes(ctx context.Context, v compute_tf.AwsAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_attributes"] - o.AwsAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsAttributes = vs } // GetAzureAttributes returns the value of the AzureAttributes field in PipelineCluster as @@ -3393,7 +3387,10 @@ func (o *PipelineCluster) GetAzureAttributes(ctx context.Context) (compute_tf.Az return e, false } var v []compute_tf.AzureAttributes - d := o.AzureAttributes.ElementsAs(ctx, &v, true) + d := o.AzureAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3405,9 +3402,8 @@ func (o *PipelineCluster) GetAzureAttributes(ctx context.Context) (compute_tf.Az // SetAzureAttributes sets the value of the AzureAttributes field in PipelineCluster. func (o *PipelineCluster) SetAzureAttributes(ctx context.Context, v compute_tf.AzureAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_attributes"] - o.AzureAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureAttributes = vs } // GetClusterLogConf returns the value of the ClusterLogConf field in PipelineCluster as @@ -3419,7 +3415,10 @@ func (o *PipelineCluster) GetClusterLogConf(ctx context.Context) (compute_tf.Clu return e, false } var v []compute_tf.ClusterLogConf - d := o.ClusterLogConf.ElementsAs(ctx, &v, true) + d := o.ClusterLogConf.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3431,9 +3430,8 @@ func (o *PipelineCluster) GetClusterLogConf(ctx context.Context) (compute_tf.Clu // SetClusterLogConf sets the value of the ClusterLogConf field in PipelineCluster. func (o *PipelineCluster) SetClusterLogConf(ctx context.Context, v compute_tf.ClusterLogConf) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cluster_log_conf"] - o.ClusterLogConf = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ClusterLogConf = vs } // GetCustomTags returns the value of the CustomTags field in PipelineCluster as @@ -3471,7 +3469,10 @@ func (o *PipelineCluster) GetGcpAttributes(ctx context.Context) (compute_tf.GcpA return e, false } var v []compute_tf.GcpAttributes - d := o.GcpAttributes.ElementsAs(ctx, &v, true) + d := o.GcpAttributes.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3483,9 +3484,8 @@ func (o *PipelineCluster) GetGcpAttributes(ctx context.Context) (compute_tf.GcpA // SetGcpAttributes sets the value of the GcpAttributes field in PipelineCluster. func (o *PipelineCluster) SetGcpAttributes(ctx context.Context, v compute_tf.GcpAttributes) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_attributes"] - o.GcpAttributes = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpAttributes = vs } // GetInitScripts returns the value of the InitScripts field in PipelineCluster as @@ -3697,7 +3697,7 @@ func (o PipelineDeployment) Type(ctx context.Context) attr.Type { type PipelineEvent struct { // Information about an error captured by the event. - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"optional,object"` // The event type. Should always correspond to the details EventType types.String `tfsdk:"event_type" tf:"optional"` // A time-based, globally unique id. @@ -3709,9 +3709,9 @@ type PipelineEvent struct { // The display message associated with the event. Message types.String `tfsdk:"message" tf:"optional"` // Describes where the event originates from. - Origin types.List `tfsdk:"origin" tf:"optional,object"` + Origin types.Object `tfsdk:"origin" tf:"optional,object"` // A sequencing object to identify and order events. - Sequence types.List `tfsdk:"sequence" tf:"optional,object"` + Sequence types.Object `tfsdk:"sequence" tf:"optional,object"` // The time of the event. Timestamp types.String `tfsdk:"timestamp" tf:"optional"` } @@ -3760,21 +3760,15 @@ func (o PipelineEvent) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o PipelineEvent) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "error": basetypes.ListType{ - ElemType: ErrorDetail{}.Type(ctx), - }, + "error": ErrorDetail{}.Type(ctx), "event_type": types.StringType, "id": types.StringType, "level": types.StringType, "maturity_level": types.StringType, "message": types.StringType, - "origin": basetypes.ListType{ - ElemType: Origin{}.Type(ctx), - }, - "sequence": basetypes.ListType{ - ElemType: Sequencing{}.Type(ctx), - }, - "timestamp": types.StringType, + "origin": Origin{}.Type(ctx), + "sequence": Sequencing{}.Type(ctx), + "timestamp": types.StringType, }, } } @@ -3788,7 +3782,10 @@ func (o *PipelineEvent) GetError(ctx context.Context) (ErrorDetail, bool) { return e, false } var v []ErrorDetail - d := o.Error.ElementsAs(ctx, &v, true) + d := o.Error.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3800,9 +3797,8 @@ func (o *PipelineEvent) GetError(ctx context.Context) (ErrorDetail, bool) { // SetError sets the value of the Error field in PipelineEvent. func (o *PipelineEvent) SetError(ctx context.Context, v ErrorDetail) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] - o.Error = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Error = vs } // GetOrigin returns the value of the Origin field in PipelineEvent as @@ -3814,7 +3810,10 @@ func (o *PipelineEvent) GetOrigin(ctx context.Context) (Origin, bool) { return e, false } var v []Origin - d := o.Origin.ElementsAs(ctx, &v, true) + d := o.Origin.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3826,9 +3825,8 @@ func (o *PipelineEvent) GetOrigin(ctx context.Context) (Origin, bool) { // SetOrigin sets the value of the Origin field in PipelineEvent. func (o *PipelineEvent) SetOrigin(ctx context.Context, v Origin) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["origin"] - o.Origin = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Origin = vs } // GetSequence returns the value of the Sequence field in PipelineEvent as @@ -3840,7 +3838,10 @@ func (o *PipelineEvent) GetSequence(ctx context.Context) (Sequencing, bool) { return e, false } var v []Sequencing - d := o.Sequence.ElementsAs(ctx, &v, true) + d := o.Sequence.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3852,22 +3853,21 @@ func (o *PipelineEvent) GetSequence(ctx context.Context) (Sequencing, bool) { // SetSequence sets the value of the Sequence field in PipelineEvent. func (o *PipelineEvent) SetSequence(ctx context.Context, v Sequencing) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sequence"] - o.Sequence = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Sequence = vs } type PipelineLibrary struct { // The path to a file that defines a pipeline and is stored in the // Databricks Repos. - File types.List `tfsdk:"file" tf:"optional,object"` + File types.Object `tfsdk:"file" tf:"optional,object"` // URI of the jar to be installed. Currently only DBFS is supported. Jar types.String `tfsdk:"jar" tf:"optional"` // Specification of a maven library to be installed. - Maven types.List `tfsdk:"maven" tf:"optional,object"` + Maven types.Object `tfsdk:"maven" tf:"optional,object"` // The path to a notebook that defines a pipeline and is stored in the // Databricks workspace. - Notebook types.List `tfsdk:"notebook" tf:"optional,object"` + Notebook types.Object `tfsdk:"notebook" tf:"optional,object"` // URI of the whl to be installed. Whl types.String `tfsdk:"whl" tf:"optional"` } @@ -3912,17 +3912,11 @@ func (o PipelineLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o PipelineLibrary) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "file": basetypes.ListType{ - ElemType: FileLibrary{}.Type(ctx), - }, - "jar": types.StringType, - "maven": basetypes.ListType{ - ElemType: compute_tf.MavenLibrary{}.Type(ctx), - }, - "notebook": basetypes.ListType{ - ElemType: NotebookLibrary{}.Type(ctx), - }, - "whl": types.StringType, + "file": FileLibrary{}.Type(ctx), + "jar": types.StringType, + "maven": compute_tf.MavenLibrary{}.Type(ctx), + "notebook": NotebookLibrary{}.Type(ctx), + "whl": types.StringType, }, } } @@ -3936,7 +3930,10 @@ func (o *PipelineLibrary) GetFile(ctx context.Context) (FileLibrary, bool) { return e, false } var v []FileLibrary - d := o.File.ElementsAs(ctx, &v, true) + d := o.File.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3948,9 +3945,8 @@ func (o *PipelineLibrary) GetFile(ctx context.Context) (FileLibrary, bool) { // SetFile sets the value of the File field in PipelineLibrary. func (o *PipelineLibrary) SetFile(ctx context.Context, v FileLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["file"] - o.File = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.File = vs } // GetMaven returns the value of the Maven field in PipelineLibrary as @@ -3962,7 +3958,10 @@ func (o *PipelineLibrary) GetMaven(ctx context.Context) (compute_tf.MavenLibrary return e, false } var v []compute_tf.MavenLibrary - d := o.Maven.ElementsAs(ctx, &v, true) + d := o.Maven.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3974,9 +3973,8 @@ func (o *PipelineLibrary) GetMaven(ctx context.Context) (compute_tf.MavenLibrary // SetMaven sets the value of the Maven field in PipelineLibrary. func (o *PipelineLibrary) SetMaven(ctx context.Context, v compute_tf.MavenLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maven"] - o.Maven = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Maven = vs } // GetNotebook returns the value of the Notebook field in PipelineLibrary as @@ -3988,7 +3986,10 @@ func (o *PipelineLibrary) GetNotebook(ctx context.Context) (NotebookLibrary, boo return e, false } var v []NotebookLibrary - d := o.Notebook.ElementsAs(ctx, &v, true) + d := o.Notebook.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4000,9 +4001,8 @@ func (o *PipelineLibrary) GetNotebook(ctx context.Context) (NotebookLibrary, boo // SetNotebook sets the value of the Notebook field in PipelineLibrary. func (o *PipelineLibrary) SetNotebook(ctx context.Context, v NotebookLibrary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["notebook"] - o.Notebook = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Notebook = vs } type PipelinePermission struct { @@ -4301,20 +4301,20 @@ type PipelineSpec struct { // Whether the pipeline is continuous or triggered. This replaces `trigger`. Continuous types.Bool `tfsdk:"continuous" tf:"optional"` // Deployment type of this pipeline. - Deployment types.List `tfsdk:"deployment" tf:"optional,object"` + Deployment types.Object `tfsdk:"deployment" tf:"optional,object"` // Whether the pipeline is in Development mode. Defaults to false. Development types.Bool `tfsdk:"development" tf:"optional"` // Pipeline product edition. Edition types.String `tfsdk:"edition" tf:"optional"` // Filters on which Pipeline packages to include in the deployed graph. - Filters types.List `tfsdk:"filters" tf:"optional,object"` + Filters types.Object `tfsdk:"filters" tf:"optional,object"` // The definition of a gateway pipeline to support change data capture. - GatewayDefinition types.List `tfsdk:"gateway_definition" tf:"optional,object"` + GatewayDefinition types.Object `tfsdk:"gateway_definition" tf:"optional,object"` // Unique identifier for this pipeline. Id types.String `tfsdk:"id" tf:"optional"` // The configuration for a managed ingestion pipeline. These settings cannot // be used with the 'libraries', 'target' or 'catalog' settings. - IngestionDefinition types.List `tfsdk:"ingestion_definition" tf:"optional,object"` + IngestionDefinition types.Object `tfsdk:"ingestion_definition" tf:"optional,object"` // Libraries or code needed by this deployment. Libraries types.List `tfsdk:"libraries" tf:"optional"` // Friendly identifier for this pipeline. @@ -4324,7 +4324,7 @@ type PipelineSpec struct { // Whether Photon is enabled for this pipeline. Photon types.Bool `tfsdk:"photon" tf:"optional"` // Restart window of this pipeline. - RestartWindow types.List `tfsdk:"restart_window" tf:"optional,object"` + RestartWindow types.Object `tfsdk:"restart_window" tf:"optional,object"` // The default schema (database) where tables are read from or published to. // The presence of this field implies that the pipeline is in direct // publishing mode. @@ -4338,7 +4338,7 @@ type PipelineSpec struct { // To publish to Unity Catalog, also specify `catalog`. Target types.String `tfsdk:"target" tf:"optional"` // Which pipeline trigger to use. Deprecated: Use `continuous` instead. - Trigger types.List `tfsdk:"trigger" tf:"optional,object"` + Trigger types.Object `tfsdk:"trigger" tf:"optional,object"` } func (newState *PipelineSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineSpec) { @@ -4415,22 +4415,14 @@ func (o PipelineSpec) Type(ctx context.Context) attr.Type { "configuration": basetypes.MapType{ ElemType: types.StringType, }, - "continuous": types.BoolType, - "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), - }, - "development": types.BoolType, - "edition": types.StringType, - "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), - }, - "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), - }, - "id": types.StringType, - "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), - }, + "continuous": types.BoolType, + "deployment": PipelineDeployment{}.Type(ctx), + "development": types.BoolType, + "edition": types.StringType, + "filters": Filters{}.Type(ctx), + "gateway_definition": IngestionGatewayPipelineDefinition{}.Type(ctx), + "id": types.StringType, + "ingestion_definition": IngestionPipelineDefinition{}.Type(ctx), "libraries": basetypes.ListType{ ElemType: PipelineLibrary{}.Type(ctx), }, @@ -4438,17 +4430,13 @@ func (o PipelineSpec) Type(ctx context.Context) attr.Type { "notifications": basetypes.ListType{ ElemType: Notifications{}.Type(ctx), }, - "photon": types.BoolType, - "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), - }, - "schema": types.StringType, - "serverless": types.BoolType, - "storage": types.StringType, - "target": types.StringType, - "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), - }, + "photon": types.BoolType, + "restart_window": RestartWindow{}.Type(ctx), + "schema": types.StringType, + "serverless": types.BoolType, + "storage": types.StringType, + "target": types.StringType, + "trigger": PipelineTrigger{}.Type(ctx), }, } } @@ -4514,7 +4502,10 @@ func (o *PipelineSpec) GetDeployment(ctx context.Context) (PipelineDeployment, b return e, false } var v []PipelineDeployment - d := o.Deployment.ElementsAs(ctx, &v, true) + d := o.Deployment.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4526,9 +4517,8 @@ func (o *PipelineSpec) GetDeployment(ctx context.Context) (PipelineDeployment, b // SetDeployment sets the value of the Deployment field in PipelineSpec. func (o *PipelineSpec) SetDeployment(ctx context.Context, v PipelineDeployment) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["deployment"] - o.Deployment = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Deployment = vs } // GetFilters returns the value of the Filters field in PipelineSpec as @@ -4540,7 +4530,10 @@ func (o *PipelineSpec) GetFilters(ctx context.Context) (Filters, bool) { return e, false } var v []Filters - d := o.Filters.ElementsAs(ctx, &v, true) + d := o.Filters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4552,9 +4545,8 @@ func (o *PipelineSpec) GetFilters(ctx context.Context) (Filters, bool) { // SetFilters sets the value of the Filters field in PipelineSpec. func (o *PipelineSpec) SetFilters(ctx context.Context, v Filters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filters"] - o.Filters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Filters = vs } // GetGatewayDefinition returns the value of the GatewayDefinition field in PipelineSpec as @@ -4566,7 +4558,10 @@ func (o *PipelineSpec) GetGatewayDefinition(ctx context.Context) (IngestionGatew return e, false } var v []IngestionGatewayPipelineDefinition - d := o.GatewayDefinition.ElementsAs(ctx, &v, true) + d := o.GatewayDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4578,9 +4573,8 @@ func (o *PipelineSpec) GetGatewayDefinition(ctx context.Context) (IngestionGatew // SetGatewayDefinition sets the value of the GatewayDefinition field in PipelineSpec. func (o *PipelineSpec) SetGatewayDefinition(ctx context.Context, v IngestionGatewayPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gateway_definition"] - o.GatewayDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GatewayDefinition = vs } // GetIngestionDefinition returns the value of the IngestionDefinition field in PipelineSpec as @@ -4592,7 +4586,10 @@ func (o *PipelineSpec) GetIngestionDefinition(ctx context.Context) (IngestionPip return e, false } var v []IngestionPipelineDefinition - d := o.IngestionDefinition.ElementsAs(ctx, &v, true) + d := o.IngestionDefinition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4604,9 +4601,8 @@ func (o *PipelineSpec) GetIngestionDefinition(ctx context.Context) (IngestionPip // SetIngestionDefinition sets the value of the IngestionDefinition field in PipelineSpec. func (o *PipelineSpec) SetIngestionDefinition(ctx context.Context, v IngestionPipelineDefinition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ingestion_definition"] - o.IngestionDefinition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IngestionDefinition = vs } // GetLibraries returns the value of the Libraries field in PipelineSpec as @@ -4670,7 +4666,10 @@ func (o *PipelineSpec) GetRestartWindow(ctx context.Context) (RestartWindow, boo return e, false } var v []RestartWindow - d := o.RestartWindow.ElementsAs(ctx, &v, true) + d := o.RestartWindow.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4682,9 +4681,8 @@ func (o *PipelineSpec) GetRestartWindow(ctx context.Context) (RestartWindow, boo // SetRestartWindow sets the value of the RestartWindow field in PipelineSpec. func (o *PipelineSpec) SetRestartWindow(ctx context.Context, v RestartWindow) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restart_window"] - o.RestartWindow = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RestartWindow = vs } // GetTrigger returns the value of the Trigger field in PipelineSpec as @@ -4696,7 +4694,10 @@ func (o *PipelineSpec) GetTrigger(ctx context.Context) (PipelineTrigger, bool) { return e, false } var v []PipelineTrigger - d := o.Trigger.ElementsAs(ctx, &v, true) + d := o.Trigger.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4708,9 +4709,8 @@ func (o *PipelineSpec) GetTrigger(ctx context.Context) (PipelineTrigger, bool) { // SetTrigger sets the value of the Trigger field in PipelineSpec. func (o *PipelineSpec) SetTrigger(ctx context.Context, v PipelineTrigger) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["trigger"] - o.Trigger = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Trigger = vs } type PipelineStateInfo struct { @@ -4816,9 +4816,9 @@ func (o *PipelineStateInfo) SetLatestUpdates(ctx context.Context, v []UpdateStat } type PipelineTrigger struct { - Cron types.List `tfsdk:"cron" tf:"optional,object"` + Cron types.Object `tfsdk:"cron" tf:"optional,object"` - Manual types.List `tfsdk:"manual" tf:"optional,object"` + Manual types.Object `tfsdk:"manual" tf:"optional,object"` } func (newState *PipelineTrigger) SyncEffectiveFieldsDuringCreateOrUpdate(plan PipelineTrigger) { @@ -4857,12 +4857,8 @@ func (o PipelineTrigger) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o PipelineTrigger) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cron": basetypes.ListType{ - ElemType: CronTrigger{}.Type(ctx), - }, - "manual": basetypes.ListType{ - ElemType: ManualTrigger{}.Type(ctx), - }, + "cron": CronTrigger{}.Type(ctx), + "manual": ManualTrigger{}.Type(ctx), }, } } @@ -4876,7 +4872,10 @@ func (o *PipelineTrigger) GetCron(ctx context.Context) (CronTrigger, bool) { return e, false } var v []CronTrigger - d := o.Cron.ElementsAs(ctx, &v, true) + d := o.Cron.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4888,9 +4887,8 @@ func (o *PipelineTrigger) GetCron(ctx context.Context) (CronTrigger, bool) { // SetCron sets the value of the Cron field in PipelineTrigger. func (o *PipelineTrigger) SetCron(ctx context.Context, v CronTrigger) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cron"] - o.Cron = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Cron = vs } // GetManual returns the value of the Manual field in PipelineTrigger as @@ -4902,7 +4900,10 @@ func (o *PipelineTrigger) GetManual(ctx context.Context) (ManualTrigger, bool) { return e, false } var v []ManualTrigger - d := o.Manual.ElementsAs(ctx, &v, true) + d := o.Manual.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4914,9 +4915,8 @@ func (o *PipelineTrigger) GetManual(ctx context.Context) (ManualTrigger, bool) { // SetManual sets the value of the Manual field in PipelineTrigger. func (o *PipelineTrigger) SetManual(ctx context.Context, v ManualTrigger) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manual"] - o.Manual = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Manual = vs } type ReportSpec struct { @@ -4932,7 +4932,7 @@ type ReportSpec struct { // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` } func (newState *ReportSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReportSpec) { @@ -4977,9 +4977,7 @@ func (o ReportSpec) Type(ctx context.Context) attr.Type { "destination_schema": types.StringType, "destination_table": types.StringType, "source_url": types.StringType, - "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), - }, + "table_configuration": TableSpecificConfig{}.Type(ctx), }, } } @@ -4993,7 +4991,10 @@ func (o *ReportSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCo return e, false } var v []TableSpecificConfig - d := o.TableConfiguration.ElementsAs(ctx, &v, true) + d := o.TableConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5005,9 +5006,8 @@ func (o *ReportSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCo // SetTableConfiguration sets the value of the TableConfiguration field in ReportSpec. func (o *ReportSpec) SetTableConfiguration(ctx context.Context, v TableSpecificConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] - o.TableConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableConfiguration = vs } type RestartWindow struct { @@ -5081,7 +5081,7 @@ type SchemaSpec struct { // Configuration settings to control the ingestion of tables. These settings // are applied to all tables in this schema and override the // table_configuration defined in the IngestionPipelineDefinition object. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` } func (newState *SchemaSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan SchemaSpec) { @@ -5126,9 +5126,7 @@ func (o SchemaSpec) Type(ctx context.Context) attr.Type { "destination_schema": types.StringType, "source_catalog": types.StringType, "source_schema": types.StringType, - "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), - }, + "table_configuration": TableSpecificConfig{}.Type(ctx), }, } } @@ -5142,7 +5140,10 @@ func (o *SchemaSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCo return e, false } var v []TableSpecificConfig - d := o.TableConfiguration.ElementsAs(ctx, &v, true) + d := o.TableConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5154,16 +5155,15 @@ func (o *SchemaSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCo // SetTableConfiguration sets the value of the TableConfiguration field in SchemaSpec. func (o *SchemaSpec) SetTableConfiguration(ctx context.Context, v TableSpecificConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] - o.TableConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableConfiguration = vs } type Sequencing struct { // A sequence number, unique and increasing within the control plane. ControlPlaneSeqNo types.Int64 `tfsdk:"control_plane_seq_no" tf:"optional"` // the ID assigned by the data plane. - DataPlaneId types.List `tfsdk:"data_plane_id" tf:"optional,object"` + DataPlaneId types.Object `tfsdk:"data_plane_id" tf:"optional,object"` } func (newState *Sequencing) SyncEffectiveFieldsDuringCreateOrUpdate(plan Sequencing) { @@ -5202,9 +5202,7 @@ func (o Sequencing) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "control_plane_seq_no": types.Int64Type, - "data_plane_id": basetypes.ListType{ - ElemType: DataPlaneId{}.Type(ctx), - }, + "data_plane_id": DataPlaneId{}.Type(ctx), }, } } @@ -5218,7 +5216,10 @@ func (o *Sequencing) GetDataPlaneId(ctx context.Context) (DataPlaneId, bool) { return e, false } var v []DataPlaneId - d := o.DataPlaneId.ElementsAs(ctx, &v, true) + d := o.DataPlaneId.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5230,9 +5231,8 @@ func (o *Sequencing) GetDataPlaneId(ctx context.Context) (DataPlaneId, bool) { // SetDataPlaneId sets the value of the DataPlaneId field in Sequencing. func (o *Sequencing) SetDataPlaneId(ctx context.Context, v DataPlaneId) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_id"] - o.DataPlaneId = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataPlaneId = vs } type SerializedException struct { @@ -5633,7 +5633,7 @@ type TableSpec struct { // Configuration settings to control the ingestion of tables. These settings // override the table_configuration defined in the // IngestionPipelineDefinition object and the SchemaSpec. - TableConfiguration types.List `tfsdk:"table_configuration" tf:"optional,object"` + TableConfiguration types.Object `tfsdk:"table_configuration" tf:"optional,object"` } func (newState *TableSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan TableSpec) { @@ -5682,9 +5682,7 @@ func (o TableSpec) Type(ctx context.Context) attr.Type { "source_catalog": types.StringType, "source_schema": types.StringType, "source_table": types.StringType, - "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), - }, + "table_configuration": TableSpecificConfig{}.Type(ctx), }, } } @@ -5698,7 +5696,10 @@ func (o *TableSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCon return e, false } var v []TableSpecificConfig - d := o.TableConfiguration.ElementsAs(ctx, &v, true) + d := o.TableConfiguration.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5710,9 +5711,8 @@ func (o *TableSpec) GetTableConfiguration(ctx context.Context) (TableSpecificCon // SetTableConfiguration sets the value of the TableConfiguration field in TableSpec. func (o *TableSpec) SetTableConfiguration(ctx context.Context, v TableSpecificConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["table_configuration"] - o.TableConfiguration = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TableConfiguration = vs } type TableSpecificConfig struct { @@ -5838,7 +5838,7 @@ type UpdateInfo struct { ClusterId types.String `tfsdk:"cluster_id" tf:"optional"` // The pipeline configuration with system defaults applied where unspecified // by the user. Not returned by ListUpdates. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // The time when this update was created. CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` // If true, this update will reset all tables before running. @@ -5910,11 +5910,9 @@ func (o UpdateInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o UpdateInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "cause": types.StringType, - "cluster_id": types.StringType, - "config": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), - }, + "cause": types.StringType, + "cluster_id": types.StringType, + "config": PipelineSpec{}.Type(ctx), "creation_time": types.Int64Type, "full_refresh": types.BoolType, "full_refresh_selection": basetypes.ListType{ @@ -5940,7 +5938,10 @@ func (o *UpdateInfo) GetConfig(ctx context.Context) (PipelineSpec, bool) { return e, false } var v []PipelineSpec - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5952,9 +5953,8 @@ func (o *UpdateInfo) GetConfig(ctx context.Context) (PipelineSpec, bool) { // SetConfig sets the value of the Config field in UpdateInfo. func (o *UpdateInfo) SetConfig(ctx context.Context, v PipelineSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // GetFullRefreshSelection returns the value of the FullRefreshSelection field in UpdateInfo as diff --git a/internal/service/provisioning_tf/legacy_model.go b/internal/service/provisioning_tf/legacy_model.go new file mode 100755 index 000000000..f428ad9b4 --- /dev/null +++ b/internal/service/provisioning_tf/legacy_model.go @@ -0,0 +1,4161 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package provisioning_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AwsCredentials_SdkV2 struct { + StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` +} + +func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials_SdkV2) { +} + +func (newState *AwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsCredentials_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsCredentials. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsCredentials_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sts_role": reflect.TypeOf(StsRole_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, AwsCredentials_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsCredentials_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sts_role": o.StsRole, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsCredentials_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sts_role": basetypes.ListType{ + ElemType: StsRole{}.Type(ctx), + }, + }, + } +} + +// GetStsRole returns the value of the StsRole field in AwsCredentials_SdkV2 as +// a StsRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AwsCredentials_SdkV2) GetStsRole(ctx context.Context) (StsRole_SdkV2, bool) { + var e StsRole_SdkV2 + if o.StsRole.IsNull() || o.StsRole.IsUnknown() { + return e, false + } + var v []StsRole_SdkV2 + d := o.StsRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStsRole sets the value of the StsRole field in AwsCredentials_SdkV2. +func (o *AwsCredentials_SdkV2) SetStsRole(ctx context.Context, v StsRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sts_role"] + o.StsRole = types.ListValueMust(t, vs) +} + +type AwsKeyInfo_SdkV2 struct { + // The AWS KMS key alias. + KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + // The AWS KMS key's Amazon Resource Name (ARN). + KeyArn types.String `tfsdk:"key_arn" tf:""` + // The AWS KMS key region. + KeyRegion types.String `tfsdk:"key_region" tf:""` + // This field applies only if the `use_cases` property includes `STORAGE`. + // If this is set to `true` or omitted, the key is also used to encrypt + // cluster EBS volumes. If you do not want to use this key for encrypting + // EBS volumes, set to `false`. + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` +} + +func (newState *AwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsKeyInfo_SdkV2) { +} + +func (newState *AwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AwsKeyInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AwsKeyInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AwsKeyInfo_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, AwsKeyInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AwsKeyInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key_alias": o.KeyAlias, + "key_arn": o.KeyArn, + "key_region": o.KeyRegion, + "reuse_key_for_cluster_volumes": o.ReuseKeyForClusterVolumes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AwsKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key_alias": types.StringType, + "key_arn": types.StringType, + "key_region": types.StringType, + "reuse_key_for_cluster_volumes": types.BoolType, + }, + } +} + +type AzureWorkspaceInfo_SdkV2 struct { + // Azure Resource Group name + ResourceGroup types.String `tfsdk:"resource_group" tf:"optional"` + // Azure Subscription ID + SubscriptionId types.String `tfsdk:"subscription_id" tf:"optional"` +} + +func (newState *AzureWorkspaceInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureWorkspaceInfo_SdkV2) { +} + +func (newState *AzureWorkspaceInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureWorkspaceInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureWorkspaceInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureWorkspaceInfo_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, AzureWorkspaceInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureWorkspaceInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "resource_group": o.ResourceGroup, + "subscription_id": o.SubscriptionId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureWorkspaceInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "resource_group": types.StringType, + "subscription_id": types.StringType, + }, + } +} + +// The general workspace configurations that are specific to cloud providers. +type CloudResourceContainer_SdkV2 struct { + // The general workspace configurations that are specific to Google Cloud. + Gcp types.List `tfsdk:"gcp" tf:"optional,object"` +} + +func (newState *CloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudResourceContainer_SdkV2) { +} + +func (newState *CloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringRead(existingState CloudResourceContainer_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CloudResourceContainer. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CloudResourceContainer_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "gcp": reflect.TypeOf(CustomerFacingGcpCloudResourceContainer_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, CloudResourceContainer_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CloudResourceContainer_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "gcp": o.Gcp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CloudResourceContainer_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "gcp": basetypes.ListType{ + ElemType: CustomerFacingGcpCloudResourceContainer{}.Type(ctx), + }, + }, + } +} + +// GetGcp returns the value of the Gcp field in CloudResourceContainer_SdkV2 as +// a CustomerFacingGcpCloudResourceContainer_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CloudResourceContainer_SdkV2) GetGcp(ctx context.Context) (CustomerFacingGcpCloudResourceContainer_SdkV2, bool) { + var e CustomerFacingGcpCloudResourceContainer_SdkV2 + if o.Gcp.IsNull() || o.Gcp.IsUnknown() { + return e, false + } + var v []CustomerFacingGcpCloudResourceContainer_SdkV2 + d := o.Gcp.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcp sets the value of the Gcp field in CloudResourceContainer_SdkV2. +func (o *CloudResourceContainer_SdkV2) SetGcp(ctx context.Context, v CustomerFacingGcpCloudResourceContainer_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp"] + o.Gcp = types.ListValueMust(t, vs) +} + +type CreateAwsKeyInfo_SdkV2 struct { + // The AWS KMS key alias. + KeyAlias types.String `tfsdk:"key_alias" tf:"optional"` + // The AWS KMS key's Amazon Resource Name (ARN). Note that the key's AWS + // region is inferred from the ARN. + KeyArn types.String `tfsdk:"key_arn" tf:""` + // This field applies only if the `use_cases` property includes `STORAGE`. + // If this is set to `true` or omitted, the key is also used to encrypt + // cluster EBS volumes. To not use this key also for encrypting EBS volumes, + // set this to `false`. + ReuseKeyForClusterVolumes types.Bool `tfsdk:"reuse_key_for_cluster_volumes" tf:"optional"` +} + +func (newState *CreateAwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAwsKeyInfo_SdkV2) { +} + +func (newState *CreateAwsKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAwsKeyInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAwsKeyInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAwsKeyInfo_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, CreateAwsKeyInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAwsKeyInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key_alias": o.KeyAlias, + "key_arn": o.KeyArn, + "reuse_key_for_cluster_volumes": o.ReuseKeyForClusterVolumes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAwsKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key_alias": types.StringType, + "key_arn": types.StringType, + "reuse_key_for_cluster_volumes": types.BoolType, + }, + } +} + +type CreateCredentialAwsCredentials_SdkV2 struct { + StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` +} + +func (newState *CreateCredentialAwsCredentials_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialAwsCredentials_SdkV2) { +} + +func (newState *CreateCredentialAwsCredentials_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialAwsCredentials_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialAwsCredentials. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialAwsCredentials_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sts_role": reflect.TypeOf(CreateCredentialStsRole_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, CreateCredentialAwsCredentials_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialAwsCredentials_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "sts_role": o.StsRole, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialAwsCredentials_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "sts_role": basetypes.ListType{ + ElemType: CreateCredentialStsRole{}.Type(ctx), + }, + }, + } +} + +// GetStsRole returns the value of the StsRole field in CreateCredentialAwsCredentials_SdkV2 as +// a CreateCredentialStsRole_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialAwsCredentials_SdkV2) GetStsRole(ctx context.Context) (CreateCredentialStsRole_SdkV2, bool) { + var e CreateCredentialStsRole_SdkV2 + if o.StsRole.IsNull() || o.StsRole.IsUnknown() { + return e, false + } + var v []CreateCredentialStsRole_SdkV2 + d := o.StsRole.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStsRole sets the value of the StsRole field in CreateCredentialAwsCredentials_SdkV2. +func (o *CreateCredentialAwsCredentials_SdkV2) SetStsRole(ctx context.Context, v CreateCredentialStsRole_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sts_role"] + o.StsRole = types.ListValueMust(t, vs) +} + +type CreateCredentialRequest_SdkV2 struct { + AwsCredentials types.List `tfsdk:"aws_credentials" tf:"object"` + // The human-readable name of the credential configuration object. + CredentialsName types.String `tfsdk:"credentials_name" tf:""` +} + +func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialRequest_SdkV2) { +} + +func (newState *CreateCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_credentials": reflect.TypeOf(CreateCredentialAwsCredentials_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, CreateCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_credentials": o.AwsCredentials, + "credentials_name": o.CredentialsName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_credentials": basetypes.ListType{ + ElemType: CreateCredentialAwsCredentials{}.Type(ctx), + }, + "credentials_name": types.StringType, + }, + } +} + +// GetAwsCredentials returns the value of the AwsCredentials field in CreateCredentialRequest_SdkV2 as +// a CreateCredentialAwsCredentials_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCredentialRequest_SdkV2) GetAwsCredentials(ctx context.Context) (CreateCredentialAwsCredentials_SdkV2, bool) { + var e CreateCredentialAwsCredentials_SdkV2 + if o.AwsCredentials.IsNull() || o.AwsCredentials.IsUnknown() { + return e, false + } + var v []CreateCredentialAwsCredentials_SdkV2 + d := o.AwsCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsCredentials sets the value of the AwsCredentials field in CreateCredentialRequest_SdkV2. +func (o *CreateCredentialRequest_SdkV2) SetAwsCredentials(ctx context.Context, v CreateCredentialAwsCredentials_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_credentials"] + o.AwsCredentials = types.ListValueMust(t, vs) +} + +type CreateCredentialStsRole_SdkV2 struct { + // The Amazon Resource Name (ARN) of the cross account role. + RoleArn types.String `tfsdk:"role_arn" tf:"optional"` +} + +func (newState *CreateCredentialStsRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialStsRole_SdkV2) { +} + +func (newState *CreateCredentialStsRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialStsRole_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialStsRole. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialStsRole_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, CreateCredentialStsRole_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialStsRole_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "role_arn": o.RoleArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialStsRole_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "role_arn": types.StringType, + }, + } +} + +type CreateCustomerManagedKeyRequest_SdkV2 struct { + AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + + GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + // The cases that the key can be used for. + UseCases types.List `tfsdk:"use_cases" tf:""` +} + +func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCustomerManagedKeyRequest_SdkV2) { +} + +func (newState *CreateCustomerManagedKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCustomerManagedKeyRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCustomerManagedKeyRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_key_info": reflect.TypeOf(CreateAwsKeyInfo_SdkV2{}), + "gcp_key_info": reflect.TypeOf(CreateGcpKeyInfo_SdkV2{}), + "use_cases": 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, CreateCustomerManagedKeyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCustomerManagedKeyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_key_info": o.AwsKeyInfo, + "gcp_key_info": o.GcpKeyInfo, + "use_cases": o.UseCases, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCustomerManagedKeyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_key_info": basetypes.ListType{ + ElemType: CreateAwsKeyInfo{}.Type(ctx), + }, + "gcp_key_info": basetypes.ListType{ + ElemType: CreateGcpKeyInfo{}.Type(ctx), + }, + "use_cases": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAwsKeyInfo returns the value of the AwsKeyInfo field in CreateCustomerManagedKeyRequest_SdkV2 as +// a CreateAwsKeyInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomerManagedKeyRequest_SdkV2) GetAwsKeyInfo(ctx context.Context) (CreateAwsKeyInfo_SdkV2, bool) { + var e CreateAwsKeyInfo_SdkV2 + if o.AwsKeyInfo.IsNull() || o.AwsKeyInfo.IsUnknown() { + return e, false + } + var v []CreateAwsKeyInfo_SdkV2 + d := o.AwsKeyInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsKeyInfo sets the value of the AwsKeyInfo field in CreateCustomerManagedKeyRequest_SdkV2. +func (o *CreateCustomerManagedKeyRequest_SdkV2) SetAwsKeyInfo(ctx context.Context, v CreateAwsKeyInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_key_info"] + o.AwsKeyInfo = types.ListValueMust(t, vs) +} + +// GetGcpKeyInfo returns the value of the GcpKeyInfo field in CreateCustomerManagedKeyRequest_SdkV2 as +// a CreateGcpKeyInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomerManagedKeyRequest_SdkV2) GetGcpKeyInfo(ctx context.Context) (CreateGcpKeyInfo_SdkV2, bool) { + var e CreateGcpKeyInfo_SdkV2 + if o.GcpKeyInfo.IsNull() || o.GcpKeyInfo.IsUnknown() { + return e, false + } + var v []CreateGcpKeyInfo_SdkV2 + d := o.GcpKeyInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpKeyInfo sets the value of the GcpKeyInfo field in CreateCustomerManagedKeyRequest_SdkV2. +func (o *CreateCustomerManagedKeyRequest_SdkV2) SetGcpKeyInfo(ctx context.Context, v CreateGcpKeyInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_key_info"] + o.GcpKeyInfo = types.ListValueMust(t, vs) +} + +// GetUseCases returns the value of the UseCases field in CreateCustomerManagedKeyRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateCustomerManagedKeyRequest_SdkV2) GetUseCases(ctx context.Context) ([]types.String, bool) { + if o.UseCases.IsNull() || o.UseCases.IsUnknown() { + return nil, false + } + var v []types.String + d := o.UseCases.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUseCases sets the value of the UseCases field in CreateCustomerManagedKeyRequest_SdkV2. +func (o *CreateCustomerManagedKeyRequest_SdkV2) SetUseCases(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["use_cases"] + t = t.(attr.TypeWithElementType).ElementType() + o.UseCases = types.ListValueMust(t, vs) +} + +type CreateGcpKeyInfo_SdkV2 struct { + // The GCP KMS key's resource name + KmsKeyId types.String `tfsdk:"kms_key_id" tf:""` +} + +func (newState *CreateGcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateGcpKeyInfo_SdkV2) { +} + +func (newState *CreateGcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateGcpKeyInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateGcpKeyInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateGcpKeyInfo_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, CreateGcpKeyInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateGcpKeyInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "kms_key_id": o.KmsKeyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateGcpKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "kms_key_id": types.StringType, + }, + } +} + +type CreateNetworkRequest_SdkV2 struct { + // The Google Cloud specific information for this network (for example, the + // VPC ID, subnet ID, and secondary IP ranges). + GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"optional,object"` + // The human-readable name of the network configuration. + NetworkName types.String `tfsdk:"network_name" tf:""` + // IDs of one to five security groups associated with this network. Security + // group IDs **cannot** be used in multiple network configurations. + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + // IDs of at least two subnets associated with this network. Subnet IDs + // **cannot** be used in multiple network configurations. + SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + // If specified, contains the VPC endpoints used to allow cluster + // communication from this VPC over [AWS PrivateLink]. + // + // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ + VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + // The ID of the VPC associated with this network. VPC IDs can be used in + // multiple network configurations. + VpcId types.String `tfsdk:"vpc_id" tf:"optional"` +} + +func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkRequest_SdkV2) { +} + +func (newState *CreateNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNetworkRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateNetworkRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "gcp_network_info": reflect.TypeOf(GcpNetworkInfo_SdkV2{}), + "security_group_ids": reflect.TypeOf(types.String{}), + "subnet_ids": reflect.TypeOf(types.String{}), + "vpc_endpoints": reflect.TypeOf(NetworkVpcEndpoints_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, CreateNetworkRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateNetworkRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "gcp_network_info": o.GcpNetworkInfo, + "network_name": o.NetworkName, + "security_group_ids": o.SecurityGroupIds, + "subnet_ids": o.SubnetIds, + "vpc_endpoints": o.VpcEndpoints, + "vpc_id": o.VpcId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateNetworkRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "gcp_network_info": basetypes.ListType{ + ElemType: GcpNetworkInfo{}.Type(ctx), + }, + "network_name": types.StringType, + "security_group_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "subnet_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "vpc_endpoints": basetypes.ListType{ + ElemType: NetworkVpcEndpoints{}.Type(ctx), + }, + "vpc_id": types.StringType, + }, + } +} + +// GetGcpNetworkInfo returns the value of the GcpNetworkInfo field in CreateNetworkRequest_SdkV2 as +// a GcpNetworkInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateNetworkRequest_SdkV2) GetGcpNetworkInfo(ctx context.Context) (GcpNetworkInfo_SdkV2, bool) { + var e GcpNetworkInfo_SdkV2 + if o.GcpNetworkInfo.IsNull() || o.GcpNetworkInfo.IsUnknown() { + return e, false + } + var v []GcpNetworkInfo_SdkV2 + d := o.GcpNetworkInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpNetworkInfo sets the value of the GcpNetworkInfo field in CreateNetworkRequest_SdkV2. +func (o *CreateNetworkRequest_SdkV2) SetGcpNetworkInfo(ctx context.Context, v GcpNetworkInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_network_info"] + o.GcpNetworkInfo = types.ListValueMust(t, vs) +} + +// GetSecurityGroupIds returns the value of the SecurityGroupIds field in CreateNetworkRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateNetworkRequest_SdkV2) GetSecurityGroupIds(ctx context.Context) ([]types.String, bool) { + if o.SecurityGroupIds.IsNull() || o.SecurityGroupIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SecurityGroupIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSecurityGroupIds sets the value of the SecurityGroupIds field in CreateNetworkRequest_SdkV2. +func (o *CreateNetworkRequest_SdkV2) SetSecurityGroupIds(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["security_group_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.SecurityGroupIds = types.ListValueMust(t, vs) +} + +// GetSubnetIds returns the value of the SubnetIds field in CreateNetworkRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateNetworkRequest_SdkV2) GetSubnetIds(ctx context.Context) ([]types.String, bool) { + if o.SubnetIds.IsNull() || o.SubnetIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SubnetIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubnetIds sets the value of the SubnetIds field in CreateNetworkRequest_SdkV2. +func (o *CreateNetworkRequest_SdkV2) SetSubnetIds(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["subnet_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.SubnetIds = types.ListValueMust(t, vs) +} + +// GetVpcEndpoints returns the value of the VpcEndpoints field in CreateNetworkRequest_SdkV2 as +// a NetworkVpcEndpoints_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateNetworkRequest_SdkV2) GetVpcEndpoints(ctx context.Context) (NetworkVpcEndpoints_SdkV2, bool) { + var e NetworkVpcEndpoints_SdkV2 + if o.VpcEndpoints.IsNull() || o.VpcEndpoints.IsUnknown() { + return e, false + } + var v []NetworkVpcEndpoints_SdkV2 + d := o.VpcEndpoints.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVpcEndpoints sets the value of the VpcEndpoints field in CreateNetworkRequest_SdkV2. +func (o *CreateNetworkRequest_SdkV2) SetVpcEndpoints(ctx context.Context, v NetworkVpcEndpoints_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vpc_endpoints"] + o.VpcEndpoints = types.ListValueMust(t, vs) +} + +type CreateStorageConfigurationRequest_SdkV2 struct { + // Root S3 bucket information. + RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"object"` + // The human-readable name of the storage configuration. + StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:""` +} + +func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateStorageConfigurationRequest_SdkV2) { +} + +func (newState *CreateStorageConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateStorageConfigurationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateStorageConfigurationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "root_bucket_info": reflect.TypeOf(RootBucketInfo_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, CreateStorageConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateStorageConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "root_bucket_info": o.RootBucketInfo, + "storage_configuration_name": o.StorageConfigurationName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateStorageConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "root_bucket_info": basetypes.ListType{ + ElemType: RootBucketInfo{}.Type(ctx), + }, + "storage_configuration_name": types.StringType, + }, + } +} + +// GetRootBucketInfo returns the value of the RootBucketInfo field in CreateStorageConfigurationRequest_SdkV2 as +// a RootBucketInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateStorageConfigurationRequest_SdkV2) GetRootBucketInfo(ctx context.Context) (RootBucketInfo_SdkV2, bool) { + var e RootBucketInfo_SdkV2 + if o.RootBucketInfo.IsNull() || o.RootBucketInfo.IsUnknown() { + return e, false + } + var v []RootBucketInfo_SdkV2 + d := o.RootBucketInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRootBucketInfo sets the value of the RootBucketInfo field in CreateStorageConfigurationRequest_SdkV2. +func (o *CreateStorageConfigurationRequest_SdkV2) SetRootBucketInfo(ctx context.Context, v RootBucketInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["root_bucket_info"] + o.RootBucketInfo = types.ListValueMust(t, vs) +} + +type CreateVpcEndpointRequest_SdkV2 struct { + // The ID of the VPC endpoint object in AWS. + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + // The Google Cloud specific information for this Private Service Connect + // endpoint. + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + // The AWS region in which this VPC endpoint object exists. + Region types.String `tfsdk:"region" tf:"optional"` + // The human-readable name of the storage configuration. + VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:""` +} + +func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVpcEndpointRequest_SdkV2) { +} + +func (newState *CreateVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVpcEndpointRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVpcEndpointRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "gcp_vpc_endpoint_info": reflect.TypeOf(GcpVpcEndpointInfo_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, CreateVpcEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVpcEndpointRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_vpc_endpoint_id": o.AwsVpcEndpointId, + "gcp_vpc_endpoint_info": o.GcpVpcEndpointInfo, + "region": o.Region, + "vpc_endpoint_name": o.VpcEndpointName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVpcEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_vpc_endpoint_id": types.StringType, + "gcp_vpc_endpoint_info": basetypes.ListType{ + ElemType: GcpVpcEndpointInfo{}.Type(ctx), + }, + "region": types.StringType, + "vpc_endpoint_name": types.StringType, + }, + } +} + +// GetGcpVpcEndpointInfo returns the value of the GcpVpcEndpointInfo field in CreateVpcEndpointRequest_SdkV2 as +// a GcpVpcEndpointInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateVpcEndpointRequest_SdkV2) GetGcpVpcEndpointInfo(ctx context.Context) (GcpVpcEndpointInfo_SdkV2, bool) { + var e GcpVpcEndpointInfo_SdkV2 + if o.GcpVpcEndpointInfo.IsNull() || o.GcpVpcEndpointInfo.IsUnknown() { + return e, false + } + var v []GcpVpcEndpointInfo_SdkV2 + d := o.GcpVpcEndpointInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpVpcEndpointInfo sets the value of the GcpVpcEndpointInfo field in CreateVpcEndpointRequest_SdkV2. +func (o *CreateVpcEndpointRequest_SdkV2) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcEndpointInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_vpc_endpoint_info"] + o.GcpVpcEndpointInfo = types.ListValueMust(t, vs) +} + +type CreateWorkspaceRequest_SdkV2 struct { + // The AWS region of the workspace's data plane. + AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + // The cloud provider which the workspace uses. For Google Cloud workspaces, + // always set this field to `gcp`. + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // The general workspace configurations that are specific to cloud + // providers. + CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + // ID of the workspace's credential configuration object. + CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + // The custom tags key-value pairing that is attached to this workspace. The + // key-value pair is a string of utf-8 characters. The value can be an empty + // string, with maximum length of 255 characters. The key can be of maximum + // length of 127 characters, and cannot be empty. + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // The deployment name defines part of the subdomain for the workspace. The + // workspace URL for the web application and REST APIs is + // `.cloud.databricks.com`. For example, if the + // deployment name is `abcsales`, your workspace URL will be + // `https://abcsales.cloud.databricks.com`. Hyphens are allowed. This + // property supports only the set of characters that are allowed in a + // subdomain. + // + // To set this value, you must have a deployment name prefix. Contact your + // Databricks account team to add an account deployment name prefix to your + // account. + // + // Workspace deployment names follow the account prefix and a hyphen. For + // example, if your account's deployment prefix is `acme` and the workspace + // deployment name is `workspace-1`, the JSON response for the + // `deployment_name` field becomes `acme-workspace-1`. The workspace URL + // would be `acme-workspace-1.cloud.databricks.com`. + // + // You can also set the `deployment_name` to the reserved keyword `EMPTY` if + // you want the deployment name to only include the deployment prefix. For + // example, if your account's deployment prefix is `acme` and the workspace + // deployment name is `EMPTY`, the `deployment_name` becomes `acme` only and + // the workspace URL is `acme.cloud.databricks.com`. + // + // This value must be unique across all non-deleted deployments across all + // AWS regions. + // + // If a new workspace omits this property, the server generates a unique + // deployment name for you with the pattern `dbc-xxxxxxxx-xxxx`. + DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + // 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" tf:"optional,object"` + // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + // Whether no public IP is enabled for the workspace. + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + // The Google Cloud region of the workspace data plane in your Google + // account. For example, `us-east4`. + Location types.String `tfsdk:"location" tf:"optional"` + // The ID of the workspace's managed services encryption key configuration + // object. This is used to help protect and control access to the + // workspace's notebooks, secrets, Databricks SQL queries, and query + // history. The provided key configuration object property `use_cases` must + // contain `MANAGED_SERVICES`. + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + + NetworkId types.String `tfsdk:"network_id" tf:"optional"` + // The pricing tier of the workspace. For pricing tier information, see [AWS + // Pricing]. + // + // [AWS Pricing]: https://databricks.com/product/aws-pricing + PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + // ID of the workspace's private access settings object. Only used for + // PrivateLink. This ID must be specified for customers using [AWS + // PrivateLink] for either front-end (user-to-workspace connection), + // back-end (data plane to control plane connection), or both connection + // types. + // + // Before configuring PrivateLink, read the [Databricks article about + // PrivateLink].", + // + // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ + // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + // The ID of the workspace's storage configuration object. + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + // The ID of the workspace's storage encryption key configuration object. + // This is used to encrypt the workspace's root S3 bucket (root DBFS and + // system data) and, optionally, cluster EBS volumes. The provided key + // configuration object property `use_cases` must contain `STORAGE`. + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + // The workspace's human-readable name. + WorkspaceName types.String `tfsdk:"workspace_name" tf:""` +} + +func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWorkspaceRequest_SdkV2) { +} + +func (newState *CreateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWorkspaceRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateWorkspaceRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cloud_resource_container": reflect.TypeOf(CloudResourceContainer_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "gcp_managed_network_config": reflect.TypeOf(GcpManagedNetworkConfig_SdkV2{}), + "gke_config": reflect.TypeOf(GkeConfig_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, CreateWorkspaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateWorkspaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_region": o.AwsRegion, + "cloud": o.Cloud, + "cloud_resource_container": o.CloudResourceContainer, + "credentials_id": o.CredentialsId, + "custom_tags": o.CustomTags, + "deployment_name": o.DeploymentName, + "gcp_managed_network_config": o.GcpManagedNetworkConfig, + "gke_config": o.GkeConfig, + "is_no_public_ip_enabled": o.IsNoPublicIpEnabled, + "location": o.Location, + "managed_services_customer_managed_key_id": o.ManagedServicesCustomerManagedKeyId, + "network_id": o.NetworkId, + "pricing_tier": o.PricingTier, + "private_access_settings_id": o.PrivateAccessSettingsId, + "storage_configuration_id": o.StorageConfigurationId, + "storage_customer_managed_key_id": o.StorageCustomerManagedKeyId, + "workspace_name": o.WorkspaceName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_region": types.StringType, + "cloud": types.StringType, + "cloud_resource_container": basetypes.ListType{ + ElemType: CloudResourceContainer{}.Type(ctx), + }, + "credentials_id": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "deployment_name": types.StringType, + "gcp_managed_network_config": basetypes.ListType{ + ElemType: GcpManagedNetworkConfig{}.Type(ctx), + }, + "gke_config": basetypes.ListType{ + ElemType: GkeConfig{}.Type(ctx), + }, + "is_no_public_ip_enabled": types.BoolType, + "location": types.StringType, + "managed_services_customer_managed_key_id": types.StringType, + "network_id": types.StringType, + "pricing_tier": types.StringType, + "private_access_settings_id": types.StringType, + "storage_configuration_id": types.StringType, + "storage_customer_managed_key_id": types.StringType, + "workspace_name": types.StringType, + }, + } +} + +// GetCloudResourceContainer returns the value of the CloudResourceContainer field in CreateWorkspaceRequest_SdkV2 as +// a CloudResourceContainer_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWorkspaceRequest_SdkV2) GetCloudResourceContainer(ctx context.Context) (CloudResourceContainer_SdkV2, bool) { + var e CloudResourceContainer_SdkV2 + if o.CloudResourceContainer.IsNull() || o.CloudResourceContainer.IsUnknown() { + return e, false + } + var v []CloudResourceContainer_SdkV2 + d := o.CloudResourceContainer.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudResourceContainer sets the value of the CloudResourceContainer field in CreateWorkspaceRequest_SdkV2. +func (o *CreateWorkspaceRequest_SdkV2) SetCloudResourceContainer(ctx context.Context, v CloudResourceContainer_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloud_resource_container"] + o.CloudResourceContainer = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in CreateWorkspaceRequest_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 *CreateWorkspaceRequest_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in CreateWorkspaceRequest_SdkV2. +func (o *CreateWorkspaceRequest_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetGcpManagedNetworkConfig returns the value of the GcpManagedNetworkConfig field in CreateWorkspaceRequest_SdkV2 as +// a GcpManagedNetworkConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWorkspaceRequest_SdkV2) GetGcpManagedNetworkConfig(ctx context.Context) (GcpManagedNetworkConfig_SdkV2, bool) { + var e GcpManagedNetworkConfig_SdkV2 + if o.GcpManagedNetworkConfig.IsNull() || o.GcpManagedNetworkConfig.IsUnknown() { + return e, false + } + var v []GcpManagedNetworkConfig_SdkV2 + d := o.GcpManagedNetworkConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpManagedNetworkConfig sets the value of the GcpManagedNetworkConfig field in CreateWorkspaceRequest_SdkV2. +func (o *CreateWorkspaceRequest_SdkV2) SetGcpManagedNetworkConfig(ctx context.Context, v GcpManagedNetworkConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_managed_network_config"] + o.GcpManagedNetworkConfig = types.ListValueMust(t, vs) +} + +// GetGkeConfig returns the value of the GkeConfig field in CreateWorkspaceRequest_SdkV2 as +// a GkeConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWorkspaceRequest_SdkV2) GetGkeConfig(ctx context.Context) (GkeConfig_SdkV2, bool) { + var e GkeConfig_SdkV2 + if o.GkeConfig.IsNull() || o.GkeConfig.IsUnknown() { + return e, false + } + var v []GkeConfig_SdkV2 + d := o.GkeConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGkeConfig sets the value of the GkeConfig field in CreateWorkspaceRequest_SdkV2. +func (o *CreateWorkspaceRequest_SdkV2) SetGkeConfig(ctx context.Context, v GkeConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gke_config"] + o.GkeConfig = types.ListValueMust(t, vs) +} + +type Credential_SdkV2 struct { + // The Databricks account ID that hosts the credential. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + + AwsCredentials types.List `tfsdk:"aws_credentials" tf:"optional,object"` + // Time in epoch milliseconds when the credential was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // Databricks credential configuration ID. + CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + // The human-readable name of the credential configuration object. + CredentialsName types.String `tfsdk:"credentials_name" tf:"optional"` +} + +func (newState *Credential_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Credential_SdkV2) { +} + +func (newState *Credential_SdkV2) SyncEffectiveFieldsDuringRead(existingState Credential_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Credential. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Credential_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_credentials": reflect.TypeOf(AwsCredentials_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, Credential_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Credential_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "aws_credentials": o.AwsCredentials, + "creation_time": o.CreationTime, + "credentials_id": o.CredentialsId, + "credentials_name": o.CredentialsName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Credential_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "aws_credentials": basetypes.ListType{ + ElemType: AwsCredentials{}.Type(ctx), + }, + "creation_time": types.Int64Type, + "credentials_id": types.StringType, + "credentials_name": types.StringType, + }, + } +} + +// GetAwsCredentials returns the value of the AwsCredentials field in Credential_SdkV2 as +// a AwsCredentials_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Credential_SdkV2) GetAwsCredentials(ctx context.Context) (AwsCredentials_SdkV2, bool) { + var e AwsCredentials_SdkV2 + if o.AwsCredentials.IsNull() || o.AwsCredentials.IsUnknown() { + return e, false + } + var v []AwsCredentials_SdkV2 + d := o.AwsCredentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsCredentials sets the value of the AwsCredentials field in Credential_SdkV2. +func (o *Credential_SdkV2) SetAwsCredentials(ctx context.Context, v AwsCredentials_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_credentials"] + o.AwsCredentials = types.ListValueMust(t, vs) +} + +// The general workspace configurations that are specific to Google Cloud. +type CustomerFacingGcpCloudResourceContainer_SdkV2 struct { + // The Google Cloud project ID, which the workspace uses to instantiate + // cloud resources for your workspace. + ProjectId types.String `tfsdk:"project_id" tf:"optional"` +} + +func (newState *CustomerFacingGcpCloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerFacingGcpCloudResourceContainer_SdkV2) { +} + +func (newState *CustomerFacingGcpCloudResourceContainer_SdkV2) SyncEffectiveFieldsDuringRead(existingState CustomerFacingGcpCloudResourceContainer_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerFacingGcpCloudResourceContainer. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CustomerFacingGcpCloudResourceContainer_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, CustomerFacingGcpCloudResourceContainer_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CustomerFacingGcpCloudResourceContainer_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "project_id": o.ProjectId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CustomerFacingGcpCloudResourceContainer_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "project_id": types.StringType, + }, + } +} + +type CustomerManagedKey_SdkV2 struct { + // The Databricks account ID that holds the customer-managed key. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + + AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + // Time in epoch milliseconds when the customer key was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // ID of the encryption key configuration object. + CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:"optional"` + + GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + // The cases that the key can be used for. + UseCases types.List `tfsdk:"use_cases" tf:"optional"` +} + +func (newState *CustomerManagedKey_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CustomerManagedKey_SdkV2) { +} + +func (newState *CustomerManagedKey_SdkV2) SyncEffectiveFieldsDuringRead(existingState CustomerManagedKey_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CustomerManagedKey. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CustomerManagedKey_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_key_info": reflect.TypeOf(AwsKeyInfo_SdkV2{}), + "gcp_key_info": reflect.TypeOf(GcpKeyInfo_SdkV2{}), + "use_cases": 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, CustomerManagedKey_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CustomerManagedKey_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "aws_key_info": o.AwsKeyInfo, + "creation_time": o.CreationTime, + "customer_managed_key_id": o.CustomerManagedKeyId, + "gcp_key_info": o.GcpKeyInfo, + "use_cases": o.UseCases, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CustomerManagedKey_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "aws_key_info": basetypes.ListType{ + ElemType: AwsKeyInfo{}.Type(ctx), + }, + "creation_time": types.Int64Type, + "customer_managed_key_id": types.StringType, + "gcp_key_info": basetypes.ListType{ + ElemType: GcpKeyInfo{}.Type(ctx), + }, + "use_cases": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAwsKeyInfo returns the value of the AwsKeyInfo field in CustomerManagedKey_SdkV2 as +// a AwsKeyInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CustomerManagedKey_SdkV2) GetAwsKeyInfo(ctx context.Context) (AwsKeyInfo_SdkV2, bool) { + var e AwsKeyInfo_SdkV2 + if o.AwsKeyInfo.IsNull() || o.AwsKeyInfo.IsUnknown() { + return e, false + } + var v []AwsKeyInfo_SdkV2 + d := o.AwsKeyInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsKeyInfo sets the value of the AwsKeyInfo field in CustomerManagedKey_SdkV2. +func (o *CustomerManagedKey_SdkV2) SetAwsKeyInfo(ctx context.Context, v AwsKeyInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_key_info"] + o.AwsKeyInfo = types.ListValueMust(t, vs) +} + +// GetGcpKeyInfo returns the value of the GcpKeyInfo field in CustomerManagedKey_SdkV2 as +// a GcpKeyInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CustomerManagedKey_SdkV2) GetGcpKeyInfo(ctx context.Context) (GcpKeyInfo_SdkV2, bool) { + var e GcpKeyInfo_SdkV2 + if o.GcpKeyInfo.IsNull() || o.GcpKeyInfo.IsUnknown() { + return e, false + } + var v []GcpKeyInfo_SdkV2 + d := o.GcpKeyInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpKeyInfo sets the value of the GcpKeyInfo field in CustomerManagedKey_SdkV2. +func (o *CustomerManagedKey_SdkV2) SetGcpKeyInfo(ctx context.Context, v GcpKeyInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_key_info"] + o.GcpKeyInfo = types.ListValueMust(t, vs) +} + +// GetUseCases returns the value of the UseCases field in CustomerManagedKey_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CustomerManagedKey_SdkV2) GetUseCases(ctx context.Context) ([]types.String, bool) { + if o.UseCases.IsNull() || o.UseCases.IsUnknown() { + return nil, false + } + var v []types.String + d := o.UseCases.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUseCases sets the value of the UseCases field in CustomerManagedKey_SdkV2. +func (o *CustomerManagedKey_SdkV2) SetUseCases(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["use_cases"] + t = t.(attr.TypeWithElementType).ElementType() + o.UseCases = types.ListValueMust(t, vs) +} + +// Delete credential configuration +type DeleteCredentialRequest_SdkV2 struct { + // Databricks Account API credential configuration ID + CredentialsId types.String `tfsdk:"-"` +} + +func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialRequest_SdkV2) { +} + +func (newState *DeleteCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCredentialRequest_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, DeleteCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credentials_id": types.StringType, + }, + } +} + +// Delete encryption key configuration +type DeleteEncryptionKeyRequest_SdkV2 struct { + // Databricks encryption key configuration ID. + CustomerManagedKeyId types.String `tfsdk:"-"` +} + +func (newState *DeleteEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEncryptionKeyRequest_SdkV2) { +} + +func (newState *DeleteEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEncryptionKeyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEncryptionKeyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteEncryptionKeyRequest_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, DeleteEncryptionKeyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteEncryptionKeyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "customer_managed_key_id": o.CustomerManagedKeyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteEncryptionKeyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "customer_managed_key_id": types.StringType, + }, + } +} + +// Delete a network configuration +type DeleteNetworkRequest_SdkV2 struct { + // Databricks Account API network configuration ID. + NetworkId types.String `tfsdk:"-"` +} + +func (newState *DeleteNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkRequest_SdkV2) { +} + +func (newState *DeleteNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteNetworkRequest_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, DeleteNetworkRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteNetworkRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_id": o.NetworkId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteNetworkRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_id": types.StringType, + }, + } +} + +// Delete a private access settings object +type DeletePrivateAccesRequest_SdkV2 struct { + // Databricks Account API private access settings ID. + PrivateAccessSettingsId types.String `tfsdk:"-"` +} + +func (newState *DeletePrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateAccesRequest_SdkV2) { +} + +func (newState *DeletePrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePrivateAccesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateAccesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePrivateAccesRequest_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, DeletePrivateAccesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePrivateAccesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "private_access_settings_id": o.PrivateAccessSettingsId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePrivateAccesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "private_access_settings_id": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete storage configuration +type DeleteStorageRequest_SdkV2 struct { + // Databricks Account API storage configuration ID. + StorageConfigurationId types.String `tfsdk:"-"` +} + +func (newState *DeleteStorageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteStorageRequest_SdkV2) { +} + +func (newState *DeleteStorageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteStorageRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteStorageRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteStorageRequest_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, DeleteStorageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteStorageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "storage_configuration_id": o.StorageConfigurationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteStorageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "storage_configuration_id": types.StringType, + }, + } +} + +// Delete VPC endpoint configuration +type DeleteVpcEndpointRequest_SdkV2 struct { + // Databricks VPC endpoint ID. + VpcEndpointId types.String `tfsdk:"-"` +} + +func (newState *DeleteVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVpcEndpointRequest_SdkV2) { +} + +func (newState *DeleteVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVpcEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVpcEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteVpcEndpointRequest_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, DeleteVpcEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteVpcEndpointRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "vpc_endpoint_id": o.VpcEndpointId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteVpcEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "vpc_endpoint_id": types.StringType, + }, + } +} + +// Delete a workspace +type DeleteWorkspaceRequest_SdkV2 struct { + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWorkspaceRequest_SdkV2) { +} + +func (newState *DeleteWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWorkspaceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWorkspaceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWorkspaceRequest_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, DeleteWorkspaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_id": types.Int64Type, + }, + } +} + +type ExternalCustomerInfo_SdkV2 struct { + // Email of the authoritative user. + AuthoritativeUserEmail types.String `tfsdk:"authoritative_user_email" tf:"optional"` + // The authoritative user full name. + AuthoritativeUserFullName types.String `tfsdk:"authoritative_user_full_name" tf:"optional"` + // The legal entity name for the external workspace + CustomerName types.String `tfsdk:"customer_name" tf:"optional"` +} + +func (newState *ExternalCustomerInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalCustomerInfo_SdkV2) { +} + +func (newState *ExternalCustomerInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalCustomerInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalCustomerInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExternalCustomerInfo_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, ExternalCustomerInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalCustomerInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authoritative_user_email": o.AuthoritativeUserEmail, + "authoritative_user_full_name": o.AuthoritativeUserFullName, + "customer_name": o.CustomerName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalCustomerInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authoritative_user_email": types.StringType, + "authoritative_user_full_name": types.StringType, + "customer_name": types.StringType, + }, + } +} + +type GcpKeyInfo_SdkV2 struct { + // The GCP KMS key's resource name + KmsKeyId types.String `tfsdk:"kms_key_id" tf:""` +} + +func (newState *GcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpKeyInfo_SdkV2) { +} + +func (newState *GcpKeyInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpKeyInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpKeyInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpKeyInfo_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, GcpKeyInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpKeyInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "kms_key_id": o.KmsKeyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpKeyInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "kms_key_id": types.StringType, + }, + } +} + +// 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 +type GcpManagedNetworkConfig_SdkV2 struct { + // The IP range from which to allocate GKE cluster pods. No bigger than `/9` + // and no smaller than `/21`. + GkeClusterPodIpRange types.String `tfsdk:"gke_cluster_pod_ip_range" tf:"optional"` + // The IP range from which to allocate GKE cluster services. No bigger than + // `/16` and no smaller than `/27`. + GkeClusterServiceIpRange types.String `tfsdk:"gke_cluster_service_ip_range" tf:"optional"` + // The IP range from which to allocate GKE cluster nodes. No bigger than + // `/9` and no smaller than `/29`. + SubnetCidr types.String `tfsdk:"subnet_cidr" tf:"optional"` +} + +func (newState *GcpManagedNetworkConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpManagedNetworkConfig_SdkV2) { +} + +func (newState *GcpManagedNetworkConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpManagedNetworkConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpManagedNetworkConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpManagedNetworkConfig_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, GcpManagedNetworkConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpManagedNetworkConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "gke_cluster_pod_ip_range": o.GkeClusterPodIpRange, + "gke_cluster_service_ip_range": o.GkeClusterServiceIpRange, + "subnet_cidr": o.SubnetCidr, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpManagedNetworkConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "gke_cluster_pod_ip_range": types.StringType, + "gke_cluster_service_ip_range": types.StringType, + "subnet_cidr": types.StringType, + }, + } +} + +// The Google Cloud specific information for this network (for example, the VPC +// ID, subnet ID, and secondary IP ranges). +type GcpNetworkInfo_SdkV2 struct { + // The Google Cloud project ID of the VPC network. + NetworkProjectId types.String `tfsdk:"network_project_id" tf:""` + // The name of the secondary IP range for pods. A Databricks-managed GKE + // cluster uses this IP range for its pods. This secondary IP range can be + // used by only one workspace. + PodIpRangeName types.String `tfsdk:"pod_ip_range_name" tf:""` + // The name of the secondary IP range for services. A Databricks-managed GKE + // cluster uses this IP range for its services. This secondary IP range can + // be used by only one workspace. + ServiceIpRangeName types.String `tfsdk:"service_ip_range_name" tf:""` + // The ID of the subnet associated with this network. + SubnetId types.String `tfsdk:"subnet_id" tf:""` + // The Google Cloud region of the workspace data plane (for example, + // `us-east4`). + SubnetRegion types.String `tfsdk:"subnet_region" tf:""` + // The ID of the VPC associated with this network. VPC IDs can be used in + // multiple network configurations. + VpcId types.String `tfsdk:"vpc_id" tf:""` +} + +func (newState *GcpNetworkInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpNetworkInfo_SdkV2) { +} + +func (newState *GcpNetworkInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpNetworkInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpNetworkInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpNetworkInfo_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, GcpNetworkInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpNetworkInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_project_id": o.NetworkProjectId, + "pod_ip_range_name": o.PodIpRangeName, + "service_ip_range_name": o.ServiceIpRangeName, + "subnet_id": o.SubnetId, + "subnet_region": o.SubnetRegion, + "vpc_id": o.VpcId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpNetworkInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_project_id": types.StringType, + "pod_ip_range_name": types.StringType, + "service_ip_range_name": types.StringType, + "subnet_id": types.StringType, + "subnet_region": types.StringType, + "vpc_id": types.StringType, + }, + } +} + +// The Google Cloud specific information for this Private Service Connect +// endpoint. +type GcpVpcEndpointInfo_SdkV2 struct { + // Region of the PSC endpoint. + EndpointRegion types.String `tfsdk:"endpoint_region" tf:""` + // The Google Cloud project ID of the VPC network where the PSC connection + // resides. + ProjectId types.String `tfsdk:"project_id" tf:""` + // The unique ID of this PSC connection. + PscConnectionId types.String `tfsdk:"psc_connection_id" tf:"optional"` + // The name of the PSC endpoint in the Google Cloud project. + PscEndpointName types.String `tfsdk:"psc_endpoint_name" tf:""` + // The service attachment this PSC connection connects to. + ServiceAttachmentId types.String `tfsdk:"service_attachment_id" tf:"optional"` +} + +func (newState *GcpVpcEndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GcpVpcEndpointInfo_SdkV2) { +} + +func (newState *GcpVpcEndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState GcpVpcEndpointInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GcpVpcEndpointInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GcpVpcEndpointInfo_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, GcpVpcEndpointInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GcpVpcEndpointInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_region": o.EndpointRegion, + "project_id": o.ProjectId, + "psc_connection_id": o.PscConnectionId, + "psc_endpoint_name": o.PscEndpointName, + "service_attachment_id": o.ServiceAttachmentId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GcpVpcEndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_region": types.StringType, + "project_id": types.StringType, + "psc_connection_id": types.StringType, + "psc_endpoint_name": types.StringType, + "service_attachment_id": types.StringType, + }, + } +} + +// Get credential configuration +type GetCredentialRequest_SdkV2 struct { + // Databricks Account API credential configuration ID + CredentialsId types.String `tfsdk:"-"` +} + +func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialRequest_SdkV2) { +} + +func (newState *GetCredentialRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCredentialRequest_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, GetCredentialRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCredentialRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credentials_id": types.StringType, + }, + } +} + +// Get encryption key configuration +type GetEncryptionKeyRequest_SdkV2 struct { + // Databricks encryption key configuration ID. + CustomerManagedKeyId types.String `tfsdk:"-"` +} + +func (newState *GetEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEncryptionKeyRequest_SdkV2) { +} + +func (newState *GetEncryptionKeyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEncryptionKeyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEncryptionKeyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEncryptionKeyRequest_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, GetEncryptionKeyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEncryptionKeyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "customer_managed_key_id": o.CustomerManagedKeyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEncryptionKeyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "customer_managed_key_id": types.StringType, + }, + } +} + +// Get a network configuration +type GetNetworkRequest_SdkV2 struct { + // Databricks Account API network configuration ID. + NetworkId types.String `tfsdk:"-"` +} + +func (newState *GetNetworkRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkRequest_SdkV2) { +} + +func (newState *GetNetworkRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNetworkRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetNetworkRequest_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, GetNetworkRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetNetworkRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_id": o.NetworkId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetNetworkRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_id": types.StringType, + }, + } +} + +// Get a private access settings object +type GetPrivateAccesRequest_SdkV2 struct { + // Databricks Account API private access settings ID. + PrivateAccessSettingsId types.String `tfsdk:"-"` +} + +func (newState *GetPrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateAccesRequest_SdkV2) { +} + +func (newState *GetPrivateAccesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPrivateAccesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateAccesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPrivateAccesRequest_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, GetPrivateAccesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPrivateAccesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "private_access_settings_id": o.PrivateAccessSettingsId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPrivateAccesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "private_access_settings_id": types.StringType, + }, + } +} + +// Get storage configuration +type GetStorageRequest_SdkV2 struct { + // Databricks Account API storage configuration ID. + StorageConfigurationId types.String `tfsdk:"-"` +} + +func (newState *GetStorageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStorageRequest_SdkV2) { +} + +func (newState *GetStorageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStorageRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStorageRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStorageRequest_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, GetStorageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStorageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "storage_configuration_id": o.StorageConfigurationId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStorageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "storage_configuration_id": types.StringType, + }, + } +} + +// Get a VPC endpoint configuration +type GetVpcEndpointRequest_SdkV2 struct { + // Databricks VPC endpoint ID. + VpcEndpointId types.String `tfsdk:"-"` +} + +func (newState *GetVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetVpcEndpointRequest_SdkV2) { +} + +func (newState *GetVpcEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetVpcEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetVpcEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetVpcEndpointRequest_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, GetVpcEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetVpcEndpointRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "vpc_endpoint_id": o.VpcEndpointId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetVpcEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "vpc_endpoint_id": types.StringType, + }, + } +} + +// Get a workspace +type GetWorkspaceRequest_SdkV2 struct { + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *GetWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceRequest_SdkV2) { +} + +func (newState *GetWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceRequest_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, GetWorkspaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_id": types.Int64Type, + }, + } +} + +// The configurations for the GKE cluster of a Databricks workspace. +type GkeConfig_SdkV2 struct { + // Specifies the network connectivity types for the GKE nodes and the GKE + // master network. + // + // Set to `PRIVATE_NODE_PUBLIC_MASTER` for a private GKE cluster for the + // workspace. The GKE nodes will not have public IPs. + // + // Set to `PUBLIC_NODE_PUBLIC_MASTER` for a public GKE cluster. The nodes of + // a public GKE cluster have public IP addresses. + ConnectivityType types.String `tfsdk:"connectivity_type" tf:"optional"` + // The IP range from which to allocate GKE cluster master resources. This + // field will be ignored if GKE private cluster is not enabled. + // + // It must be exactly as big as `/28`. + MasterIpRange types.String `tfsdk:"master_ip_range" tf:"optional"` +} + +func (newState *GkeConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GkeConfig_SdkV2) { +} + +func (newState *GkeConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GkeConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GkeConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GkeConfig_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, GkeConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GkeConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connectivity_type": o.ConnectivityType, + "master_ip_range": o.MasterIpRange, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GkeConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connectivity_type": types.StringType, + "master_ip_range": types.StringType, + }, + } +} + +type Network_SdkV2 struct { + // The Databricks account ID associated with this network configuration. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Time in epoch milliseconds when the network was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // Array of error messages about the network configuration. + ErrorMessages types.List `tfsdk:"error_messages" tf:"computed"` + // The Google Cloud specific information for this network (for example, the + // VPC ID, subnet ID, and secondary IP ranges). + GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"optional,object"` + // The Databricks network configuration ID. + NetworkId types.String `tfsdk:"network_id" tf:"optional"` + // The human-readable name of the network configuration. + NetworkName types.String `tfsdk:"network_name" tf:"optional"` + + SecurityGroupIds types.List `tfsdk:"security_group_ids" tf:"optional"` + + SubnetIds types.List `tfsdk:"subnet_ids" tf:"optional"` + // If specified, contains the VPC endpoints used to allow cluster + // communication from this VPC over [AWS PrivateLink]. + // + // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ + VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + // The ID of the VPC associated with this network configuration. VPC IDs can + // be used in multiple networks. + VpcId types.String `tfsdk:"vpc_id" tf:"optional"` + // The status of this network configuration object in terms of its use in a + // workspace: * `UNATTACHED`: Unattached. * `VALID`: Valid. * `BROKEN`: + // Broken. * `WARNED`: Warned. + VpcStatus types.String `tfsdk:"vpc_status" tf:"computed"` + // Array of warning messages about the network configuration. + WarningMessages types.List `tfsdk:"warning_messages" tf:"computed"` + // Workspace ID associated with this network configuration. + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` +} + +func (newState *Network_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Network_SdkV2) { +} + +func (newState *Network_SdkV2) SyncEffectiveFieldsDuringRead(existingState Network_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Network. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Network_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "error_messages": reflect.TypeOf(NetworkHealth_SdkV2{}), + "gcp_network_info": reflect.TypeOf(GcpNetworkInfo_SdkV2{}), + "security_group_ids": reflect.TypeOf(types.String{}), + "subnet_ids": reflect.TypeOf(types.String{}), + "vpc_endpoints": reflect.TypeOf(NetworkVpcEndpoints_SdkV2{}), + "warning_messages": reflect.TypeOf(NetworkWarning_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, Network_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Network_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "creation_time": o.CreationTime, + "error_messages": o.ErrorMessages, + "gcp_network_info": o.GcpNetworkInfo, + "network_id": o.NetworkId, + "network_name": o.NetworkName, + "security_group_ids": o.SecurityGroupIds, + "subnet_ids": o.SubnetIds, + "vpc_endpoints": o.VpcEndpoints, + "vpc_id": o.VpcId, + "vpc_status": o.VpcStatus, + "warning_messages": o.WarningMessages, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Network_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "creation_time": types.Int64Type, + "error_messages": basetypes.ListType{ + ElemType: NetworkHealth{}.Type(ctx), + }, + "gcp_network_info": basetypes.ListType{ + ElemType: GcpNetworkInfo{}.Type(ctx), + }, + "network_id": types.StringType, + "network_name": types.StringType, + "security_group_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "subnet_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "vpc_endpoints": basetypes.ListType{ + ElemType: NetworkVpcEndpoints{}.Type(ctx), + }, + "vpc_id": types.StringType, + "vpc_status": types.StringType, + "warning_messages": basetypes.ListType{ + ElemType: NetworkWarning{}.Type(ctx), + }, + "workspace_id": types.Int64Type, + }, + } +} + +// GetErrorMessages returns the value of the ErrorMessages field in Network_SdkV2 as +// a slice of NetworkHealth_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetErrorMessages(ctx context.Context) ([]NetworkHealth_SdkV2, bool) { + if o.ErrorMessages.IsNull() || o.ErrorMessages.IsUnknown() { + return nil, false + } + var v []NetworkHealth_SdkV2 + d := o.ErrorMessages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetErrorMessages sets the value of the ErrorMessages field in Network_SdkV2. +func (o *Network_SdkV2) SetErrorMessages(ctx context.Context, v []NetworkHealth_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["error_messages"] + t = t.(attr.TypeWithElementType).ElementType() + o.ErrorMessages = types.ListValueMust(t, vs) +} + +// GetGcpNetworkInfo returns the value of the GcpNetworkInfo field in Network_SdkV2 as +// a GcpNetworkInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetGcpNetworkInfo(ctx context.Context) (GcpNetworkInfo_SdkV2, bool) { + var e GcpNetworkInfo_SdkV2 + if o.GcpNetworkInfo.IsNull() || o.GcpNetworkInfo.IsUnknown() { + return e, false + } + var v []GcpNetworkInfo_SdkV2 + d := o.GcpNetworkInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpNetworkInfo sets the value of the GcpNetworkInfo field in Network_SdkV2. +func (o *Network_SdkV2) SetGcpNetworkInfo(ctx context.Context, v GcpNetworkInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_network_info"] + o.GcpNetworkInfo = types.ListValueMust(t, vs) +} + +// GetSecurityGroupIds returns the value of the SecurityGroupIds field in Network_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetSecurityGroupIds(ctx context.Context) ([]types.String, bool) { + if o.SecurityGroupIds.IsNull() || o.SecurityGroupIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SecurityGroupIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSecurityGroupIds sets the value of the SecurityGroupIds field in Network_SdkV2. +func (o *Network_SdkV2) SetSecurityGroupIds(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["security_group_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.SecurityGroupIds = types.ListValueMust(t, vs) +} + +// GetSubnetIds returns the value of the SubnetIds field in Network_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetSubnetIds(ctx context.Context) ([]types.String, bool) { + if o.SubnetIds.IsNull() || o.SubnetIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.SubnetIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubnetIds sets the value of the SubnetIds field in Network_SdkV2. +func (o *Network_SdkV2) SetSubnetIds(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["subnet_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.SubnetIds = types.ListValueMust(t, vs) +} + +// GetVpcEndpoints returns the value of the VpcEndpoints field in Network_SdkV2 as +// a NetworkVpcEndpoints_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetVpcEndpoints(ctx context.Context) (NetworkVpcEndpoints_SdkV2, bool) { + var e NetworkVpcEndpoints_SdkV2 + if o.VpcEndpoints.IsNull() || o.VpcEndpoints.IsUnknown() { + return e, false + } + var v []NetworkVpcEndpoints_SdkV2 + d := o.VpcEndpoints.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVpcEndpoints sets the value of the VpcEndpoints field in Network_SdkV2. +func (o *Network_SdkV2) SetVpcEndpoints(ctx context.Context, v NetworkVpcEndpoints_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vpc_endpoints"] + o.VpcEndpoints = types.ListValueMust(t, vs) +} + +// GetWarningMessages returns the value of the WarningMessages field in Network_SdkV2 as +// a slice of NetworkWarning_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Network_SdkV2) GetWarningMessages(ctx context.Context) ([]NetworkWarning_SdkV2, bool) { + if o.WarningMessages.IsNull() || o.WarningMessages.IsUnknown() { + return nil, false + } + var v []NetworkWarning_SdkV2 + d := o.WarningMessages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWarningMessages sets the value of the WarningMessages field in Network_SdkV2. +func (o *Network_SdkV2) SetWarningMessages(ctx context.Context, v []NetworkWarning_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["warning_messages"] + t = t.(attr.TypeWithElementType).ElementType() + o.WarningMessages = types.ListValueMust(t, vs) +} + +type NetworkHealth_SdkV2 struct { + // Details of the error. + ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + // The AWS resource associated with this error: credentials, VPC, subnet, + // security group, or network ACL. + ErrorType types.String `tfsdk:"error_type" tf:"optional"` +} + +func (newState *NetworkHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkHealth_SdkV2) { +} + +func (newState *NetworkHealth_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkHealth_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkHealth. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NetworkHealth_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, NetworkHealth_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NetworkHealth_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error_message": o.ErrorMessage, + "error_type": o.ErrorType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NetworkHealth_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error_message": types.StringType, + "error_type": types.StringType, + }, + } +} + +// If specified, contains the VPC endpoints used to allow cluster communication +// from this VPC over [AWS PrivateLink]. +// +// [AWS PrivateLink]: https://aws.amazon.com/privatelink/ +type NetworkVpcEndpoints_SdkV2 struct { + // The VPC endpoint ID used by this network to access the Databricks secure + // cluster connectivity relay. + DataplaneRelay types.List `tfsdk:"dataplane_relay" tf:""` + // The VPC endpoint ID used by this network to access the Databricks REST + // API. + RestApi types.List `tfsdk:"rest_api" tf:""` +} + +func (newState *NetworkVpcEndpoints_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkVpcEndpoints_SdkV2) { +} + +func (newState *NetworkVpcEndpoints_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkVpcEndpoints_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkVpcEndpoints. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NetworkVpcEndpoints_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dataplane_relay": reflect.TypeOf(types.String{}), + "rest_api": 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, NetworkVpcEndpoints_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NetworkVpcEndpoints_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dataplane_relay": o.DataplaneRelay, + "rest_api": o.RestApi, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NetworkVpcEndpoints_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dataplane_relay": basetypes.ListType{ + ElemType: types.StringType, + }, + "rest_api": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetDataplaneRelay returns the value of the DataplaneRelay field in NetworkVpcEndpoints_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *NetworkVpcEndpoints_SdkV2) GetDataplaneRelay(ctx context.Context) ([]types.String, bool) { + if o.DataplaneRelay.IsNull() || o.DataplaneRelay.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DataplaneRelay.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataplaneRelay sets the value of the DataplaneRelay field in NetworkVpcEndpoints_SdkV2. +func (o *NetworkVpcEndpoints_SdkV2) SetDataplaneRelay(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["dataplane_relay"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataplaneRelay = types.ListValueMust(t, vs) +} + +// GetRestApi returns the value of the RestApi field in NetworkVpcEndpoints_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *NetworkVpcEndpoints_SdkV2) GetRestApi(ctx context.Context) ([]types.String, bool) { + if o.RestApi.IsNull() || o.RestApi.IsUnknown() { + return nil, false + } + var v []types.String + d := o.RestApi.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRestApi sets the value of the RestApi field in NetworkVpcEndpoints_SdkV2. +func (o *NetworkVpcEndpoints_SdkV2) SetRestApi(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["rest_api"] + t = t.(attr.TypeWithElementType).ElementType() + o.RestApi = types.ListValueMust(t, vs) +} + +type NetworkWarning_SdkV2 struct { + // Details of the warning. + WarningMessage types.String `tfsdk:"warning_message" tf:"optional"` + // The AWS resource associated with this warning: a subnet or a security + // group. + WarningType types.String `tfsdk:"warning_type" tf:"optional"` +} + +func (newState *NetworkWarning_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkWarning_SdkV2) { +} + +func (newState *NetworkWarning_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkWarning_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkWarning. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NetworkWarning_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, NetworkWarning_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NetworkWarning_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "warning_message": o.WarningMessage, + "warning_type": o.WarningType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NetworkWarning_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "warning_message": types.StringType, + "warning_type": types.StringType, + }, + } +} + +type PrivateAccessSettings_SdkV2 struct { + // The Databricks account ID that hosts the credential. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // An array of Databricks VPC endpoint IDs. + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + // The private access level controls which VPC endpoints can connect to the + // UI or API of any workspace that attaches this private access settings + // object. * `ACCOUNT` level access (the default) allows only VPC endpoints + // that are registered in your Databricks account connect to your workspace. + // * `ENDPOINT` level access allows only specified VPC endpoints connect to + // your workspace. For details, see `allowed_vpc_endpoint_ids`. + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + // Databricks private access settings ID. + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + // The human-readable name of the private access settings object. + PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:"optional"` + // Determines if the workspace can be accessed over public internet. For + // fully private workspaces, you can optionally specify `false`, but only if + // you implement both the front-end and the back-end PrivateLink + // connections. Otherwise, specify `true`, which means that public access is + // enabled. + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + // The cloud region for workspaces attached to this private access settings + // object. + Region types.String `tfsdk:"region" tf:"optional"` +} + +func (newState *PrivateAccessSettings_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivateAccessSettings_SdkV2) { +} + +func (newState *PrivateAccessSettings_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivateAccessSettings_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivateAccessSettings. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PrivateAccessSettings_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_vpc_endpoint_ids": 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, PrivateAccessSettings_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PrivateAccessSettings_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "allowed_vpc_endpoint_ids": o.AllowedVpcEndpointIds, + "private_access_level": o.PrivateAccessLevel, + "private_access_settings_id": o.PrivateAccessSettingsId, + "private_access_settings_name": o.PrivateAccessSettingsName, + "public_access_enabled": o.PublicAccessEnabled, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PrivateAccessSettings_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "allowed_vpc_endpoint_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "private_access_level": types.StringType, + "private_access_settings_id": types.StringType, + "private_access_settings_name": types.StringType, + "public_access_enabled": types.BoolType, + "region": types.StringType, + }, + } +} + +// GetAllowedVpcEndpointIds returns the value of the AllowedVpcEndpointIds field in PrivateAccessSettings_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PrivateAccessSettings_SdkV2) GetAllowedVpcEndpointIds(ctx context.Context) ([]types.String, bool) { + if o.AllowedVpcEndpointIds.IsNull() || o.AllowedVpcEndpointIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedVpcEndpointIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedVpcEndpointIds sets the value of the AllowedVpcEndpointIds field in PrivateAccessSettings_SdkV2. +func (o *PrivateAccessSettings_SdkV2) SetAllowedVpcEndpointIds(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_vpc_endpoint_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedVpcEndpointIds = types.ListValueMust(t, vs) +} + +type ReplaceResponse_SdkV2 struct { +} + +func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse_SdkV2) { +} + +func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReplaceResponse_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, ReplaceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReplaceResponse_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 ReplaceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Root S3 bucket information. +type RootBucketInfo_SdkV2 struct { + // The name of the S3 bucket. + BucketName types.String `tfsdk:"bucket_name" tf:"optional"` +} + +func (newState *RootBucketInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RootBucketInfo_SdkV2) { +} + +func (newState *RootBucketInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RootBucketInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RootBucketInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RootBucketInfo_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, RootBucketInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RootBucketInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bucket_name": o.BucketName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RootBucketInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bucket_name": types.StringType, + }, + } +} + +type StorageConfiguration_SdkV2 struct { + // The Databricks account ID that hosts the credential. + AccountId types.String `tfsdk:"account_id" tf:"computed"` + // Time in epoch milliseconds when the storage configuration was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // Root S3 bucket information. + RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"optional,object"` + // Databricks storage configuration ID. + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + // The human-readable name of the storage configuration. + StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:"optional"` +} + +func (newState *StorageConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StorageConfiguration_SdkV2) { +} + +func (newState *StorageConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState StorageConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StorageConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StorageConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "root_bucket_info": reflect.TypeOf(RootBucketInfo_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, StorageConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StorageConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "creation_time": o.CreationTime, + "root_bucket_info": o.RootBucketInfo, + "storage_configuration_id": o.StorageConfigurationId, + "storage_configuration_name": o.StorageConfigurationName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StorageConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "creation_time": types.Int64Type, + "root_bucket_info": basetypes.ListType{ + ElemType: RootBucketInfo{}.Type(ctx), + }, + "storage_configuration_id": types.StringType, + "storage_configuration_name": types.StringType, + }, + } +} + +// GetRootBucketInfo returns the value of the RootBucketInfo field in StorageConfiguration_SdkV2 as +// a RootBucketInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StorageConfiguration_SdkV2) GetRootBucketInfo(ctx context.Context) (RootBucketInfo_SdkV2, bool) { + var e RootBucketInfo_SdkV2 + if o.RootBucketInfo.IsNull() || o.RootBucketInfo.IsUnknown() { + return e, false + } + var v []RootBucketInfo_SdkV2 + d := o.RootBucketInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRootBucketInfo sets the value of the RootBucketInfo field in StorageConfiguration_SdkV2. +func (o *StorageConfiguration_SdkV2) SetRootBucketInfo(ctx context.Context, v RootBucketInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["root_bucket_info"] + o.RootBucketInfo = types.ListValueMust(t, vs) +} + +type StsRole_SdkV2 struct { + // The external ID that needs to be trusted by the cross-account role. This + // is always your Databricks account ID. + ExternalId types.String `tfsdk:"external_id" tf:"optional"` + // The Amazon Resource Name (ARN) of the cross account role. + RoleArn types.String `tfsdk:"role_arn" tf:"optional"` +} + +func (newState *StsRole_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StsRole_SdkV2) { +} + +func (newState *StsRole_SdkV2) SyncEffectiveFieldsDuringRead(existingState StsRole_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StsRole. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StsRole_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, StsRole_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StsRole_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StsRole_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "external_id": types.StringType, + "role_arn": types.StringType, + }, + } +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateWorkspaceRequest_SdkV2 struct { + // The AWS region of the workspace's data plane (for example, `us-west-2`). + // This parameter is available only for updating failed workspaces. + AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + // ID of the workspace's credential configuration object. This parameter is + // available for updating both failed and running workspaces. + CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + // The custom tags key-value pairing that is attached to this workspace. The + // key-value pair is a string of utf-8 characters. The value can be an empty + // string, with maximum length of 255 characters. The key can be of maximum + // length of 127 characters, and cannot be empty. + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // The ID of the workspace's managed services encryption key configuration + // object. This parameter is available only for updating failed workspaces. + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + // The ID of the workspace's network configuration object. Used only if you + // already use a customer-managed VPC. For failed workspaces only, you can + // switch from a Databricks-managed VPC to a customer-managed VPC by + // updating the workspace to add a network configuration ID. + NetworkId types.String `tfsdk:"network_id" tf:"optional"` + // The ID of the workspace's private access settings configuration object. + // This parameter is available only for updating failed workspaces. + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + // The ID of the workspace's storage configuration object. This parameter is + // available only for updating failed workspaces. + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + // The ID of the key configuration object for workspace storage. This + // parameter is available for updating both failed and running workspaces. + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + // Workspace ID. + WorkspaceId types.Int64 `tfsdk:"-"` +} + +func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateWorkspaceRequest_SdkV2) { +} + +func (newState *UpdateWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateWorkspaceRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateWorkspaceRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_tags": 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, UpdateWorkspaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_region": o.AwsRegion, + "credentials_id": o.CredentialsId, + "custom_tags": o.CustomTags, + "managed_services_customer_managed_key_id": o.ManagedServicesCustomerManagedKeyId, + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "network_id": o.NetworkId, + "private_access_settings_id": o.PrivateAccessSettingsId, + "storage_configuration_id": o.StorageConfigurationId, + "storage_customer_managed_key_id": o.StorageCustomerManagedKeyId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_region": types.StringType, + "credentials_id": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "managed_services_customer_managed_key_id": types.StringType, + "network_connectivity_config_id": types.StringType, + "network_id": types.StringType, + "private_access_settings_id": types.StringType, + "storage_configuration_id": types.StringType, + "storage_customer_managed_key_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +// GetCustomTags returns the value of the CustomTags field in UpdateWorkspaceRequest_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 *UpdateWorkspaceRequest_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in UpdateWorkspaceRequest_SdkV2. +func (o *UpdateWorkspaceRequest_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +type UpsertPrivateAccessSettingsRequest_SdkV2 struct { + // An array of Databricks VPC endpoint IDs. This is the Databricks ID that + // is returned when registering the VPC endpoint configuration in your + // Databricks account. This is not the ID of the VPC endpoint in AWS. + // + // Only used when `private_access_level` is set to `ENDPOINT`. This is an + // allow list of VPC endpoints that in your account that can connect to your + // workspace over AWS PrivateLink. + // + // If hybrid access to your workspace is enabled by setting + // `public_access_enabled` to `true`, this control only works for + // PrivateLink connections. To control how your workspace is accessed via + // public internet, see [IP access lists]. + // + // [IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html + AllowedVpcEndpointIds types.List `tfsdk:"allowed_vpc_endpoint_ids" tf:"optional"` + // The private access level controls which VPC endpoints can connect to the + // UI or API of any workspace that attaches this private access settings + // object. * `ACCOUNT` level access (the default) allows only VPC endpoints + // that are registered in your Databricks account connect to your workspace. + // * `ENDPOINT` level access allows only specified VPC endpoints connect to + // your workspace. For details, see `allowed_vpc_endpoint_ids`. + PrivateAccessLevel types.String `tfsdk:"private_access_level" tf:"optional"` + // Databricks Account API private access settings ID. + PrivateAccessSettingsId types.String `tfsdk:"-"` + // The human-readable name of the private access settings object. + PrivateAccessSettingsName types.String `tfsdk:"private_access_settings_name" tf:""` + // Determines if the workspace can be accessed over public internet. For + // fully private workspaces, you can optionally specify `false`, but only if + // you implement both the front-end and the back-end PrivateLink + // connections. Otherwise, specify `true`, which means that public access is + // enabled. + PublicAccessEnabled types.Bool `tfsdk:"public_access_enabled" tf:"optional"` + // The cloud region for workspaces associated with this private access + // settings object. + Region types.String `tfsdk:"region" tf:""` +} + +func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertPrivateAccessSettingsRequest_SdkV2) { +} + +func (newState *UpsertPrivateAccessSettingsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertPrivateAccessSettingsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpsertPrivateAccessSettingsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_vpc_endpoint_ids": 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, UpsertPrivateAccessSettingsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpsertPrivateAccessSettingsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_vpc_endpoint_ids": o.AllowedVpcEndpointIds, + "private_access_level": o.PrivateAccessLevel, + "private_access_settings_id": o.PrivateAccessSettingsId, + "private_access_settings_name": o.PrivateAccessSettingsName, + "public_access_enabled": o.PublicAccessEnabled, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpsertPrivateAccessSettingsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_vpc_endpoint_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "private_access_level": types.StringType, + "private_access_settings_id": types.StringType, + "private_access_settings_name": types.StringType, + "public_access_enabled": types.BoolType, + "region": types.StringType, + }, + } +} + +// GetAllowedVpcEndpointIds returns the value of the AllowedVpcEndpointIds field in UpsertPrivateAccessSettingsRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpsertPrivateAccessSettingsRequest_SdkV2) GetAllowedVpcEndpointIds(ctx context.Context) ([]types.String, bool) { + if o.AllowedVpcEndpointIds.IsNull() || o.AllowedVpcEndpointIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedVpcEndpointIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedVpcEndpointIds sets the value of the AllowedVpcEndpointIds field in UpsertPrivateAccessSettingsRequest_SdkV2. +func (o *UpsertPrivateAccessSettingsRequest_SdkV2) SetAllowedVpcEndpointIds(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_vpc_endpoint_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedVpcEndpointIds = types.ListValueMust(t, vs) +} + +type VpcEndpoint_SdkV2 struct { + // The Databricks account ID that hosts the VPC endpoint configuration. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // The AWS Account in which the VPC endpoint object exists. + AwsAccountId types.String `tfsdk:"aws_account_id" tf:"optional"` + // The ID of the Databricks [endpoint service] that this VPC endpoint is + // connected to. For a list of endpoint service IDs for each supported AWS + // region, see the [Databricks PrivateLink documentation]. + // + // [Databricks PrivateLink documentation]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html + // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html + AwsEndpointServiceId types.String `tfsdk:"aws_endpoint_service_id" tf:"optional"` + // The ID of the VPC endpoint object in AWS. + AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` + // The Google Cloud specific information for this Private Service Connect + // endpoint. + GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + // The AWS region in which this VPC endpoint object exists. + Region types.String `tfsdk:"region" tf:"optional"` + // The current state (such as `available` or `rejected`) of the VPC + // endpoint. Derived from AWS. For the full set of values, see [AWS + // DescribeVpcEndpoint documentation]. + // + // [AWS DescribeVpcEndpoint documentation]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html + State types.String `tfsdk:"state" tf:"optional"` + // This enumeration represents the type of Databricks VPC [endpoint service] + // that was used when creating this VPC endpoint. + // + // [endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html + UseCase types.String `tfsdk:"use_case" tf:"optional"` + // Databricks VPC endpoint ID. This is the Databricks-specific name of the + // VPC endpoint. Do not confuse this with the `aws_vpc_endpoint_id`, which + // is the ID within AWS of the VPC endpoint. + VpcEndpointId types.String `tfsdk:"vpc_endpoint_id" tf:"optional"` + // The human-readable name of the storage configuration. + VpcEndpointName types.String `tfsdk:"vpc_endpoint_name" tf:"optional"` +} + +func (newState *VpcEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VpcEndpoint_SdkV2) { +} + +func (newState *VpcEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState VpcEndpoint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in VpcEndpoint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a VpcEndpoint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "gcp_vpc_endpoint_info": reflect.TypeOf(GcpVpcEndpointInfo_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, VpcEndpoint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o VpcEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "aws_account_id": o.AwsAccountId, + "aws_endpoint_service_id": o.AwsEndpointServiceId, + "aws_vpc_endpoint_id": o.AwsVpcEndpointId, + "gcp_vpc_endpoint_info": o.GcpVpcEndpointInfo, + "region": o.Region, + "state": o.State, + "use_case": o.UseCase, + "vpc_endpoint_id": o.VpcEndpointId, + "vpc_endpoint_name": o.VpcEndpointName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o VpcEndpoint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "aws_account_id": types.StringType, + "aws_endpoint_service_id": types.StringType, + "aws_vpc_endpoint_id": types.StringType, + "gcp_vpc_endpoint_info": basetypes.ListType{ + ElemType: GcpVpcEndpointInfo{}.Type(ctx), + }, + "region": types.StringType, + "state": types.StringType, + "use_case": types.StringType, + "vpc_endpoint_id": types.StringType, + "vpc_endpoint_name": types.StringType, + }, + } +} + +// GetGcpVpcEndpointInfo returns the value of the GcpVpcEndpointInfo field in VpcEndpoint_SdkV2 as +// a GcpVpcEndpointInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *VpcEndpoint_SdkV2) GetGcpVpcEndpointInfo(ctx context.Context) (GcpVpcEndpointInfo_SdkV2, bool) { + var e GcpVpcEndpointInfo_SdkV2 + if o.GcpVpcEndpointInfo.IsNull() || o.GcpVpcEndpointInfo.IsUnknown() { + return e, false + } + var v []GcpVpcEndpointInfo_SdkV2 + d := o.GcpVpcEndpointInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpVpcEndpointInfo sets the value of the GcpVpcEndpointInfo field in VpcEndpoint_SdkV2. +func (o *VpcEndpoint_SdkV2) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcEndpointInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_vpc_endpoint_info"] + o.GcpVpcEndpointInfo = types.ListValueMust(t, vs) +} + +type Workspace_SdkV2 struct { + // Databricks account ID. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // The AWS region of the workspace data plane (for example, `us-west-2`). + AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` + + AzureWorkspaceInfo types.List `tfsdk:"azure_workspace_info" tf:"optional,object"` + // The cloud name. This field always has the value `gcp`. + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // The general workspace configurations that are specific to cloud + // providers. + CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + // Time in epoch milliseconds when the workspace was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // ID of the workspace's credential configuration object. + CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` + // The custom tags key-value pairing that is attached to this workspace. The + // key-value pair is a string of utf-8 characters. The value can be an empty + // string, with maximum length of 255 characters. The key can be of maximum + // length of 127 characters, and cannot be empty. + CustomTags types.Map `tfsdk:"custom_tags" tf:"optional"` + // The deployment name defines part of the subdomain for the workspace. The + // workspace URL for web application and REST APIs is + // `.cloud.databricks.com`. + // + // This value must be unique across all non-deleted deployments across all + // AWS regions. + DeploymentName types.String `tfsdk:"deployment_name" tf:"optional"` + // If this workspace is for a external customer, then external_customer_info + // is populated. If this workspace is not for a external customer, then + // external_customer_info is empty. + ExternalCustomerInfo types.List `tfsdk:"external_customer_info" tf:"optional,object"` + // 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" tf:"optional,object"` + // The configurations for the GKE cluster of a Databricks workspace. + GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + // Whether no public IP is enabled for the workspace. + IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` + // The Google Cloud region of the workspace data plane in your Google + // account (for example, `us-east4`). + Location types.String `tfsdk:"location" tf:"optional"` + // ID of the key configuration for encrypting managed services. + ManagedServicesCustomerManagedKeyId types.String `tfsdk:"managed_services_customer_managed_key_id" tf:"optional"` + // The network configuration ID that is attached to the workspace. This + // field is available only if the network is a customer-managed network. + NetworkId types.String `tfsdk:"network_id" tf:"optional"` + // The pricing tier of the workspace. For pricing tier information, see [AWS + // Pricing]. + // + // [AWS Pricing]: https://databricks.com/product/aws-pricing + PricingTier types.String `tfsdk:"pricing_tier" tf:"optional"` + // ID of the workspace's private access settings object. Only used for + // PrivateLink. You must specify this ID if you are using [AWS PrivateLink] + // for either front-end (user-to-workspace connection), back-end (data plane + // to control plane connection), or both connection types. + // + // Before configuring PrivateLink, read the [Databricks article about + // PrivateLink].", + // + // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ + // [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html + PrivateAccessSettingsId types.String `tfsdk:"private_access_settings_id" tf:"optional"` + // ID of the workspace's storage configuration object. + StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` + // ID of the key configuration for encrypting workspace storage. + StorageCustomerManagedKeyId types.String `tfsdk:"storage_customer_managed_key_id" tf:"optional"` + // A unique integer ID for the workspace + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` + // The human-readable name of the workspace. + WorkspaceName types.String `tfsdk:"workspace_name" tf:"optional"` + // The status of the workspace. For workspace creation, usually it is set to + // `PROVISIONING` initially. Continue to check the status until the status + // is `RUNNING`. + WorkspaceStatus types.String `tfsdk:"workspace_status" tf:"computed"` + // Message describing the current workspace status. + WorkspaceStatusMessage types.String `tfsdk:"workspace_status_message" tf:"computed"` +} + +func (newState *Workspace_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Workspace_SdkV2) { +} + +func (newState *Workspace_SdkV2) SyncEffectiveFieldsDuringRead(existingState Workspace_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Workspace. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Workspace_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "azure_workspace_info": reflect.TypeOf(AzureWorkspaceInfo_SdkV2{}), + "cloud_resource_container": reflect.TypeOf(CloudResourceContainer_SdkV2{}), + "custom_tags": reflect.TypeOf(types.String{}), + "external_customer_info": reflect.TypeOf(ExternalCustomerInfo_SdkV2{}), + "gcp_managed_network_config": reflect.TypeOf(GcpManagedNetworkConfig_SdkV2{}), + "gke_config": reflect.TypeOf(GkeConfig_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, Workspace_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Workspace_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "aws_region": o.AwsRegion, + "azure_workspace_info": o.AzureWorkspaceInfo, + "cloud": o.Cloud, + "cloud_resource_container": o.CloudResourceContainer, + "creation_time": o.CreationTime, + "credentials_id": o.CredentialsId, + "custom_tags": o.CustomTags, + "deployment_name": o.DeploymentName, + "external_customer_info": o.ExternalCustomerInfo, + "gcp_managed_network_config": o.GcpManagedNetworkConfig, + "gke_config": o.GkeConfig, + "is_no_public_ip_enabled": o.IsNoPublicIpEnabled, + "location": o.Location, + "managed_services_customer_managed_key_id": o.ManagedServicesCustomerManagedKeyId, + "network_id": o.NetworkId, + "pricing_tier": o.PricingTier, + "private_access_settings_id": o.PrivateAccessSettingsId, + "storage_configuration_id": o.StorageConfigurationId, + "storage_customer_managed_key_id": o.StorageCustomerManagedKeyId, + "workspace_id": o.WorkspaceId, + "workspace_name": o.WorkspaceName, + "workspace_status": o.WorkspaceStatus, + "workspace_status_message": o.WorkspaceStatusMessage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Workspace_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "aws_region": types.StringType, + "azure_workspace_info": basetypes.ListType{ + ElemType: AzureWorkspaceInfo{}.Type(ctx), + }, + "cloud": types.StringType, + "cloud_resource_container": basetypes.ListType{ + ElemType: CloudResourceContainer{}.Type(ctx), + }, + "creation_time": types.Int64Type, + "credentials_id": types.StringType, + "custom_tags": basetypes.MapType{ + ElemType: types.StringType, + }, + "deployment_name": types.StringType, + "external_customer_info": basetypes.ListType{ + ElemType: ExternalCustomerInfo{}.Type(ctx), + }, + "gcp_managed_network_config": basetypes.ListType{ + ElemType: GcpManagedNetworkConfig{}.Type(ctx), + }, + "gke_config": basetypes.ListType{ + ElemType: GkeConfig{}.Type(ctx), + }, + "is_no_public_ip_enabled": types.BoolType, + "location": types.StringType, + "managed_services_customer_managed_key_id": types.StringType, + "network_id": types.StringType, + "pricing_tier": types.StringType, + "private_access_settings_id": types.StringType, + "storage_configuration_id": types.StringType, + "storage_customer_managed_key_id": types.StringType, + "workspace_id": types.Int64Type, + "workspace_name": types.StringType, + "workspace_status": types.StringType, + "workspace_status_message": types.StringType, + }, + } +} + +// GetAzureWorkspaceInfo returns the value of the AzureWorkspaceInfo field in Workspace_SdkV2 as +// a AzureWorkspaceInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Workspace_SdkV2) GetAzureWorkspaceInfo(ctx context.Context) (AzureWorkspaceInfo_SdkV2, bool) { + var e AzureWorkspaceInfo_SdkV2 + if o.AzureWorkspaceInfo.IsNull() || o.AzureWorkspaceInfo.IsUnknown() { + return e, false + } + var v []AzureWorkspaceInfo_SdkV2 + d := o.AzureWorkspaceInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureWorkspaceInfo sets the value of the AzureWorkspaceInfo field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetAzureWorkspaceInfo(ctx context.Context, v AzureWorkspaceInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_workspace_info"] + o.AzureWorkspaceInfo = types.ListValueMust(t, vs) +} + +// GetCloudResourceContainer returns the value of the CloudResourceContainer field in Workspace_SdkV2 as +// a CloudResourceContainer_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Workspace_SdkV2) GetCloudResourceContainer(ctx context.Context) (CloudResourceContainer_SdkV2, bool) { + var e CloudResourceContainer_SdkV2 + if o.CloudResourceContainer.IsNull() || o.CloudResourceContainer.IsUnknown() { + return e, false + } + var v []CloudResourceContainer_SdkV2 + d := o.CloudResourceContainer.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCloudResourceContainer sets the value of the CloudResourceContainer field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetCloudResourceContainer(ctx context.Context, v CloudResourceContainer_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloud_resource_container"] + o.CloudResourceContainer = types.ListValueMust(t, vs) +} + +// GetCustomTags returns the value of the CustomTags field in Workspace_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 *Workspace_SdkV2) GetCustomTags(ctx context.Context) (map[string]types.String, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetCustomTags(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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.MapValueMust(t, vs) +} + +// GetExternalCustomerInfo returns the value of the ExternalCustomerInfo field in Workspace_SdkV2 as +// a ExternalCustomerInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Workspace_SdkV2) GetExternalCustomerInfo(ctx context.Context) (ExternalCustomerInfo_SdkV2, bool) { + var e ExternalCustomerInfo_SdkV2 + if o.ExternalCustomerInfo.IsNull() || o.ExternalCustomerInfo.IsUnknown() { + return e, false + } + var v []ExternalCustomerInfo_SdkV2 + d := o.ExternalCustomerInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalCustomerInfo sets the value of the ExternalCustomerInfo field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetExternalCustomerInfo(ctx context.Context, v ExternalCustomerInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_customer_info"] + o.ExternalCustomerInfo = types.ListValueMust(t, vs) +} + +// GetGcpManagedNetworkConfig returns the value of the GcpManagedNetworkConfig field in Workspace_SdkV2 as +// a GcpManagedNetworkConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Workspace_SdkV2) GetGcpManagedNetworkConfig(ctx context.Context) (GcpManagedNetworkConfig_SdkV2, bool) { + var e GcpManagedNetworkConfig_SdkV2 + if o.GcpManagedNetworkConfig.IsNull() || o.GcpManagedNetworkConfig.IsUnknown() { + return e, false + } + var v []GcpManagedNetworkConfig_SdkV2 + d := o.GcpManagedNetworkConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGcpManagedNetworkConfig sets the value of the GcpManagedNetworkConfig field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetGcpManagedNetworkConfig(ctx context.Context, v GcpManagedNetworkConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_managed_network_config"] + o.GcpManagedNetworkConfig = types.ListValueMust(t, vs) +} + +// GetGkeConfig returns the value of the GkeConfig field in Workspace_SdkV2 as +// a GkeConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Workspace_SdkV2) GetGkeConfig(ctx context.Context) (GkeConfig_SdkV2, bool) { + var e GkeConfig_SdkV2 + if o.GkeConfig.IsNull() || o.GkeConfig.IsUnknown() { + return e, false + } + var v []GkeConfig_SdkV2 + d := o.GkeConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGkeConfig sets the value of the GkeConfig field in Workspace_SdkV2. +func (o *Workspace_SdkV2) SetGkeConfig(ctx context.Context, v GkeConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gke_config"] + o.GkeConfig = types.ListValueMust(t, vs) +} diff --git a/internal/service/provisioning_tf/model.go b/internal/service/provisioning_tf/model.go index 88a788e44..2f59ce068 100755 --- a/internal/service/provisioning_tf/model.go +++ b/internal/service/provisioning_tf/model.go @@ -22,7 +22,7 @@ import ( ) type AwsCredentials struct { - StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.Object `tfsdk:"sts_role" tf:"optional,object"` } func (newState *AwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan AwsCredentials) { @@ -59,9 +59,7 @@ func (o AwsCredentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o AwsCredentials) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "sts_role": basetypes.ListType{ - ElemType: StsRole{}.Type(ctx), - }, + "sts_role": StsRole{}.Type(ctx), }, } } @@ -75,7 +73,10 @@ func (o *AwsCredentials) GetStsRole(ctx context.Context) (StsRole, bool) { return e, false } var v []StsRole - d := o.StsRole.ElementsAs(ctx, &v, true) + d := o.StsRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -87,9 +88,8 @@ func (o *AwsCredentials) GetStsRole(ctx context.Context) (StsRole, bool) { // SetStsRole sets the value of the StsRole field in AwsCredentials. func (o *AwsCredentials) SetStsRole(ctx context.Context, v StsRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sts_role"] - o.StsRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.StsRole = vs } type AwsKeyInfo struct { @@ -198,7 +198,7 @@ func (o AzureWorkspaceInfo) Type(ctx context.Context) attr.Type { // The general workspace configurations that are specific to cloud providers. type CloudResourceContainer struct { // The general workspace configurations that are specific to Google Cloud. - Gcp types.List `tfsdk:"gcp" tf:"optional,object"` + Gcp types.Object `tfsdk:"gcp" tf:"optional,object"` } func (newState *CloudResourceContainer) SyncEffectiveFieldsDuringCreateOrUpdate(plan CloudResourceContainer) { @@ -235,9 +235,7 @@ func (o CloudResourceContainer) ToObjectValue(ctx context.Context) basetypes.Obj func (o CloudResourceContainer) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "gcp": basetypes.ListType{ - ElemType: CustomerFacingGcpCloudResourceContainer{}.Type(ctx), - }, + "gcp": CustomerFacingGcpCloudResourceContainer{}.Type(ctx), }, } } @@ -251,7 +249,10 @@ func (o *CloudResourceContainer) GetGcp(ctx context.Context) (CustomerFacingGcpC return e, false } var v []CustomerFacingGcpCloudResourceContainer - d := o.Gcp.ElementsAs(ctx, &v, true) + d := o.Gcp.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -263,9 +264,8 @@ func (o *CloudResourceContainer) GetGcp(ctx context.Context) (CustomerFacingGcpC // SetGcp sets the value of the Gcp field in CloudResourceContainer. func (o *CloudResourceContainer) SetGcp(ctx context.Context, v CustomerFacingGcpCloudResourceContainer) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp"] - o.Gcp = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Gcp = vs } type CreateAwsKeyInfo struct { @@ -323,7 +323,7 @@ func (o CreateAwsKeyInfo) Type(ctx context.Context) attr.Type { } type CreateCredentialAwsCredentials struct { - StsRole types.List `tfsdk:"sts_role" tf:"optional,object"` + StsRole types.Object `tfsdk:"sts_role" tf:"optional,object"` } func (newState *CreateCredentialAwsCredentials) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialAwsCredentials) { @@ -360,9 +360,7 @@ func (o CreateCredentialAwsCredentials) ToObjectValue(ctx context.Context) baset func (o CreateCredentialAwsCredentials) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "sts_role": basetypes.ListType{ - ElemType: CreateCredentialStsRole{}.Type(ctx), - }, + "sts_role": CreateCredentialStsRole{}.Type(ctx), }, } } @@ -376,7 +374,10 @@ func (o *CreateCredentialAwsCredentials) GetStsRole(ctx context.Context) (Create return e, false } var v []CreateCredentialStsRole - d := o.StsRole.ElementsAs(ctx, &v, true) + d := o.StsRole.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -388,13 +389,12 @@ func (o *CreateCredentialAwsCredentials) GetStsRole(ctx context.Context) (Create // SetStsRole sets the value of the StsRole field in CreateCredentialAwsCredentials. func (o *CreateCredentialAwsCredentials) SetStsRole(ctx context.Context, v CreateCredentialStsRole) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sts_role"] - o.StsRole = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.StsRole = vs } type CreateCredentialRequest struct { - AwsCredentials types.List `tfsdk:"aws_credentials" tf:"object"` + AwsCredentials types.Object `tfsdk:"aws_credentials" tf:"object"` // The human-readable name of the credential configuration object. CredentialsName types.String `tfsdk:"credentials_name" tf:""` } @@ -434,9 +434,7 @@ func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.Ob func (o CreateCredentialRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_credentials": basetypes.ListType{ - ElemType: CreateCredentialAwsCredentials{}.Type(ctx), - }, + "aws_credentials": CreateCredentialAwsCredentials{}.Type(ctx), "credentials_name": types.StringType, }, } @@ -451,7 +449,10 @@ func (o *CreateCredentialRequest) GetAwsCredentials(ctx context.Context) (Create return e, false } var v []CreateCredentialAwsCredentials - d := o.AwsCredentials.ElementsAs(ctx, &v, true) + d := o.AwsCredentials.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -463,9 +464,8 @@ func (o *CreateCredentialRequest) GetAwsCredentials(ctx context.Context) (Create // SetAwsCredentials sets the value of the AwsCredentials field in CreateCredentialRequest. func (o *CreateCredentialRequest) SetAwsCredentials(ctx context.Context, v CreateCredentialAwsCredentials) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_credentials"] - o.AwsCredentials = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsCredentials = vs } type CreateCredentialStsRole struct { @@ -511,9 +511,9 @@ func (o CreateCredentialStsRole) Type(ctx context.Context) attr.Type { } type CreateCustomerManagedKeyRequest struct { - AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"optional,object"` - GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"optional,object"` // The cases that the key can be used for. UseCases types.List `tfsdk:"use_cases" tf:""` } @@ -556,12 +556,8 @@ func (o CreateCustomerManagedKeyRequest) ToObjectValue(ctx context.Context) base func (o CreateCustomerManagedKeyRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_key_info": basetypes.ListType{ - ElemType: CreateAwsKeyInfo{}.Type(ctx), - }, - "gcp_key_info": basetypes.ListType{ - ElemType: CreateGcpKeyInfo{}.Type(ctx), - }, + "aws_key_info": CreateAwsKeyInfo{}.Type(ctx), + "gcp_key_info": CreateGcpKeyInfo{}.Type(ctx), "use_cases": basetypes.ListType{ ElemType: types.StringType, }, @@ -578,7 +574,10 @@ func (o *CreateCustomerManagedKeyRequest) GetAwsKeyInfo(ctx context.Context) (Cr return e, false } var v []CreateAwsKeyInfo - d := o.AwsKeyInfo.ElementsAs(ctx, &v, true) + d := o.AwsKeyInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -590,9 +589,8 @@ func (o *CreateCustomerManagedKeyRequest) GetAwsKeyInfo(ctx context.Context) (Cr // SetAwsKeyInfo sets the value of the AwsKeyInfo field in CreateCustomerManagedKeyRequest. func (o *CreateCustomerManagedKeyRequest) SetAwsKeyInfo(ctx context.Context, v CreateAwsKeyInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_key_info"] - o.AwsKeyInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsKeyInfo = vs } // GetGcpKeyInfo returns the value of the GcpKeyInfo field in CreateCustomerManagedKeyRequest as @@ -604,7 +602,10 @@ func (o *CreateCustomerManagedKeyRequest) GetGcpKeyInfo(ctx context.Context) (Cr return e, false } var v []CreateGcpKeyInfo - d := o.GcpKeyInfo.ElementsAs(ctx, &v, true) + d := o.GcpKeyInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -616,9 +617,8 @@ func (o *CreateCustomerManagedKeyRequest) GetGcpKeyInfo(ctx context.Context) (Cr // SetGcpKeyInfo sets the value of the GcpKeyInfo field in CreateCustomerManagedKeyRequest. func (o *CreateCustomerManagedKeyRequest) SetGcpKeyInfo(ctx context.Context, v CreateGcpKeyInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_key_info"] - o.GcpKeyInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpKeyInfo = vs } // GetUseCases returns the value of the UseCases field in CreateCustomerManagedKeyRequest as @@ -692,7 +692,7 @@ 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.List `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"optional,object"` // The human-readable name of the network configuration. NetworkName types.String `tfsdk:"network_name" tf:""` // IDs of one to five security groups associated with this network. Security @@ -705,7 +705,7 @@ type CreateNetworkRequest struct { // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"optional,object"` // The ID of the VPC associated with this network. VPC IDs can be used in // multiple network configurations. VpcId types.String `tfsdk:"vpc_id" tf:"optional"` @@ -753,20 +753,16 @@ func (o CreateNetworkRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o CreateNetworkRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "gcp_network_info": basetypes.ListType{ - ElemType: GcpNetworkInfo{}.Type(ctx), - }, - "network_name": types.StringType, + "gcp_network_info": GcpNetworkInfo{}.Type(ctx), + "network_name": types.StringType, "security_group_ids": basetypes.ListType{ ElemType: types.StringType, }, "subnet_ids": basetypes.ListType{ ElemType: types.StringType, }, - "vpc_endpoints": basetypes.ListType{ - ElemType: NetworkVpcEndpoints{}.Type(ctx), - }, - "vpc_id": types.StringType, + "vpc_endpoints": NetworkVpcEndpoints{}.Type(ctx), + "vpc_id": types.StringType, }, } } @@ -780,7 +776,10 @@ func (o *CreateNetworkRequest) GetGcpNetworkInfo(ctx context.Context) (GcpNetwor return e, false } var v []GcpNetworkInfo - d := o.GcpNetworkInfo.ElementsAs(ctx, &v, true) + d := o.GcpNetworkInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -792,9 +791,8 @@ func (o *CreateNetworkRequest) GetGcpNetworkInfo(ctx context.Context) (GcpNetwor // SetGcpNetworkInfo sets the value of the GcpNetworkInfo field in CreateNetworkRequest. func (o *CreateNetworkRequest) SetGcpNetworkInfo(ctx context.Context, v GcpNetworkInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_network_info"] - o.GcpNetworkInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpNetworkInfo = vs } // GetSecurityGroupIds returns the value of the SecurityGroupIds field in CreateNetworkRequest as @@ -858,7 +856,10 @@ func (o *CreateNetworkRequest) GetVpcEndpoints(ctx context.Context) (NetworkVpcE return e, false } var v []NetworkVpcEndpoints - d := o.VpcEndpoints.ElementsAs(ctx, &v, true) + d := o.VpcEndpoints.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -870,14 +871,13 @@ func (o *CreateNetworkRequest) GetVpcEndpoints(ctx context.Context) (NetworkVpcE // SetVpcEndpoints sets the value of the VpcEndpoints field in CreateNetworkRequest. func (o *CreateNetworkRequest) SetVpcEndpoints(ctx context.Context, v NetworkVpcEndpoints) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vpc_endpoints"] - o.VpcEndpoints = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.VpcEndpoints = vs } type CreateStorageConfigurationRequest struct { // Root S3 bucket information. - RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"object"` + RootBucketInfo types.Object `tfsdk:"root_bucket_info" tf:"object"` // The human-readable name of the storage configuration. StorageConfigurationName types.String `tfsdk:"storage_configuration_name" tf:""` } @@ -917,9 +917,7 @@ func (o CreateStorageConfigurationRequest) ToObjectValue(ctx context.Context) ba func (o CreateStorageConfigurationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "root_bucket_info": basetypes.ListType{ - ElemType: RootBucketInfo{}.Type(ctx), - }, + "root_bucket_info": RootBucketInfo{}.Type(ctx), "storage_configuration_name": types.StringType, }, } @@ -934,7 +932,10 @@ func (o *CreateStorageConfigurationRequest) GetRootBucketInfo(ctx context.Contex return e, false } var v []RootBucketInfo - d := o.RootBucketInfo.ElementsAs(ctx, &v, true) + d := o.RootBucketInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -946,9 +947,8 @@ func (o *CreateStorageConfigurationRequest) GetRootBucketInfo(ctx context.Contex // SetRootBucketInfo sets the value of the RootBucketInfo field in CreateStorageConfigurationRequest. func (o *CreateStorageConfigurationRequest) SetRootBucketInfo(ctx context.Context, v RootBucketInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["root_bucket_info"] - o.RootBucketInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RootBucketInfo = vs } type CreateVpcEndpointRequest struct { @@ -956,7 +956,7 @@ type CreateVpcEndpointRequest struct { AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region" tf:"optional"` // The human-readable name of the storage configuration. @@ -1000,12 +1000,10 @@ func (o CreateVpcEndpointRequest) ToObjectValue(ctx context.Context) basetypes.O func (o CreateVpcEndpointRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_vpc_endpoint_id": types.StringType, - "gcp_vpc_endpoint_info": basetypes.ListType{ - ElemType: GcpVpcEndpointInfo{}.Type(ctx), - }, - "region": types.StringType, - "vpc_endpoint_name": types.StringType, + "aws_vpc_endpoint_id": types.StringType, + "gcp_vpc_endpoint_info": GcpVpcEndpointInfo{}.Type(ctx), + "region": types.StringType, + "vpc_endpoint_name": types.StringType, }, } } @@ -1019,7 +1017,10 @@ func (o *CreateVpcEndpointRequest) GetGcpVpcEndpointInfo(ctx context.Context) (G return e, false } var v []GcpVpcEndpointInfo - d := o.GcpVpcEndpointInfo.ElementsAs(ctx, &v, true) + d := o.GcpVpcEndpointInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1031,9 +1032,8 @@ func (o *CreateVpcEndpointRequest) GetGcpVpcEndpointInfo(ctx context.Context) (G // SetGcpVpcEndpointInfo sets the value of the GcpVpcEndpointInfo field in CreateVpcEndpointRequest. func (o *CreateVpcEndpointRequest) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcEndpointInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_vpc_endpoint_info"] - o.GcpVpcEndpointInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpVpcEndpointInfo = vs } type CreateWorkspaceRequest struct { @@ -1044,7 +1044,7 @@ type CreateWorkspaceRequest struct { Cloud types.String `tfsdk:"cloud" tf:"optional"` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"optional,object"` // ID of the workspace's credential configuration object. CredentialsId types.String `tfsdk:"credentials_id" tf:"optional"` // The custom tags key-value pairing that is attached to this workspace. The @@ -1105,9 +1105,9 @@ type CreateWorkspaceRequest struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"optional,object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.Object `tfsdk:"gke_config" tf:"optional,object"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` // The Google Cloud region of the workspace data plane in your Google @@ -1202,31 +1202,25 @@ func (o CreateWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateWorkspaceRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_region": types.StringType, - "cloud": types.StringType, - "cloud_resource_container": basetypes.ListType{ - ElemType: CloudResourceContainer{}.Type(ctx), - }, - "credentials_id": types.StringType, + "aws_region": types.StringType, + "cloud": types.StringType, + "cloud_resource_container": CloudResourceContainer{}.Type(ctx), + "credentials_id": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "deployment_name": types.StringType, - "gcp_managed_network_config": basetypes.ListType{ - ElemType: GcpManagedNetworkConfig{}.Type(ctx), - }, - "gke_config": basetypes.ListType{ - ElemType: GkeConfig{}.Type(ctx), - }, - "is_no_public_ip_enabled": types.BoolType, - "location": types.StringType, + "deployment_name": types.StringType, + "gcp_managed_network_config": GcpManagedNetworkConfig{}.Type(ctx), + "gke_config": GkeConfig{}.Type(ctx), + "is_no_public_ip_enabled": types.BoolType, + "location": types.StringType, "managed_services_customer_managed_key_id": types.StringType, - "network_id": types.StringType, - "pricing_tier": types.StringType, - "private_access_settings_id": types.StringType, - "storage_configuration_id": types.StringType, - "storage_customer_managed_key_id": types.StringType, - "workspace_name": types.StringType, + "network_id": types.StringType, + "pricing_tier": types.StringType, + "private_access_settings_id": types.StringType, + "storage_configuration_id": types.StringType, + "storage_customer_managed_key_id": types.StringType, + "workspace_name": types.StringType, }, } } @@ -1240,7 +1234,10 @@ func (o *CreateWorkspaceRequest) GetCloudResourceContainer(ctx context.Context) return e, false } var v []CloudResourceContainer - d := o.CloudResourceContainer.ElementsAs(ctx, &v, true) + d := o.CloudResourceContainer.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1252,9 +1249,8 @@ func (o *CreateWorkspaceRequest) GetCloudResourceContainer(ctx context.Context) // SetCloudResourceContainer sets the value of the CloudResourceContainer field in CreateWorkspaceRequest. func (o *CreateWorkspaceRequest) SetCloudResourceContainer(ctx context.Context, v CloudResourceContainer) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloud_resource_container"] - o.CloudResourceContainer = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudResourceContainer = vs } // GetCustomTags returns the value of the CustomTags field in CreateWorkspaceRequest as @@ -1292,7 +1288,10 @@ func (o *CreateWorkspaceRequest) GetGcpManagedNetworkConfig(ctx context.Context) return e, false } var v []GcpManagedNetworkConfig - d := o.GcpManagedNetworkConfig.ElementsAs(ctx, &v, true) + d := o.GcpManagedNetworkConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1304,9 +1303,8 @@ func (o *CreateWorkspaceRequest) GetGcpManagedNetworkConfig(ctx context.Context) // SetGcpManagedNetworkConfig sets the value of the GcpManagedNetworkConfig field in CreateWorkspaceRequest. func (o *CreateWorkspaceRequest) SetGcpManagedNetworkConfig(ctx context.Context, v GcpManagedNetworkConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_managed_network_config"] - o.GcpManagedNetworkConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpManagedNetworkConfig = vs } // GetGkeConfig returns the value of the GkeConfig field in CreateWorkspaceRequest as @@ -1318,7 +1316,10 @@ func (o *CreateWorkspaceRequest) GetGkeConfig(ctx context.Context) (GkeConfig, b return e, false } var v []GkeConfig - d := o.GkeConfig.ElementsAs(ctx, &v, true) + d := o.GkeConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1330,16 +1331,15 @@ func (o *CreateWorkspaceRequest) GetGkeConfig(ctx context.Context) (GkeConfig, b // SetGkeConfig sets the value of the GkeConfig field in CreateWorkspaceRequest. func (o *CreateWorkspaceRequest) SetGkeConfig(ctx context.Context, v GkeConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gke_config"] - o.GkeConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GkeConfig = vs } type Credential struct { // The Databricks account ID that hosts the credential. AccountId types.String `tfsdk:"account_id" tf:"optional"` - AwsCredentials types.List `tfsdk:"aws_credentials" tf:"optional,object"` + AwsCredentials types.Object `tfsdk:"aws_credentials" tf:"optional,object"` // Time in epoch milliseconds when the credential was created. CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` // Databricks credential configuration ID. @@ -1386,10 +1386,8 @@ func (o Credential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Credential) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "aws_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), - }, + "account_id": types.StringType, + "aws_credentials": AwsCredentials{}.Type(ctx), "creation_time": types.Int64Type, "credentials_id": types.StringType, "credentials_name": types.StringType, @@ -1406,7 +1404,10 @@ func (o *Credential) GetAwsCredentials(ctx context.Context) (AwsCredentials, boo return e, false } var v []AwsCredentials - d := o.AwsCredentials.ElementsAs(ctx, &v, true) + d := o.AwsCredentials.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1418,9 +1419,8 @@ func (o *Credential) GetAwsCredentials(ctx context.Context) (AwsCredentials, boo // SetAwsCredentials sets the value of the AwsCredentials field in Credential. func (o *Credential) SetAwsCredentials(ctx context.Context, v AwsCredentials) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_credentials"] - o.AwsCredentials = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsCredentials = vs } // The general workspace configurations that are specific to Google Cloud. @@ -1471,13 +1471,13 @@ type CustomerManagedKey struct { // The Databricks account ID that holds the customer-managed key. AccountId types.String `tfsdk:"account_id" tf:"optional"` - AwsKeyInfo types.List `tfsdk:"aws_key_info" tf:"optional,object"` + AwsKeyInfo types.Object `tfsdk:"aws_key_info" tf:"optional,object"` // Time in epoch milliseconds when the customer key was created. CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` // ID of the encryption key configuration object. CustomerManagedKeyId types.String `tfsdk:"customer_managed_key_id" tf:"optional"` - GcpKeyInfo types.List `tfsdk:"gcp_key_info" tf:"optional,object"` + GcpKeyInfo types.Object `tfsdk:"gcp_key_info" tf:"optional,object"` // The cases that the key can be used for. UseCases types.List `tfsdk:"use_cases" tf:"optional"` } @@ -1523,15 +1523,11 @@ func (o CustomerManagedKey) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CustomerManagedKey) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "aws_key_info": basetypes.ListType{ - ElemType: AwsKeyInfo{}.Type(ctx), - }, + "account_id": types.StringType, + "aws_key_info": AwsKeyInfo{}.Type(ctx), "creation_time": types.Int64Type, "customer_managed_key_id": types.StringType, - "gcp_key_info": basetypes.ListType{ - ElemType: GcpKeyInfo{}.Type(ctx), - }, + "gcp_key_info": GcpKeyInfo{}.Type(ctx), "use_cases": basetypes.ListType{ ElemType: types.StringType, }, @@ -1548,7 +1544,10 @@ func (o *CustomerManagedKey) GetAwsKeyInfo(ctx context.Context) (AwsKeyInfo, boo return e, false } var v []AwsKeyInfo - d := o.AwsKeyInfo.ElementsAs(ctx, &v, true) + d := o.AwsKeyInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1560,9 +1559,8 @@ func (o *CustomerManagedKey) GetAwsKeyInfo(ctx context.Context) (AwsKeyInfo, boo // SetAwsKeyInfo sets the value of the AwsKeyInfo field in CustomerManagedKey. func (o *CustomerManagedKey) SetAwsKeyInfo(ctx context.Context, v AwsKeyInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_key_info"] - o.AwsKeyInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsKeyInfo = vs } // GetGcpKeyInfo returns the value of the GcpKeyInfo field in CustomerManagedKey as @@ -1574,7 +1572,10 @@ func (o *CustomerManagedKey) GetGcpKeyInfo(ctx context.Context) (GcpKeyInfo, boo return e, false } var v []GcpKeyInfo - d := o.GcpKeyInfo.ElementsAs(ctx, &v, true) + d := o.GcpKeyInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1586,9 +1587,8 @@ func (o *CustomerManagedKey) GetGcpKeyInfo(ctx context.Context) (GcpKeyInfo, boo // SetGcpKeyInfo sets the value of the GcpKeyInfo field in CustomerManagedKey. func (o *CustomerManagedKey) SetGcpKeyInfo(ctx context.Context, v GcpKeyInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_key_info"] - o.GcpKeyInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpKeyInfo = vs } // GetUseCases returns the value of the UseCases field in CustomerManagedKey as @@ -2620,7 +2620,7 @@ type Network struct { ErrorMessages types.List `tfsdk:"error_messages" tf:"computed"` // The Google Cloud specific information for this network (for example, the // VPC ID, subnet ID, and secondary IP ranges). - GcpNetworkInfo types.List `tfsdk:"gcp_network_info" tf:"optional,object"` + GcpNetworkInfo types.Object `tfsdk:"gcp_network_info" tf:"optional,object"` // The Databricks network configuration ID. NetworkId types.String `tfsdk:"network_id" tf:"optional"` // The human-readable name of the network configuration. @@ -2633,7 +2633,7 @@ type Network struct { // communication from this VPC over [AWS PrivateLink]. // // [AWS PrivateLink]: https://aws.amazon.com/privatelink/ - VpcEndpoints types.List `tfsdk:"vpc_endpoints" tf:"optional,object"` + VpcEndpoints types.Object `tfsdk:"vpc_endpoints" tf:"optional,object"` // The ID of the VPC associated with this network configuration. VPC IDs can // be used in multiple networks. VpcId types.String `tfsdk:"vpc_id" tf:"optional"` @@ -2703,22 +2703,18 @@ func (o Network) Type(ctx context.Context) attr.Type { "error_messages": basetypes.ListType{ ElemType: NetworkHealth{}.Type(ctx), }, - "gcp_network_info": basetypes.ListType{ - ElemType: GcpNetworkInfo{}.Type(ctx), - }, - "network_id": types.StringType, - "network_name": types.StringType, + "gcp_network_info": GcpNetworkInfo{}.Type(ctx), + "network_id": types.StringType, + "network_name": types.StringType, "security_group_ids": basetypes.ListType{ ElemType: types.StringType, }, "subnet_ids": basetypes.ListType{ ElemType: types.StringType, }, - "vpc_endpoints": basetypes.ListType{ - ElemType: NetworkVpcEndpoints{}.Type(ctx), - }, - "vpc_id": types.StringType, - "vpc_status": types.StringType, + "vpc_endpoints": NetworkVpcEndpoints{}.Type(ctx), + "vpc_id": types.StringType, + "vpc_status": types.StringType, "warning_messages": basetypes.ListType{ ElemType: NetworkWarning{}.Type(ctx), }, @@ -2762,7 +2758,10 @@ func (o *Network) GetGcpNetworkInfo(ctx context.Context) (GcpNetworkInfo, bool) return e, false } var v []GcpNetworkInfo - d := o.GcpNetworkInfo.ElementsAs(ctx, &v, true) + d := o.GcpNetworkInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2774,9 +2773,8 @@ func (o *Network) GetGcpNetworkInfo(ctx context.Context) (GcpNetworkInfo, bool) // SetGcpNetworkInfo sets the value of the GcpNetworkInfo field in Network. func (o *Network) SetGcpNetworkInfo(ctx context.Context, v GcpNetworkInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_network_info"] - o.GcpNetworkInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpNetworkInfo = vs } // GetSecurityGroupIds returns the value of the SecurityGroupIds field in Network as @@ -2840,7 +2838,10 @@ func (o *Network) GetVpcEndpoints(ctx context.Context) (NetworkVpcEndpoints, boo return e, false } var v []NetworkVpcEndpoints - d := o.VpcEndpoints.ElementsAs(ctx, &v, true) + d := o.VpcEndpoints.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2852,9 +2853,8 @@ func (o *Network) GetVpcEndpoints(ctx context.Context) (NetworkVpcEndpoints, boo // SetVpcEndpoints sets the value of the VpcEndpoints field in Network. func (o *Network) SetVpcEndpoints(ctx context.Context, v NetworkVpcEndpoints) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vpc_endpoints"] - o.VpcEndpoints = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.VpcEndpoints = vs } // GetWarningMessages returns the value of the WarningMessages field in Network as @@ -3279,7 +3279,7 @@ type StorageConfiguration struct { // Time in epoch milliseconds when the storage configuration was created. CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` // Root S3 bucket information. - RootBucketInfo types.List `tfsdk:"root_bucket_info" tf:"optional,object"` + RootBucketInfo types.Object `tfsdk:"root_bucket_info" tf:"optional,object"` // Databricks storage configuration ID. StorageConfigurationId types.String `tfsdk:"storage_configuration_id" tf:"optional"` // The human-readable name of the storage configuration. @@ -3324,11 +3324,9 @@ func (o StorageConfiguration) ToObjectValue(ctx context.Context) basetypes.Objec func (o StorageConfiguration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "creation_time": types.Int64Type, - "root_bucket_info": basetypes.ListType{ - ElemType: RootBucketInfo{}.Type(ctx), - }, + "account_id": types.StringType, + "creation_time": types.Int64Type, + "root_bucket_info": RootBucketInfo{}.Type(ctx), "storage_configuration_id": types.StringType, "storage_configuration_name": types.StringType, }, @@ -3344,7 +3342,10 @@ func (o *StorageConfiguration) GetRootBucketInfo(ctx context.Context) (RootBucke return e, false } var v []RootBucketInfo - d := o.RootBucketInfo.ElementsAs(ctx, &v, true) + d := o.RootBucketInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3356,9 +3357,8 @@ func (o *StorageConfiguration) GetRootBucketInfo(ctx context.Context) (RootBucke // SetRootBucketInfo sets the value of the RootBucketInfo field in StorageConfiguration. func (o *StorageConfiguration) SetRootBucketInfo(ctx context.Context, v RootBucketInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["root_bucket_info"] - o.RootBucketInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RootBucketInfo = vs } type StsRole struct { @@ -3695,7 +3695,7 @@ type VpcEndpoint struct { AwsVpcEndpointId types.String `tfsdk:"aws_vpc_endpoint_id" tf:"optional"` // The Google Cloud specific information for this Private Service Connect // endpoint. - GcpVpcEndpointInfo types.List `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` + GcpVpcEndpointInfo types.Object `tfsdk:"gcp_vpc_endpoint_info" tf:"optional,object"` // The AWS region in which this VPC endpoint object exists. Region types.String `tfsdk:"region" tf:"optional"` // The current state (such as `available` or `rejected`) of the VPC @@ -3764,14 +3764,12 @@ func (o VpcEndpoint) Type(ctx context.Context) attr.Type { "aws_account_id": types.StringType, "aws_endpoint_service_id": types.StringType, "aws_vpc_endpoint_id": types.StringType, - "gcp_vpc_endpoint_info": basetypes.ListType{ - ElemType: GcpVpcEndpointInfo{}.Type(ctx), - }, - "region": types.StringType, - "state": types.StringType, - "use_case": types.StringType, - "vpc_endpoint_id": types.StringType, - "vpc_endpoint_name": types.StringType, + "gcp_vpc_endpoint_info": GcpVpcEndpointInfo{}.Type(ctx), + "region": types.StringType, + "state": types.StringType, + "use_case": types.StringType, + "vpc_endpoint_id": types.StringType, + "vpc_endpoint_name": types.StringType, }, } } @@ -3785,7 +3783,10 @@ func (o *VpcEndpoint) GetGcpVpcEndpointInfo(ctx context.Context) (GcpVpcEndpoint return e, false } var v []GcpVpcEndpointInfo - d := o.GcpVpcEndpointInfo.ElementsAs(ctx, &v, true) + d := o.GcpVpcEndpointInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3797,9 +3798,8 @@ func (o *VpcEndpoint) GetGcpVpcEndpointInfo(ctx context.Context) (GcpVpcEndpoint // SetGcpVpcEndpointInfo sets the value of the GcpVpcEndpointInfo field in VpcEndpoint. func (o *VpcEndpoint) SetGcpVpcEndpointInfo(ctx context.Context, v GcpVpcEndpointInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_vpc_endpoint_info"] - o.GcpVpcEndpointInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpVpcEndpointInfo = vs } type Workspace struct { @@ -3808,12 +3808,12 @@ type Workspace struct { // The AWS region of the workspace data plane (for example, `us-west-2`). AwsRegion types.String `tfsdk:"aws_region" tf:"optional"` - AzureWorkspaceInfo types.List `tfsdk:"azure_workspace_info" tf:"optional,object"` + AzureWorkspaceInfo types.Object `tfsdk:"azure_workspace_info" tf:"optional,object"` // The cloud name. This field always has the value `gcp`. Cloud types.String `tfsdk:"cloud" tf:"optional"` // The general workspace configurations that are specific to cloud // providers. - CloudResourceContainer types.List `tfsdk:"cloud_resource_container" tf:"optional,object"` + CloudResourceContainer types.Object `tfsdk:"cloud_resource_container" tf:"optional,object"` // Time in epoch milliseconds when the workspace was created. CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` // ID of the workspace's credential configuration object. @@ -3833,7 +3833,7 @@ type Workspace struct { // If this workspace is for a external customer, then external_customer_info // is populated. If this workspace is not for a external customer, then // external_customer_info is empty. - ExternalCustomerInfo types.List `tfsdk:"external_customer_info" tf:"optional,object"` + ExternalCustomerInfo types.Object `tfsdk:"external_customer_info" tf:"optional,object"` // The network settings for the workspace. The configurations are only for // Databricks-managed VPCs. It is ignored if you specify a customer-managed // VPC in the `network_id` field.", All the IP range configurations must be @@ -3857,9 +3857,9 @@ type Workspace struct { // for a new workspace]. // // [calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html - GcpManagedNetworkConfig types.List `tfsdk:"gcp_managed_network_config" tf:"optional,object"` + GcpManagedNetworkConfig types.Object `tfsdk:"gcp_managed_network_config" tf:"optional,object"` // The configurations for the GKE cluster of a Databricks workspace. - GkeConfig types.List `tfsdk:"gke_config" tf:"optional,object"` + GkeConfig types.Object `tfsdk:"gke_config" tf:"optional,object"` // Whether no public IP is enabled for the workspace. IsNoPublicIpEnabled types.Bool `tfsdk:"is_no_public_ip_enabled" tf:"optional"` // The Google Cloud region of the workspace data plane in your Google @@ -3964,42 +3964,32 @@ func (o Workspace) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Workspace) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "aws_region": types.StringType, - "azure_workspace_info": basetypes.ListType{ - ElemType: AzureWorkspaceInfo{}.Type(ctx), - }, - "cloud": types.StringType, - "cloud_resource_container": basetypes.ListType{ - ElemType: CloudResourceContainer{}.Type(ctx), - }, - "creation_time": types.Int64Type, - "credentials_id": types.StringType, + "account_id": types.StringType, + "aws_region": types.StringType, + "azure_workspace_info": AzureWorkspaceInfo{}.Type(ctx), + "cloud": types.StringType, + "cloud_resource_container": CloudResourceContainer{}.Type(ctx), + "creation_time": types.Int64Type, + "credentials_id": types.StringType, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, - "deployment_name": types.StringType, - "external_customer_info": basetypes.ListType{ - ElemType: ExternalCustomerInfo{}.Type(ctx), - }, - "gcp_managed_network_config": basetypes.ListType{ - ElemType: GcpManagedNetworkConfig{}.Type(ctx), - }, - "gke_config": basetypes.ListType{ - ElemType: GkeConfig{}.Type(ctx), - }, - "is_no_public_ip_enabled": types.BoolType, - "location": types.StringType, + "deployment_name": types.StringType, + "external_customer_info": ExternalCustomerInfo{}.Type(ctx), + "gcp_managed_network_config": GcpManagedNetworkConfig{}.Type(ctx), + "gke_config": GkeConfig{}.Type(ctx), + "is_no_public_ip_enabled": types.BoolType, + "location": types.StringType, "managed_services_customer_managed_key_id": types.StringType, - "network_id": types.StringType, - "pricing_tier": types.StringType, - "private_access_settings_id": types.StringType, - "storage_configuration_id": types.StringType, - "storage_customer_managed_key_id": types.StringType, - "workspace_id": types.Int64Type, - "workspace_name": types.StringType, - "workspace_status": types.StringType, - "workspace_status_message": types.StringType, + "network_id": types.StringType, + "pricing_tier": types.StringType, + "private_access_settings_id": types.StringType, + "storage_configuration_id": types.StringType, + "storage_customer_managed_key_id": types.StringType, + "workspace_id": types.Int64Type, + "workspace_name": types.StringType, + "workspace_status": types.StringType, + "workspace_status_message": types.StringType, }, } } @@ -4013,7 +4003,10 @@ func (o *Workspace) GetAzureWorkspaceInfo(ctx context.Context) (AzureWorkspaceIn return e, false } var v []AzureWorkspaceInfo - d := o.AzureWorkspaceInfo.ElementsAs(ctx, &v, true) + d := o.AzureWorkspaceInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4025,9 +4018,8 @@ func (o *Workspace) GetAzureWorkspaceInfo(ctx context.Context) (AzureWorkspaceIn // SetAzureWorkspaceInfo sets the value of the AzureWorkspaceInfo field in Workspace. func (o *Workspace) SetAzureWorkspaceInfo(ctx context.Context, v AzureWorkspaceInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_workspace_info"] - o.AzureWorkspaceInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureWorkspaceInfo = vs } // GetCloudResourceContainer returns the value of the CloudResourceContainer field in Workspace as @@ -4039,7 +4031,10 @@ func (o *Workspace) GetCloudResourceContainer(ctx context.Context) (CloudResourc return e, false } var v []CloudResourceContainer - d := o.CloudResourceContainer.ElementsAs(ctx, &v, true) + d := o.CloudResourceContainer.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4051,9 +4046,8 @@ func (o *Workspace) GetCloudResourceContainer(ctx context.Context) (CloudResourc // SetCloudResourceContainer sets the value of the CloudResourceContainer field in Workspace. func (o *Workspace) SetCloudResourceContainer(ctx context.Context, v CloudResourceContainer) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cloud_resource_container"] - o.CloudResourceContainer = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CloudResourceContainer = vs } // GetCustomTags returns the value of the CustomTags field in Workspace as @@ -4091,7 +4085,10 @@ func (o *Workspace) GetExternalCustomerInfo(ctx context.Context) (ExternalCustom return e, false } var v []ExternalCustomerInfo - d := o.ExternalCustomerInfo.ElementsAs(ctx, &v, true) + d := o.ExternalCustomerInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4103,9 +4100,8 @@ func (o *Workspace) GetExternalCustomerInfo(ctx context.Context) (ExternalCustom // SetExternalCustomerInfo sets the value of the ExternalCustomerInfo field in Workspace. func (o *Workspace) SetExternalCustomerInfo(ctx context.Context, v ExternalCustomerInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_customer_info"] - o.ExternalCustomerInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExternalCustomerInfo = vs } // GetGcpManagedNetworkConfig returns the value of the GcpManagedNetworkConfig field in Workspace as @@ -4117,7 +4113,10 @@ func (o *Workspace) GetGcpManagedNetworkConfig(ctx context.Context) (GcpManagedN return e, false } var v []GcpManagedNetworkConfig - d := o.GcpManagedNetworkConfig.ElementsAs(ctx, &v, true) + d := o.GcpManagedNetworkConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4129,9 +4128,8 @@ func (o *Workspace) GetGcpManagedNetworkConfig(ctx context.Context) (GcpManagedN // SetGcpManagedNetworkConfig sets the value of the GcpManagedNetworkConfig field in Workspace. func (o *Workspace) SetGcpManagedNetworkConfig(ctx context.Context, v GcpManagedNetworkConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gcp_managed_network_config"] - o.GcpManagedNetworkConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GcpManagedNetworkConfig = vs } // GetGkeConfig returns the value of the GkeConfig field in Workspace as @@ -4143,7 +4141,10 @@ func (o *Workspace) GetGkeConfig(ctx context.Context) (GkeConfig, bool) { return e, false } var v []GkeConfig - d := o.GkeConfig.ElementsAs(ctx, &v, true) + d := o.GkeConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4155,7 +4156,6 @@ func (o *Workspace) GetGkeConfig(ctx context.Context) (GkeConfig, bool) { // SetGkeConfig sets the value of the GkeConfig field in Workspace. func (o *Workspace) SetGkeConfig(ctx context.Context, v GkeConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["gke_config"] - o.GkeConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GkeConfig = vs } diff --git a/internal/service/serving_tf/legacy_model.go b/internal/service/serving_tf/legacy_model.go new file mode 100755 index 000000000..df5bd8eb4 --- /dev/null +++ b/internal/service/serving_tf/legacy_model.go @@ -0,0 +1,7057 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package serving_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/oauth2_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type Ai21LabsConfig_SdkV2 struct { + // The Databricks secret key reference for an AI21 Labs API key. If you + // prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. + // You must provide an API key using one of the following fields: + // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. + Ai21labsApiKey types.String `tfsdk:"ai21labs_api_key" tf:"optional"` + // An AI21 Labs API key provided as a plaintext string. If you prefer to + // reference your key using Databricks Secrets, see `ai21labs_api_key`. You + // must provide an API key using one of the following fields: + // `ai21labs_api_key` or `ai21labs_api_key_plaintext`. + Ai21labsApiKeyPlaintext types.String `tfsdk:"ai21labs_api_key_plaintext" tf:"optional"` +} + +func (newState *Ai21LabsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Ai21LabsConfig_SdkV2) { +} + +func (newState *Ai21LabsConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState Ai21LabsConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Ai21LabsConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Ai21LabsConfig_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, Ai21LabsConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Ai21LabsConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ai21labs_api_key": o.Ai21labsApiKey, + "ai21labs_api_key_plaintext": o.Ai21labsApiKeyPlaintext, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Ai21LabsConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ai21labs_api_key": types.StringType, + "ai21labs_api_key_plaintext": types.StringType, + }, + } +} + +type AiGatewayConfig_SdkV2 struct { + // Configuration for AI Guardrails to prevent unwanted data and unsafe data + // in requests and responses. + Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + // Configuration for payload logging using inference tables. Use these + // tables to monitor and audit data being sent to and received from model + // APIs and to improve model quality. + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + // Configuration for rate limits which can be set to limit endpoint traffic. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + // Configuration to enable usage tracking using system tables. These tables + // allow you to monitor operational usage on endpoints and their associated + // costs. + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` +} + +func (newState *AiGatewayConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayConfig_SdkV2) { +} + +func (newState *AiGatewayConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "guardrails": reflect.TypeOf(AiGatewayGuardrails_SdkV2{}), + "inference_table_config": reflect.TypeOf(AiGatewayInferenceTableConfig_SdkV2{}), + "rate_limits": reflect.TypeOf(AiGatewayRateLimit_SdkV2{}), + "usage_tracking_config": reflect.TypeOf(AiGatewayUsageTrackingConfig_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, AiGatewayConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "guardrails": o.Guardrails, + "inference_table_config": o.InferenceTableConfig, + "rate_limits": o.RateLimits, + "usage_tracking_config": o.UsageTrackingConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "guardrails": basetypes.ListType{ + ElemType: AiGatewayGuardrails{}.Type(ctx), + }, + "inference_table_config": basetypes.ListType{ + ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + }, + "rate_limits": basetypes.ListType{ + ElemType: AiGatewayRateLimit{}.Type(ctx), + }, + "usage_tracking_config": basetypes.ListType{ + ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + }, + }, + } +} + +// GetGuardrails returns the value of the Guardrails field in AiGatewayConfig_SdkV2 as +// a AiGatewayGuardrails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayConfig_SdkV2) GetGuardrails(ctx context.Context) (AiGatewayGuardrails_SdkV2, bool) { + var e AiGatewayGuardrails_SdkV2 + if o.Guardrails.IsNull() || o.Guardrails.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrails_SdkV2 + d := o.Guardrails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGuardrails sets the value of the Guardrails field in AiGatewayConfig_SdkV2. +func (o *AiGatewayConfig_SdkV2) SetGuardrails(ctx context.Context, v AiGatewayGuardrails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] + o.Guardrails = types.ListValueMust(t, vs) +} + +// GetInferenceTableConfig returns the value of the InferenceTableConfig field in AiGatewayConfig_SdkV2 as +// a AiGatewayInferenceTableConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayConfig_SdkV2) GetInferenceTableConfig(ctx context.Context) (AiGatewayInferenceTableConfig_SdkV2, bool) { + var e AiGatewayInferenceTableConfig_SdkV2 + if o.InferenceTableConfig.IsNull() || o.InferenceTableConfig.IsUnknown() { + return e, false + } + var v []AiGatewayInferenceTableConfig_SdkV2 + d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceTableConfig sets the value of the InferenceTableConfig field in AiGatewayConfig_SdkV2. +func (o *AiGatewayConfig_SdkV2) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] + o.InferenceTableConfig = types.ListValueMust(t, vs) +} + +// GetRateLimits returns the value of the RateLimits field in AiGatewayConfig_SdkV2 as +// a slice of AiGatewayRateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayConfig_SdkV2) GetRateLimits(ctx context.Context) ([]AiGatewayRateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []AiGatewayRateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in AiGatewayConfig_SdkV2. +func (o *AiGatewayConfig_SdkV2) SetRateLimits(ctx context.Context, v []AiGatewayRateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +// GetUsageTrackingConfig returns the value of the UsageTrackingConfig field in AiGatewayConfig_SdkV2 as +// a AiGatewayUsageTrackingConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayConfig_SdkV2) GetUsageTrackingConfig(ctx context.Context) (AiGatewayUsageTrackingConfig_SdkV2, bool) { + var e AiGatewayUsageTrackingConfig_SdkV2 + if o.UsageTrackingConfig.IsNull() || o.UsageTrackingConfig.IsUnknown() { + return e, false + } + var v []AiGatewayUsageTrackingConfig_SdkV2 + d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in AiGatewayConfig_SdkV2. +func (o *AiGatewayConfig_SdkV2) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] + o.UsageTrackingConfig = types.ListValueMust(t, vs) +} + +type AiGatewayGuardrailParameters_SdkV2 struct { + // List of invalid keywords. AI guardrail uses keyword or string matching to + // decide if the keyword exists in the request or response content. + InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:"optional"` + // Configuration for guardrail PII filter. + Pii types.List `tfsdk:"pii" tf:"optional,object"` + // Indicates whether the safety filter is enabled. + Safety types.Bool `tfsdk:"safety" tf:"optional"` + // The list of allowed topics. Given a chat request, this guardrail flags + // the request if its topic is not in the allowed topics. + ValidTopics types.List `tfsdk:"valid_topics" tf:"optional"` +} + +func (newState *AiGatewayGuardrailParameters_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrailParameters_SdkV2) { +} + +func (newState *AiGatewayGuardrailParameters_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailParameters_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailParameters. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayGuardrailParameters_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "invalid_keywords": reflect.TypeOf(types.String{}), + "pii": reflect.TypeOf(AiGatewayGuardrailPiiBehavior_SdkV2{}), + "valid_topics": 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, AiGatewayGuardrailParameters_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrailParameters_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "invalid_keywords": o.InvalidKeywords, + "pii": o.Pii, + "safety": o.Safety, + "valid_topics": o.ValidTopics, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayGuardrailParameters_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "invalid_keywords": basetypes.ListType{ + ElemType: types.StringType, + }, + "pii": basetypes.ListType{ + ElemType: AiGatewayGuardrailPiiBehavior{}.Type(ctx), + }, + "safety": types.BoolType, + "valid_topics": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetInvalidKeywords returns the value of the InvalidKeywords field in AiGatewayGuardrailParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayGuardrailParameters_SdkV2) GetInvalidKeywords(ctx context.Context) ([]types.String, bool) { + if o.InvalidKeywords.IsNull() || o.InvalidKeywords.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InvalidKeywords.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInvalidKeywords sets the value of the InvalidKeywords field in AiGatewayGuardrailParameters_SdkV2. +func (o *AiGatewayGuardrailParameters_SdkV2) SetInvalidKeywords(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["invalid_keywords"] + t = t.(attr.TypeWithElementType).ElementType() + o.InvalidKeywords = types.ListValueMust(t, vs) +} + +// GetPii returns the value of the Pii field in AiGatewayGuardrailParameters_SdkV2 as +// a AiGatewayGuardrailPiiBehavior_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayGuardrailParameters_SdkV2) GetPii(ctx context.Context) (AiGatewayGuardrailPiiBehavior_SdkV2, bool) { + var e AiGatewayGuardrailPiiBehavior_SdkV2 + if o.Pii.IsNull() || o.Pii.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrailPiiBehavior_SdkV2 + d := o.Pii.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPii sets the value of the Pii field in AiGatewayGuardrailParameters_SdkV2. +func (o *AiGatewayGuardrailParameters_SdkV2) SetPii(ctx context.Context, v AiGatewayGuardrailPiiBehavior_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pii"] + o.Pii = types.ListValueMust(t, vs) +} + +// GetValidTopics returns the value of the ValidTopics field in AiGatewayGuardrailParameters_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayGuardrailParameters_SdkV2) GetValidTopics(ctx context.Context) ([]types.String, bool) { + if o.ValidTopics.IsNull() || o.ValidTopics.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ValidTopics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValidTopics sets the value of the ValidTopics field in AiGatewayGuardrailParameters_SdkV2. +func (o *AiGatewayGuardrailParameters_SdkV2) SetValidTopics(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["valid_topics"] + t = t.(attr.TypeWithElementType).ElementType() + o.ValidTopics = types.ListValueMust(t, vs) +} + +type AiGatewayGuardrailPiiBehavior_SdkV2 struct { + // Behavior for PII filter. Currently only 'BLOCK' is supported. If 'BLOCK' + // is set for the input guardrail and the request contains PII, the request + // is not sent to the model server and 400 status code is returned; if + // 'BLOCK' is set for the output guardrail and the model response contains + // PII, the PII info in the response is redacted and 400 status code is + // returned. + Behavior types.String `tfsdk:"behavior" tf:""` +} + +func (newState *AiGatewayGuardrailPiiBehavior_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrailPiiBehavior_SdkV2) { +} + +func (newState *AiGatewayGuardrailPiiBehavior_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrailPiiBehavior_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrailPiiBehavior. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayGuardrailPiiBehavior_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, AiGatewayGuardrailPiiBehavior_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrailPiiBehavior_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "behavior": o.Behavior, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayGuardrailPiiBehavior_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "behavior": types.StringType, + }, + } +} + +type AiGatewayGuardrails_SdkV2 struct { + // Configuration for input guardrail filters. + Input types.List `tfsdk:"input" tf:"optional,object"` + // Configuration for output guardrail filters. + Output types.List `tfsdk:"output" tf:"optional,object"` +} + +func (newState *AiGatewayGuardrails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrails_SdkV2) { +} + +func (newState *AiGatewayGuardrails_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayGuardrails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayGuardrails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayGuardrails_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "input": reflect.TypeOf(AiGatewayGuardrailParameters_SdkV2{}), + "output": reflect.TypeOf(AiGatewayGuardrailParameters_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, AiGatewayGuardrails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "input": o.Input, + "output": o.Output, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayGuardrails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "input": basetypes.ListType{ + ElemType: AiGatewayGuardrailParameters{}.Type(ctx), + }, + "output": basetypes.ListType{ + ElemType: AiGatewayGuardrailParameters{}.Type(ctx), + }, + }, + } +} + +// GetInput returns the value of the Input field in AiGatewayGuardrails_SdkV2 as +// a AiGatewayGuardrailParameters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayGuardrails_SdkV2) GetInput(ctx context.Context) (AiGatewayGuardrailParameters_SdkV2, bool) { + var e AiGatewayGuardrailParameters_SdkV2 + if o.Input.IsNull() || o.Input.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrailParameters_SdkV2 + d := o.Input.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInput sets the value of the Input field in AiGatewayGuardrails_SdkV2. +func (o *AiGatewayGuardrails_SdkV2) SetInput(ctx context.Context, v AiGatewayGuardrailParameters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input"] + o.Input = types.ListValueMust(t, vs) +} + +// GetOutput returns the value of the Output field in AiGatewayGuardrails_SdkV2 as +// a AiGatewayGuardrailParameters_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AiGatewayGuardrails_SdkV2) GetOutput(ctx context.Context) (AiGatewayGuardrailParameters_SdkV2, bool) { + var e AiGatewayGuardrailParameters_SdkV2 + if o.Output.IsNull() || o.Output.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrailParameters_SdkV2 + d := o.Output.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOutput sets the value of the Output field in AiGatewayGuardrails_SdkV2. +func (o *AiGatewayGuardrails_SdkV2) SetOutput(ctx context.Context, v AiGatewayGuardrailParameters_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output"] + o.Output = types.ListValueMust(t, vs) +} + +type AiGatewayInferenceTableConfig_SdkV2 struct { + // The name of the catalog in Unity Catalog. Required when enabling + // inference tables. NOTE: On update, you have to disable inference table + // first in order to change the catalog name. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // Indicates whether the inference table is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the schema in Unity Catalog. Required when enabling inference + // tables. NOTE: On update, you have to disable inference table first in + // order to change the schema name. + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // The prefix of the table in Unity Catalog. NOTE: On update, you have to + // disable inference table first in order to change the prefix name. + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` +} + +func (newState *AiGatewayInferenceTableConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayInferenceTableConfig_SdkV2) { +} + +func (newState *AiGatewayInferenceTableConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayInferenceTableConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayInferenceTableConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayInferenceTableConfig_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, AiGatewayInferenceTableConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayInferenceTableConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "enabled": o.Enabled, + "schema_name": o.SchemaName, + "table_name_prefix": o.TableNamePrefix, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayInferenceTableConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "enabled": types.BoolType, + "schema_name": types.StringType, + "table_name_prefix": types.StringType, + }, + } +} + +type AiGatewayRateLimit_SdkV2 struct { + // Used to specify how many calls are allowed for a key within the + // renewal_period. + Calls types.Int64 `tfsdk:"calls" tf:""` + // Key field for a rate limit. Currently, only 'user' and 'endpoint' are + // supported, with 'endpoint' being the default if not specified. + Key types.String `tfsdk:"key" tf:"optional"` + // Renewal period field for a rate limit. Currently, only 'minute' is + // supported. + RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` +} + +func (newState *AiGatewayRateLimit_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayRateLimit_SdkV2) { +} + +func (newState *AiGatewayRateLimit_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayRateLimit_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayRateLimit. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayRateLimit_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, AiGatewayRateLimit_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayRateLimit_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "calls": o.Calls, + "key": o.Key, + "renewal_period": o.RenewalPeriod, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayRateLimit_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "calls": types.Int64Type, + "key": types.StringType, + "renewal_period": types.StringType, + }, + } +} + +type AiGatewayUsageTrackingConfig_SdkV2 struct { + // Whether to enable usage tracking. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` +} + +func (newState *AiGatewayUsageTrackingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayUsageTrackingConfig_SdkV2) { +} + +func (newState *AiGatewayUsageTrackingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AiGatewayUsageTrackingConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AiGatewayUsageTrackingConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AiGatewayUsageTrackingConfig_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, AiGatewayUsageTrackingConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AiGatewayUsageTrackingConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AiGatewayUsageTrackingConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + }, + } +} + +type AmazonBedrockConfig_SdkV2 struct { + // The Databricks secret key reference for an AWS access key ID with + // permissions to interact with Bedrock services. If you prefer to paste + // your API key directly, see `aws_access_key_id`. You must provide an API + // key using one of the following fields: `aws_access_key_id` or + // `aws_access_key_id_plaintext`. + AwsAccessKeyId types.String `tfsdk:"aws_access_key_id" tf:"optional"` + // An AWS access key ID with permissions to interact with Bedrock services + // provided as a plaintext string. If you prefer to reference your key using + // Databricks Secrets, see `aws_access_key_id`. You must provide an API key + // using one of the following fields: `aws_access_key_id` or + // `aws_access_key_id_plaintext`. + AwsAccessKeyIdPlaintext types.String `tfsdk:"aws_access_key_id_plaintext" tf:"optional"` + // The AWS region to use. Bedrock has to be enabled there. + AwsRegion types.String `tfsdk:"aws_region" tf:""` + // The Databricks secret key reference for an AWS secret access key paired + // with the access key ID, with permissions to interact with Bedrock + // services. If you prefer to paste your API key directly, see + // `aws_secret_access_key_plaintext`. You must provide an API key using one + // of the following fields: `aws_secret_access_key` or + // `aws_secret_access_key_plaintext`. + AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key" tf:"optional"` + // An AWS secret access key paired with the access key ID, with permissions + // to interact with Bedrock services provided as a plaintext string. If you + // prefer to reference your key using Databricks Secrets, see + // `aws_secret_access_key`. You must provide an API key using one of the + // following fields: `aws_secret_access_key` or + // `aws_secret_access_key_plaintext`. + AwsSecretAccessKeyPlaintext types.String `tfsdk:"aws_secret_access_key_plaintext" tf:"optional"` + // The underlying provider in Amazon Bedrock. Supported values (case + // insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. + BedrockProvider types.String `tfsdk:"bedrock_provider" tf:""` +} + +func (newState *AmazonBedrockConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AmazonBedrockConfig_SdkV2) { +} + +func (newState *AmazonBedrockConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AmazonBedrockConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AmazonBedrockConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AmazonBedrockConfig_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, AmazonBedrockConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AmazonBedrockConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_access_key_id": o.AwsAccessKeyId, + "aws_access_key_id_plaintext": o.AwsAccessKeyIdPlaintext, + "aws_region": o.AwsRegion, + "aws_secret_access_key": o.AwsSecretAccessKey, + "aws_secret_access_key_plaintext": o.AwsSecretAccessKeyPlaintext, + "bedrock_provider": o.BedrockProvider, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AmazonBedrockConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_access_key_id": types.StringType, + "aws_access_key_id_plaintext": types.StringType, + "aws_region": types.StringType, + "aws_secret_access_key": types.StringType, + "aws_secret_access_key_plaintext": types.StringType, + "bedrock_provider": types.StringType, + }, + } +} + +type AnthropicConfig_SdkV2 struct { + // The Databricks secret key reference for an Anthropic API key. If you + // prefer to paste your API key directly, see `anthropic_api_key_plaintext`. + // You must provide an API key using one of the following fields: + // `anthropic_api_key` or `anthropic_api_key_plaintext`. + AnthropicApiKey types.String `tfsdk:"anthropic_api_key" tf:"optional"` + // The Anthropic API key provided as a plaintext string. If you prefer to + // reference your key using Databricks Secrets, see `anthropic_api_key`. You + // must provide an API key using one of the following fields: + // `anthropic_api_key` or `anthropic_api_key_plaintext`. + AnthropicApiKeyPlaintext types.String `tfsdk:"anthropic_api_key_plaintext" tf:"optional"` +} + +func (newState *AnthropicConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AnthropicConfig_SdkV2) { +} + +func (newState *AnthropicConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState AnthropicConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AnthropicConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AnthropicConfig_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, AnthropicConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AnthropicConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "anthropic_api_key": o.AnthropicApiKey, + "anthropic_api_key_plaintext": o.AnthropicApiKeyPlaintext, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AnthropicConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "anthropic_api_key": types.StringType, + "anthropic_api_key_plaintext": types.StringType, + }, + } +} + +type AutoCaptureConfigInput_SdkV2 struct { + // The name of the catalog in Unity Catalog. NOTE: On update, you cannot + // change the catalog name if the inference table is already enabled. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // Indicates whether the inference table is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the schema in Unity Catalog. NOTE: On update, you cannot + // change the schema name if the inference table is already enabled. + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + // The prefix of the table in Unity Catalog. NOTE: On update, you cannot + // change the prefix name if the inference table is already enabled. + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` +} + +func (newState *AutoCaptureConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigInput_SdkV2) { +} + +func (newState *AutoCaptureConfigInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AutoCaptureConfigInput_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, AutoCaptureConfigInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureConfigInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "enabled": o.Enabled, + "schema_name": o.SchemaName, + "table_name_prefix": o.TableNamePrefix, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AutoCaptureConfigInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "enabled": types.BoolType, + "schema_name": types.StringType, + "table_name_prefix": types.StringType, + }, + } +} + +type AutoCaptureConfigOutput_SdkV2 struct { + // The name of the catalog in Unity Catalog. + CatalogName types.String `tfsdk:"catalog_name" tf:"optional"` + // Indicates whether the inference table is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The name of the schema in Unity Catalog. + SchemaName types.String `tfsdk:"schema_name" tf:"optional"` + + State types.List `tfsdk:"state" tf:"optional,object"` + // The prefix of the table in Unity Catalog. + TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` +} + +func (newState *AutoCaptureConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureConfigOutput_SdkV2) { +} + +func (newState *AutoCaptureConfigOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureConfigOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureConfigOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AutoCaptureConfigOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "state": reflect.TypeOf(AutoCaptureState_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, AutoCaptureConfigOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureConfigOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "enabled": o.Enabled, + "schema_name": o.SchemaName, + "state": o.State, + "table_name_prefix": o.TableNamePrefix, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AutoCaptureConfigOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog_name": types.StringType, + "enabled": types.BoolType, + "schema_name": types.StringType, + "state": basetypes.ListType{ + ElemType: AutoCaptureState{}.Type(ctx), + }, + "table_name_prefix": types.StringType, + }, + } +} + +// GetState returns the value of the State field in AutoCaptureConfigOutput_SdkV2 as +// a AutoCaptureState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AutoCaptureConfigOutput_SdkV2) GetState(ctx context.Context) (AutoCaptureState_SdkV2, bool) { + var e AutoCaptureState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []AutoCaptureState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in AutoCaptureConfigOutput_SdkV2. +func (o *AutoCaptureConfigOutput_SdkV2) SetState(ctx context.Context, v AutoCaptureState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +type AutoCaptureState_SdkV2 struct { + PayloadTable types.List `tfsdk:"payload_table" tf:"optional,object"` +} + +func (newState *AutoCaptureState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureState_SdkV2) { +} + +func (newState *AutoCaptureState_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutoCaptureState_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AutoCaptureState. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AutoCaptureState_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "payload_table": reflect.TypeOf(PayloadTable_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, AutoCaptureState_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureState_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "payload_table": o.PayloadTable, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AutoCaptureState_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "payload_table": basetypes.ListType{ + ElemType: PayloadTable{}.Type(ctx), + }, + }, + } +} + +// GetPayloadTable returns the value of the PayloadTable field in AutoCaptureState_SdkV2 as +// a PayloadTable_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AutoCaptureState_SdkV2) GetPayloadTable(ctx context.Context) (PayloadTable_SdkV2, bool) { + var e PayloadTable_SdkV2 + if o.PayloadTable.IsNull() || o.PayloadTable.IsUnknown() { + return e, false + } + var v []PayloadTable_SdkV2 + d := o.PayloadTable.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPayloadTable sets the value of the PayloadTable field in AutoCaptureState_SdkV2. +func (o *AutoCaptureState_SdkV2) SetPayloadTable(ctx context.Context, v PayloadTable_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["payload_table"] + o.PayloadTable = types.ListValueMust(t, vs) +} + +// Get build logs for a served model +type BuildLogsRequest_SdkV2 struct { + // The name of the serving endpoint that the served model belongs to. This + // field is required. + Name types.String `tfsdk:"-"` + // The name of the served model that build logs will be retrieved for. This + // field is required. + ServedModelName types.String `tfsdk:"-"` +} + +func (newState *BuildLogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BuildLogsRequest_SdkV2) { +} + +func (newState *BuildLogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState BuildLogsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BuildLogsRequest_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, BuildLogsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BuildLogsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "served_model_name": o.ServedModelName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BuildLogsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "served_model_name": types.StringType, + }, + } +} + +type BuildLogsResponse_SdkV2 struct { + // The logs associated with building the served entity's environment. + Logs types.String `tfsdk:"logs" tf:""` +} + +func (newState *BuildLogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BuildLogsResponse_SdkV2) { +} + +func (newState *BuildLogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState BuildLogsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BuildLogsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BuildLogsResponse_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, BuildLogsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BuildLogsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "logs": o.Logs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BuildLogsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "logs": types.StringType, + }, + } +} + +type ChatMessage_SdkV2 struct { + // The content of the message. + Content types.String `tfsdk:"content" tf:"optional"` + // The role of the message. One of [system, user, assistant]. + Role types.String `tfsdk:"role" tf:"optional"` +} + +func (newState *ChatMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChatMessage_SdkV2) { +} + +func (newState *ChatMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChatMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ChatMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ChatMessage_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, ChatMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ChatMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "role": o.Role, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ChatMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "role": types.StringType, + }, + } +} + +type CohereConfig_SdkV2 struct { + // This is an optional field to provide a customized base URL for the Cohere + // API. If left unspecified, the standard Cohere base URL is used. + CohereApiBase types.String `tfsdk:"cohere_api_base" tf:"optional"` + // The Databricks secret key reference for a Cohere API key. If you prefer + // to paste your API key directly, see `cohere_api_key_plaintext`. You must + // provide an API key using one of the following fields: `cohere_api_key` or + // `cohere_api_key_plaintext`. + CohereApiKey types.String `tfsdk:"cohere_api_key" tf:"optional"` + // The Cohere API key provided as a plaintext string. If you prefer to + // reference your key using Databricks Secrets, see `cohere_api_key`. You + // must provide an API key using one of the following fields: + // `cohere_api_key` or `cohere_api_key_plaintext`. + CohereApiKeyPlaintext types.String `tfsdk:"cohere_api_key_plaintext" tf:"optional"` +} + +func (newState *CohereConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CohereConfig_SdkV2) { +} + +func (newState *CohereConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState CohereConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CohereConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CohereConfig_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, CohereConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CohereConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cohere_api_base": o.CohereApiBase, + "cohere_api_key": o.CohereApiKey, + "cohere_api_key_plaintext": o.CohereApiKeyPlaintext, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CohereConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cohere_api_base": types.StringType, + "cohere_api_key": types.StringType, + "cohere_api_key_plaintext": types.StringType, + }, + } +} + +type CreateServingEndpoint_SdkV2 struct { + // The AI Gateway configuration for the serving endpoint. NOTE: only + // external model endpoints are supported as of now. + AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + // The core config of the serving endpoint. + Config types.List `tfsdk:"config" tf:"object"` + // The name of the serving endpoint. This field is required and must be + // unique across a Databricks workspace. An endpoint name can consist of + // alphanumeric characters, dashes, and underscores. + Name types.String `tfsdk:"name" tf:""` + // Rate limits to be applied to the serving endpoint. NOTE: this field is + // deprecated, please use AI Gateway to manage rate limits. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + // Enable route optimization for the serving endpoint. + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + // Tags to be attached to the serving endpoint and automatically propagated + // to billing logs. + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServingEndpoint_SdkV2) { +} + +func (newState *CreateServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServingEndpoint_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateServingEndpoint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ai_gateway": reflect.TypeOf(AiGatewayConfig_SdkV2{}), + "config": reflect.TypeOf(EndpointCoreConfigInput_SdkV2{}), + "rate_limits": reflect.TypeOf(RateLimit_SdkV2{}), + "tags": reflect.TypeOf(EndpointTag_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, CreateServingEndpoint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateServingEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ai_gateway": o.AiGateway, + "config": o.Config, + "name": o.Name, + "rate_limits": o.RateLimits, + "route_optimized": o.RouteOptimized, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ai_gateway": basetypes.ListType{ + ElemType: AiGatewayConfig{}.Type(ctx), + }, + "config": basetypes.ListType{ + ElemType: EndpointCoreConfigInput{}.Type(ctx), + }, + "name": types.StringType, + "rate_limits": basetypes.ListType{ + ElemType: RateLimit{}.Type(ctx), + }, + "route_optimized": types.BoolType, + "tags": basetypes.ListType{ + ElemType: EndpointTag{}.Type(ctx), + }, + }, + } +} + +// GetAiGateway returns the value of the AiGateway field in CreateServingEndpoint_SdkV2 as +// a AiGatewayConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateServingEndpoint_SdkV2) GetAiGateway(ctx context.Context) (AiGatewayConfig_SdkV2, bool) { + var e AiGatewayConfig_SdkV2 + if o.AiGateway.IsNull() || o.AiGateway.IsUnknown() { + return e, false + } + var v []AiGatewayConfig_SdkV2 + d := o.AiGateway.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAiGateway sets the value of the AiGateway field in CreateServingEndpoint_SdkV2. +func (o *CreateServingEndpoint_SdkV2) SetAiGateway(ctx context.Context, v AiGatewayConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] + o.AiGateway = types.ListValueMust(t, vs) +} + +// GetConfig returns the value of the Config field in CreateServingEndpoint_SdkV2 as +// a EndpointCoreConfigInput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateServingEndpoint_SdkV2) GetConfig(ctx context.Context) (EndpointCoreConfigInput_SdkV2, bool) { + var e EndpointCoreConfigInput_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []EndpointCoreConfigInput_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in CreateServingEndpoint_SdkV2. +func (o *CreateServingEndpoint_SdkV2) SetConfig(ctx context.Context, v EndpointCoreConfigInput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// GetRateLimits returns the value of the RateLimits field in CreateServingEndpoint_SdkV2 as +// a slice of RateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateServingEndpoint_SdkV2) GetRateLimits(ctx context.Context) ([]RateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []RateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in CreateServingEndpoint_SdkV2. +func (o *CreateServingEndpoint_SdkV2) SetRateLimits(ctx context.Context, v []RateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in CreateServingEndpoint_SdkV2 as +// a slice of EndpointTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateServingEndpoint_SdkV2) GetTags(ctx context.Context) ([]EndpointTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []EndpointTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateServingEndpoint_SdkV2. +func (o *CreateServingEndpoint_SdkV2) SetTags(ctx context.Context, v []EndpointTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type DatabricksModelServingConfig_SdkV2 struct { + // The Databricks secret key reference for a Databricks API token that + // corresponds to a user or service principal with Can Query access to the + // model serving endpoint pointed to by this external model. If you prefer + // to paste your API key directly, see `databricks_api_token_plaintext`. You + // must provide an API key using one of the following fields: + // `databricks_api_token` or `databricks_api_token_plaintext`. + DatabricksApiToken types.String `tfsdk:"databricks_api_token" tf:"optional"` + // The Databricks API token that corresponds to a user or service principal + // with Can Query access to the model serving endpoint pointed to by this + // external model provided as a plaintext string. If you prefer to reference + // your key using Databricks Secrets, see `databricks_api_token`. You must + // provide an API key using one of the following fields: + // `databricks_api_token` or `databricks_api_token_plaintext`. + DatabricksApiTokenPlaintext types.String `tfsdk:"databricks_api_token_plaintext" tf:"optional"` + // The URL of the Databricks workspace containing the model serving endpoint + // pointed to by this external model. + DatabricksWorkspaceUrl types.String `tfsdk:"databricks_workspace_url" tf:""` +} + +func (newState *DatabricksModelServingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DatabricksModelServingConfig_SdkV2) { +} + +func (newState *DatabricksModelServingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState DatabricksModelServingConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DatabricksModelServingConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DatabricksModelServingConfig_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, DatabricksModelServingConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DatabricksModelServingConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "databricks_api_token": o.DatabricksApiToken, + "databricks_api_token_plaintext": o.DatabricksApiTokenPlaintext, + "databricks_workspace_url": o.DatabricksWorkspaceUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DatabricksModelServingConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "databricks_api_token": types.StringType, + "databricks_api_token_plaintext": types.StringType, + "databricks_workspace_url": types.StringType, + }, + } +} + +type DataframeSplitInput_SdkV2 struct { + Columns types.List `tfsdk:"columns" tf:"optional"` + + Data types.List `tfsdk:"data" tf:"optional"` + + Index types.List `tfsdk:"index" tf:"optional"` +} + +func (newState *DataframeSplitInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataframeSplitInput_SdkV2) { +} + +func (newState *DataframeSplitInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataframeSplitInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataframeSplitInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataframeSplitInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(types.Object{}), + "data": reflect.TypeOf(types.Object{}), + "index": reflect.TypeOf(types.Int64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DataframeSplitInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataframeSplitInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "data": o.Data, + "index": o.Index, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataframeSplitInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: types.ObjectType{}, + }, + "data": basetypes.ListType{ + ElemType: types.ObjectType{}, + }, + "index": basetypes.ListType{ + ElemType: types.Int64Type, + }, + }, + } +} + +// GetColumns returns the value of the Columns field in DataframeSplitInput_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *DataframeSplitInput_SdkV2) GetColumns(ctx context.Context) ([]types.Object, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []types.Object + 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 DataframeSplitInput_SdkV2. +func (o *DataframeSplitInput_SdkV2) SetColumns(ctx context.Context, v []types.Object) { + 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) +} + +// GetData returns the value of the Data field in DataframeSplitInput_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *DataframeSplitInput_SdkV2) GetData(ctx context.Context) ([]types.Object, bool) { + if o.Data.IsNull() || o.Data.IsUnknown() { + return nil, false + } + var v []types.Object + d := o.Data.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetData sets the value of the Data field in DataframeSplitInput_SdkV2. +func (o *DataframeSplitInput_SdkV2) SetData(ctx context.Context, v []types.Object) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data"] + t = t.(attr.TypeWithElementType).ElementType() + o.Data = types.ListValueMust(t, vs) +} + +// GetIndex returns the value of the Index field in DataframeSplitInput_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DataframeSplitInput_SdkV2) GetIndex(ctx context.Context) ([]types.Int64, bool) { + if o.Index.IsNull() || o.Index.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.Index.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIndex sets the value of the Index field in DataframeSplitInput_SdkV2. +func (o *DataframeSplitInput_SdkV2) SetIndex(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["index"] + t = t.(attr.TypeWithElementType).ElementType() + o.Index = types.ListValueMust(t, vs) +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete a serving endpoint +type DeleteServingEndpointRequest_SdkV2 struct { + // The name of the serving endpoint. This field is required. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServingEndpointRequest_SdkV2) { +} + +func (newState *DeleteServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServingEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServingEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteServingEndpointRequest_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, DeleteServingEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteServingEndpointRequest_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 DeleteServingEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type EmbeddingsV1ResponseEmbeddingElement_SdkV2 struct { + Embedding types.List `tfsdk:"embedding" tf:"optional"` + // The index of the embedding in the response. + Index types.Int64 `tfsdk:"index" tf:"optional"` + // This will always be 'embedding'. + Object types.String `tfsdk:"object" tf:"optional"` +} + +func (newState *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingsV1ResponseEmbeddingElement_SdkV2) { +} + +func (newState *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingsV1ResponseEmbeddingElement_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingsV1ResponseEmbeddingElement. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EmbeddingsV1ResponseEmbeddingElement_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "embedding": reflect.TypeOf(types.Float64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, EmbeddingsV1ResponseEmbeddingElement_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EmbeddingsV1ResponseEmbeddingElement_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "embedding": o.Embedding, + "index": o.Index, + "object": o.Object, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EmbeddingsV1ResponseEmbeddingElement_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "embedding": basetypes.ListType{ + ElemType: types.Float64Type, + }, + "index": types.Int64Type, + "object": types.StringType, + }, + } +} + +// GetEmbedding returns the value of the Embedding field in EmbeddingsV1ResponseEmbeddingElement_SdkV2 as +// a slice of types.Float64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EmbeddingsV1ResponseEmbeddingElement_SdkV2) GetEmbedding(ctx context.Context) ([]types.Float64, bool) { + if o.Embedding.IsNull() || o.Embedding.IsUnknown() { + return nil, false + } + var v []types.Float64 + d := o.Embedding.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbedding sets the value of the Embedding field in EmbeddingsV1ResponseEmbeddingElement_SdkV2. +func (o *EmbeddingsV1ResponseEmbeddingElement_SdkV2) SetEmbedding(ctx context.Context, v []types.Float64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["embedding"] + t = t.(attr.TypeWithElementType).ElementType() + o.Embedding = types.ListValueMust(t, vs) +} + +type EndpointCoreConfigInput_SdkV2 struct { + // Configuration for Inference Tables which automatically logs requests and + // responses to Unity Catalog. + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + // The name of the serving endpoint to update. This field is required. + Name types.String `tfsdk:"-"` + // A list of served entities for the endpoint to serve. A serving endpoint + // can have up to 15 served entities. + ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + // (Deprecated, use served_entities instead) A list of served models for the + // endpoint to serve. A serving endpoint can have up to 15 served models. + ServedModels types.List `tfsdk:"served_models" tf:"optional"` + // The traffic config defining how invocations to the serving endpoint + // should be routed. + TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` +} + +func (newState *EndpointCoreConfigInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigInput_SdkV2) { +} + +func (newState *EndpointCoreConfigInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointCoreConfigInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "auto_capture_config": reflect.TypeOf(AutoCaptureConfigInput_SdkV2{}), + "served_entities": reflect.TypeOf(ServedEntityInput_SdkV2{}), + "served_models": reflect.TypeOf(ServedModelInput_SdkV2{}), + "traffic_config": reflect.TypeOf(TrafficConfig_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, EndpointCoreConfigInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_capture_config": o.AutoCaptureConfig, + "name": o.Name, + "served_entities": o.ServedEntities, + "served_models": o.ServedModels, + "traffic_config": o.TrafficConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointCoreConfigInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_capture_config": basetypes.ListType{ + ElemType: AutoCaptureConfigInput{}.Type(ctx), + }, + "name": types.StringType, + "served_entities": basetypes.ListType{ + ElemType: ServedEntityInput{}.Type(ctx), + }, + "served_models": basetypes.ListType{ + ElemType: ServedModelInput{}.Type(ctx), + }, + "traffic_config": basetypes.ListType{ + ElemType: TrafficConfig{}.Type(ctx), + }, + }, + } +} + +// GetAutoCaptureConfig returns the value of the AutoCaptureConfig field in EndpointCoreConfigInput_SdkV2 as +// a AutoCaptureConfigInput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigInput_SdkV2) GetAutoCaptureConfig(ctx context.Context) (AutoCaptureConfigInput_SdkV2, bool) { + var e AutoCaptureConfigInput_SdkV2 + if o.AutoCaptureConfig.IsNull() || o.AutoCaptureConfig.IsUnknown() { + return e, false + } + var v []AutoCaptureConfigInput_SdkV2 + d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointCoreConfigInput_SdkV2. +func (o *EndpointCoreConfigInput_SdkV2) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigInput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] + o.AutoCaptureConfig = types.ListValueMust(t, vs) +} + +// GetServedEntities returns the value of the ServedEntities field in EndpointCoreConfigInput_SdkV2 as +// a slice of ServedEntityInput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigInput_SdkV2) GetServedEntities(ctx context.Context) ([]ServedEntityInput_SdkV2, bool) { + if o.ServedEntities.IsNull() || o.ServedEntities.IsUnknown() { + return nil, false + } + var v []ServedEntityInput_SdkV2 + d := o.ServedEntities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedEntities sets the value of the ServedEntities field in EndpointCoreConfigInput_SdkV2. +func (o *EndpointCoreConfigInput_SdkV2) SetServedEntities(ctx context.Context, v []ServedEntityInput_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["served_entities"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedEntities = types.ListValueMust(t, vs) +} + +// GetServedModels returns the value of the ServedModels field in EndpointCoreConfigInput_SdkV2 as +// a slice of ServedModelInput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigInput_SdkV2) GetServedModels(ctx context.Context) ([]ServedModelInput_SdkV2, bool) { + if o.ServedModels.IsNull() || o.ServedModels.IsUnknown() { + return nil, false + } + var v []ServedModelInput_SdkV2 + d := o.ServedModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedModels sets the value of the ServedModels field in EndpointCoreConfigInput_SdkV2. +func (o *EndpointCoreConfigInput_SdkV2) SetServedModels(ctx context.Context, v []ServedModelInput_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["served_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedModels = types.ListValueMust(t, vs) +} + +// GetTrafficConfig returns the value of the TrafficConfig field in EndpointCoreConfigInput_SdkV2 as +// a TrafficConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigInput_SdkV2) GetTrafficConfig(ctx context.Context) (TrafficConfig_SdkV2, bool) { + var e TrafficConfig_SdkV2 + if o.TrafficConfig.IsNull() || o.TrafficConfig.IsUnknown() { + return e, false + } + var v []TrafficConfig_SdkV2 + d := o.TrafficConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrafficConfig sets the value of the TrafficConfig field in EndpointCoreConfigInput_SdkV2. +func (o *EndpointCoreConfigInput_SdkV2) SetTrafficConfig(ctx context.Context, v TrafficConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] + o.TrafficConfig = types.ListValueMust(t, vs) +} + +type EndpointCoreConfigOutput_SdkV2 struct { + // Configuration for Inference Tables which automatically logs requests and + // responses to Unity Catalog. + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + // The config version that the serving endpoint is currently serving. + ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + // The list of served entities under the serving endpoint config. + ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + // (Deprecated, use served_entities instead) The list of served models under + // the serving endpoint config. + ServedModels types.List `tfsdk:"served_models" tf:"optional"` + // The traffic configuration associated with the serving endpoint config. + TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` +} + +func (newState *EndpointCoreConfigOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigOutput_SdkV2) { +} + +func (newState *EndpointCoreConfigOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointCoreConfigOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "auto_capture_config": reflect.TypeOf(AutoCaptureConfigOutput_SdkV2{}), + "served_entities": reflect.TypeOf(ServedEntityOutput_SdkV2{}), + "served_models": reflect.TypeOf(ServedModelOutput_SdkV2{}), + "traffic_config": reflect.TypeOf(TrafficConfig_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, EndpointCoreConfigOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_capture_config": o.AutoCaptureConfig, + "config_version": o.ConfigVersion, + "served_entities": o.ServedEntities, + "served_models": o.ServedModels, + "traffic_config": o.TrafficConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointCoreConfigOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_capture_config": basetypes.ListType{ + ElemType: AutoCaptureConfigOutput{}.Type(ctx), + }, + "config_version": types.Int64Type, + "served_entities": basetypes.ListType{ + ElemType: ServedEntityOutput{}.Type(ctx), + }, + "served_models": basetypes.ListType{ + ElemType: ServedModelOutput{}.Type(ctx), + }, + "traffic_config": basetypes.ListType{ + ElemType: TrafficConfig{}.Type(ctx), + }, + }, + } +} + +// GetAutoCaptureConfig returns the value of the AutoCaptureConfig field in EndpointCoreConfigOutput_SdkV2 as +// a AutoCaptureConfigOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigOutput_SdkV2) GetAutoCaptureConfig(ctx context.Context) (AutoCaptureConfigOutput_SdkV2, bool) { + var e AutoCaptureConfigOutput_SdkV2 + if o.AutoCaptureConfig.IsNull() || o.AutoCaptureConfig.IsUnknown() { + return e, false + } + var v []AutoCaptureConfigOutput_SdkV2 + d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointCoreConfigOutput_SdkV2. +func (o *EndpointCoreConfigOutput_SdkV2) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] + o.AutoCaptureConfig = types.ListValueMust(t, vs) +} + +// GetServedEntities returns the value of the ServedEntities field in EndpointCoreConfigOutput_SdkV2 as +// a slice of ServedEntityOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigOutput_SdkV2) GetServedEntities(ctx context.Context) ([]ServedEntityOutput_SdkV2, bool) { + if o.ServedEntities.IsNull() || o.ServedEntities.IsUnknown() { + return nil, false + } + var v []ServedEntityOutput_SdkV2 + d := o.ServedEntities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedEntities sets the value of the ServedEntities field in EndpointCoreConfigOutput_SdkV2. +func (o *EndpointCoreConfigOutput_SdkV2) SetServedEntities(ctx context.Context, v []ServedEntityOutput_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["served_entities"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedEntities = types.ListValueMust(t, vs) +} + +// GetServedModels returns the value of the ServedModels field in EndpointCoreConfigOutput_SdkV2 as +// a slice of ServedModelOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigOutput_SdkV2) GetServedModels(ctx context.Context) ([]ServedModelOutput_SdkV2, bool) { + if o.ServedModels.IsNull() || o.ServedModels.IsUnknown() { + return nil, false + } + var v []ServedModelOutput_SdkV2 + d := o.ServedModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedModels sets the value of the ServedModels field in EndpointCoreConfigOutput_SdkV2. +func (o *EndpointCoreConfigOutput_SdkV2) SetServedModels(ctx context.Context, v []ServedModelOutput_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["served_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedModels = types.ListValueMust(t, vs) +} + +// GetTrafficConfig returns the value of the TrafficConfig field in EndpointCoreConfigOutput_SdkV2 as +// a TrafficConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigOutput_SdkV2) GetTrafficConfig(ctx context.Context) (TrafficConfig_SdkV2, bool) { + var e TrafficConfig_SdkV2 + if o.TrafficConfig.IsNull() || o.TrafficConfig.IsUnknown() { + return e, false + } + var v []TrafficConfig_SdkV2 + d := o.TrafficConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrafficConfig sets the value of the TrafficConfig field in EndpointCoreConfigOutput_SdkV2. +func (o *EndpointCoreConfigOutput_SdkV2) SetTrafficConfig(ctx context.Context, v TrafficConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] + o.TrafficConfig = types.ListValueMust(t, vs) +} + +type EndpointCoreConfigSummary_SdkV2 struct { + // The list of served entities under the serving endpoint config. + ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + // (Deprecated, use served_entities instead) The list of served models under + // the serving endpoint config. + ServedModels types.List `tfsdk:"served_models" tf:"optional"` +} + +func (newState *EndpointCoreConfigSummary_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigSummary_SdkV2) { +} + +func (newState *EndpointCoreConfigSummary_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointCoreConfigSummary_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointCoreConfigSummary. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointCoreConfigSummary_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "served_entities": reflect.TypeOf(ServedEntitySpec_SdkV2{}), + "served_models": reflect.TypeOf(ServedModelSpec_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, EndpointCoreConfigSummary_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigSummary_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "served_entities": o.ServedEntities, + "served_models": o.ServedModels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointCoreConfigSummary_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "served_entities": basetypes.ListType{ + ElemType: ServedEntitySpec{}.Type(ctx), + }, + "served_models": basetypes.ListType{ + ElemType: ServedModelSpec{}.Type(ctx), + }, + }, + } +} + +// GetServedEntities returns the value of the ServedEntities field in EndpointCoreConfigSummary_SdkV2 as +// a slice of ServedEntitySpec_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigSummary_SdkV2) GetServedEntities(ctx context.Context) ([]ServedEntitySpec_SdkV2, bool) { + if o.ServedEntities.IsNull() || o.ServedEntities.IsUnknown() { + return nil, false + } + var v []ServedEntitySpec_SdkV2 + d := o.ServedEntities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedEntities sets the value of the ServedEntities field in EndpointCoreConfigSummary_SdkV2. +func (o *EndpointCoreConfigSummary_SdkV2) SetServedEntities(ctx context.Context, v []ServedEntitySpec_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["served_entities"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedEntities = types.ListValueMust(t, vs) +} + +// GetServedModels returns the value of the ServedModels field in EndpointCoreConfigSummary_SdkV2 as +// a slice of ServedModelSpec_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointCoreConfigSummary_SdkV2) GetServedModels(ctx context.Context) ([]ServedModelSpec_SdkV2, bool) { + if o.ServedModels.IsNull() || o.ServedModels.IsUnknown() { + return nil, false + } + var v []ServedModelSpec_SdkV2 + d := o.ServedModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedModels sets the value of the ServedModels field in EndpointCoreConfigSummary_SdkV2. +func (o *EndpointCoreConfigSummary_SdkV2) SetServedModels(ctx context.Context, v []ServedModelSpec_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["served_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedModels = types.ListValueMust(t, vs) +} + +type EndpointPendingConfig_SdkV2 struct { + // Configuration for Inference Tables which automatically logs requests and + // responses to Unity Catalog. + AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + // The config version that the serving endpoint is currently serving. + ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` + // The list of served entities belonging to the last issued update to the + // serving endpoint. + ServedEntities types.List `tfsdk:"served_entities" tf:"optional"` + // (Deprecated, use served_entities instead) The list of served models + // belonging to the last issued update to the serving endpoint. + ServedModels types.List `tfsdk:"served_models" tf:"optional"` + // The timestamp when the update to the pending config started. + StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` + // The traffic config defining how invocations to the serving endpoint + // should be routed. + TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` +} + +func (newState *EndpointPendingConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointPendingConfig_SdkV2) { +} + +func (newState *EndpointPendingConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointPendingConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointPendingConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointPendingConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "auto_capture_config": reflect.TypeOf(AutoCaptureConfigOutput_SdkV2{}), + "served_entities": reflect.TypeOf(ServedEntityOutput_SdkV2{}), + "served_models": reflect.TypeOf(ServedModelOutput_SdkV2{}), + "traffic_config": reflect.TypeOf(TrafficConfig_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, EndpointPendingConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointPendingConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_capture_config": o.AutoCaptureConfig, + "config_version": o.ConfigVersion, + "served_entities": o.ServedEntities, + "served_models": o.ServedModels, + "start_time": o.StartTime, + "traffic_config": o.TrafficConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointPendingConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_capture_config": basetypes.ListType{ + ElemType: AutoCaptureConfigOutput{}.Type(ctx), + }, + "config_version": types.Int64Type, + "served_entities": basetypes.ListType{ + ElemType: ServedEntityOutput{}.Type(ctx), + }, + "served_models": basetypes.ListType{ + ElemType: ServedModelOutput{}.Type(ctx), + }, + "start_time": types.Int64Type, + "traffic_config": basetypes.ListType{ + ElemType: TrafficConfig{}.Type(ctx), + }, + }, + } +} + +// GetAutoCaptureConfig returns the value of the AutoCaptureConfig field in EndpointPendingConfig_SdkV2 as +// a AutoCaptureConfigOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointPendingConfig_SdkV2) GetAutoCaptureConfig(ctx context.Context) (AutoCaptureConfigOutput_SdkV2, bool) { + var e AutoCaptureConfigOutput_SdkV2 + if o.AutoCaptureConfig.IsNull() || o.AutoCaptureConfig.IsUnknown() { + return e, false + } + var v []AutoCaptureConfigOutput_SdkV2 + d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointPendingConfig_SdkV2. +func (o *EndpointPendingConfig_SdkV2) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] + o.AutoCaptureConfig = types.ListValueMust(t, vs) +} + +// GetServedEntities returns the value of the ServedEntities field in EndpointPendingConfig_SdkV2 as +// a slice of ServedEntityOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointPendingConfig_SdkV2) GetServedEntities(ctx context.Context) ([]ServedEntityOutput_SdkV2, bool) { + if o.ServedEntities.IsNull() || o.ServedEntities.IsUnknown() { + return nil, false + } + var v []ServedEntityOutput_SdkV2 + d := o.ServedEntities.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedEntities sets the value of the ServedEntities field in EndpointPendingConfig_SdkV2. +func (o *EndpointPendingConfig_SdkV2) SetServedEntities(ctx context.Context, v []ServedEntityOutput_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["served_entities"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedEntities = types.ListValueMust(t, vs) +} + +// GetServedModels returns the value of the ServedModels field in EndpointPendingConfig_SdkV2 as +// a slice of ServedModelOutput_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointPendingConfig_SdkV2) GetServedModels(ctx context.Context) ([]ServedModelOutput_SdkV2, bool) { + if o.ServedModels.IsNull() || o.ServedModels.IsUnknown() { + return nil, false + } + var v []ServedModelOutput_SdkV2 + d := o.ServedModels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetServedModels sets the value of the ServedModels field in EndpointPendingConfig_SdkV2. +func (o *EndpointPendingConfig_SdkV2) SetServedModels(ctx context.Context, v []ServedModelOutput_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["served_models"] + t = t.(attr.TypeWithElementType).ElementType() + o.ServedModels = types.ListValueMust(t, vs) +} + +// GetTrafficConfig returns the value of the TrafficConfig field in EndpointPendingConfig_SdkV2 as +// a TrafficConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointPendingConfig_SdkV2) GetTrafficConfig(ctx context.Context) (TrafficConfig_SdkV2, bool) { + var e TrafficConfig_SdkV2 + if o.TrafficConfig.IsNull() || o.TrafficConfig.IsUnknown() { + return e, false + } + var v []TrafficConfig_SdkV2 + d := o.TrafficConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTrafficConfig sets the value of the TrafficConfig field in EndpointPendingConfig_SdkV2. +func (o *EndpointPendingConfig_SdkV2) SetTrafficConfig(ctx context.Context, v TrafficConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] + o.TrafficConfig = types.ListValueMust(t, vs) +} + +type EndpointState_SdkV2 struct { + // The state of an endpoint's config update. This informs the user if the + // pending_config is in progress, if the update failed, or if there is no + // update in progress. Note that if the endpoint's config_update state value + // is IN_PROGRESS, another update can not be made until the update completes + // or fails." + ConfigUpdate types.String `tfsdk:"config_update" tf:"optional"` + // The state of an endpoint, indicating whether or not the endpoint is + // queryable. An endpoint is READY if all of the served entities in its + // active configuration are ready. If any of the actively served entities + // are in a non-ready state, the endpoint state will be NOT_READY. + Ready types.String `tfsdk:"ready" tf:"optional"` +} + +func (newState *EndpointState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointState_SdkV2) { +} + +func (newState *EndpointState_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointState_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointState. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointState_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, EndpointState_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointState_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config_update": o.ConfigUpdate, + "ready": o.Ready, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointState_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config_update": types.StringType, + "ready": types.StringType, + }, + } +} + +type EndpointTag_SdkV2 struct { + // Key field for a serving endpoint tag. + Key types.String `tfsdk:"key" tf:""` + // Optional value field for a serving endpoint tag. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *EndpointTag_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTag_SdkV2) { +} + +func (newState *EndpointTag_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTag_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTag. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointTag_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, EndpointTag_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointTag_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 EndpointTag_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +// Get metrics of a serving endpoint +type ExportMetricsRequest_SdkV2 struct { + // The name of the serving endpoint to retrieve metrics for. This field is + // required. + Name types.String `tfsdk:"-"` +} + +func (newState *ExportMetricsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsRequest_SdkV2) { +} + +func (newState *ExportMetricsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportMetricsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportMetricsRequest_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, ExportMetricsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportMetricsRequest_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 ExportMetricsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type ExportMetricsResponse_SdkV2 struct { + Contents types.Object `tfsdk:"-"` +} + +func (newState *ExportMetricsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsResponse_SdkV2) { +} + +func (newState *ExportMetricsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportMetricsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportMetricsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportMetricsResponse_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, ExportMetricsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportMetricsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "contents": o.Contents, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExportMetricsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "contents": types.ObjectType{}, + }, + } +} + +type ExternalModel_SdkV2 struct { + // AI21Labs Config. Only required if the provider is 'ai21labs'. + Ai21labsConfig types.List `tfsdk:"ai21labs_config" tf:"optional,object"` + // Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. + AmazonBedrockConfig types.List `tfsdk:"amazon_bedrock_config" tf:"optional,object"` + // Anthropic Config. Only required if the provider is 'anthropic'. + AnthropicConfig types.List `tfsdk:"anthropic_config" tf:"optional,object"` + // Cohere Config. Only required if the provider is 'cohere'. + CohereConfig types.List `tfsdk:"cohere_config" tf:"optional,object"` + // Databricks Model Serving Config. Only required if the provider is + // 'databricks-model-serving'. + DatabricksModelServingConfig types.List `tfsdk:"databricks_model_serving_config" tf:"optional,object"` + // Google Cloud Vertex AI Config. Only required if the provider is + // 'google-cloud-vertex-ai'. + GoogleCloudVertexAiConfig types.List `tfsdk:"google_cloud_vertex_ai_config" tf:"optional,object"` + // The name of the external model. + Name types.String `tfsdk:"name" tf:""` + // OpenAI Config. Only required if the provider is 'openai'. + OpenaiConfig types.List `tfsdk:"openai_config" tf:"optional,object"` + // PaLM Config. Only required if the provider is 'palm'. + PalmConfig types.List `tfsdk:"palm_config" tf:"optional,object"` + // The name of the provider for the external model. Currently, the supported + // providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', + // 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and + // 'palm'.", + Provider types.String `tfsdk:"provider" tf:""` + // The task type of the external model. + Task types.String `tfsdk:"task" tf:""` +} + +func (newState *ExternalModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalModel_SdkV2) { +} + +func (newState *ExternalModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalModel_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModel. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExternalModel_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ai21labs_config": reflect.TypeOf(Ai21LabsConfig_SdkV2{}), + "amazon_bedrock_config": reflect.TypeOf(AmazonBedrockConfig_SdkV2{}), + "anthropic_config": reflect.TypeOf(AnthropicConfig_SdkV2{}), + "cohere_config": reflect.TypeOf(CohereConfig_SdkV2{}), + "databricks_model_serving_config": reflect.TypeOf(DatabricksModelServingConfig_SdkV2{}), + "google_cloud_vertex_ai_config": reflect.TypeOf(GoogleCloudVertexAiConfig_SdkV2{}), + "openai_config": reflect.TypeOf(OpenAiConfig_SdkV2{}), + "palm_config": reflect.TypeOf(PaLmConfig_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, ExternalModel_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalModel_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ai21labs_config": o.Ai21labsConfig, + "amazon_bedrock_config": o.AmazonBedrockConfig, + "anthropic_config": o.AnthropicConfig, + "cohere_config": o.CohereConfig, + "databricks_model_serving_config": o.DatabricksModelServingConfig, + "google_cloud_vertex_ai_config": o.GoogleCloudVertexAiConfig, + "name": o.Name, + "openai_config": o.OpenaiConfig, + "palm_config": o.PalmConfig, + "provider": o.Provider, + "task": o.Task, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalModel_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ai21labs_config": basetypes.ListType{ + ElemType: Ai21LabsConfig{}.Type(ctx), + }, + "amazon_bedrock_config": basetypes.ListType{ + ElemType: AmazonBedrockConfig{}.Type(ctx), + }, + "anthropic_config": basetypes.ListType{ + ElemType: AnthropicConfig{}.Type(ctx), + }, + "cohere_config": basetypes.ListType{ + ElemType: CohereConfig{}.Type(ctx), + }, + "databricks_model_serving_config": basetypes.ListType{ + ElemType: DatabricksModelServingConfig{}.Type(ctx), + }, + "google_cloud_vertex_ai_config": basetypes.ListType{ + ElemType: GoogleCloudVertexAiConfig{}.Type(ctx), + }, + "name": types.StringType, + "openai_config": basetypes.ListType{ + ElemType: OpenAiConfig{}.Type(ctx), + }, + "palm_config": basetypes.ListType{ + ElemType: PaLmConfig{}.Type(ctx), + }, + "provider": types.StringType, + "task": types.StringType, + }, + } +} + +// GetAi21labsConfig returns the value of the Ai21labsConfig field in ExternalModel_SdkV2 as +// a Ai21LabsConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetAi21labsConfig(ctx context.Context) (Ai21LabsConfig_SdkV2, bool) { + var e Ai21LabsConfig_SdkV2 + if o.Ai21labsConfig.IsNull() || o.Ai21labsConfig.IsUnknown() { + return e, false + } + var v []Ai21LabsConfig_SdkV2 + d := o.Ai21labsConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAi21labsConfig sets the value of the Ai21labsConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetAi21labsConfig(ctx context.Context, v Ai21LabsConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai21labs_config"] + o.Ai21labsConfig = types.ListValueMust(t, vs) +} + +// GetAmazonBedrockConfig returns the value of the AmazonBedrockConfig field in ExternalModel_SdkV2 as +// a AmazonBedrockConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetAmazonBedrockConfig(ctx context.Context) (AmazonBedrockConfig_SdkV2, bool) { + var e AmazonBedrockConfig_SdkV2 + if o.AmazonBedrockConfig.IsNull() || o.AmazonBedrockConfig.IsUnknown() { + return e, false + } + var v []AmazonBedrockConfig_SdkV2 + d := o.AmazonBedrockConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAmazonBedrockConfig sets the value of the AmazonBedrockConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetAmazonBedrockConfig(ctx context.Context, v AmazonBedrockConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["amazon_bedrock_config"] + o.AmazonBedrockConfig = types.ListValueMust(t, vs) +} + +// GetAnthropicConfig returns the value of the AnthropicConfig field in ExternalModel_SdkV2 as +// a AnthropicConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetAnthropicConfig(ctx context.Context) (AnthropicConfig_SdkV2, bool) { + var e AnthropicConfig_SdkV2 + if o.AnthropicConfig.IsNull() || o.AnthropicConfig.IsUnknown() { + return e, false + } + var v []AnthropicConfig_SdkV2 + d := o.AnthropicConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAnthropicConfig sets the value of the AnthropicConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetAnthropicConfig(ctx context.Context, v AnthropicConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["anthropic_config"] + o.AnthropicConfig = types.ListValueMust(t, vs) +} + +// GetCohereConfig returns the value of the CohereConfig field in ExternalModel_SdkV2 as +// a CohereConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetCohereConfig(ctx context.Context) (CohereConfig_SdkV2, bool) { + var e CohereConfig_SdkV2 + if o.CohereConfig.IsNull() || o.CohereConfig.IsUnknown() { + return e, false + } + var v []CohereConfig_SdkV2 + d := o.CohereConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCohereConfig sets the value of the CohereConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetCohereConfig(ctx context.Context, v CohereConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cohere_config"] + o.CohereConfig = types.ListValueMust(t, vs) +} + +// GetDatabricksModelServingConfig returns the value of the DatabricksModelServingConfig field in ExternalModel_SdkV2 as +// a DatabricksModelServingConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetDatabricksModelServingConfig(ctx context.Context) (DatabricksModelServingConfig_SdkV2, bool) { + var e DatabricksModelServingConfig_SdkV2 + if o.DatabricksModelServingConfig.IsNull() || o.DatabricksModelServingConfig.IsUnknown() { + return e, false + } + var v []DatabricksModelServingConfig_SdkV2 + d := o.DatabricksModelServingConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDatabricksModelServingConfig sets the value of the DatabricksModelServingConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetDatabricksModelServingConfig(ctx context.Context, v DatabricksModelServingConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_model_serving_config"] + o.DatabricksModelServingConfig = types.ListValueMust(t, vs) +} + +// GetGoogleCloudVertexAiConfig returns the value of the GoogleCloudVertexAiConfig field in ExternalModel_SdkV2 as +// a GoogleCloudVertexAiConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetGoogleCloudVertexAiConfig(ctx context.Context) (GoogleCloudVertexAiConfig_SdkV2, bool) { + var e GoogleCloudVertexAiConfig_SdkV2 + if o.GoogleCloudVertexAiConfig.IsNull() || o.GoogleCloudVertexAiConfig.IsUnknown() { + return e, false + } + var v []GoogleCloudVertexAiConfig_SdkV2 + d := o.GoogleCloudVertexAiConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGoogleCloudVertexAiConfig sets the value of the GoogleCloudVertexAiConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetGoogleCloudVertexAiConfig(ctx context.Context, v GoogleCloudVertexAiConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["google_cloud_vertex_ai_config"] + o.GoogleCloudVertexAiConfig = types.ListValueMust(t, vs) +} + +// GetOpenaiConfig returns the value of the OpenaiConfig field in ExternalModel_SdkV2 as +// a OpenAiConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetOpenaiConfig(ctx context.Context) (OpenAiConfig_SdkV2, bool) { + var e OpenAiConfig_SdkV2 + if o.OpenaiConfig.IsNull() || o.OpenaiConfig.IsUnknown() { + return e, false + } + var v []OpenAiConfig_SdkV2 + d := o.OpenaiConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOpenaiConfig sets the value of the OpenaiConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetOpenaiConfig(ctx context.Context, v OpenAiConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["openai_config"] + o.OpenaiConfig = types.ListValueMust(t, vs) +} + +// GetPalmConfig returns the value of the PalmConfig field in ExternalModel_SdkV2 as +// a PaLmConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExternalModel_SdkV2) GetPalmConfig(ctx context.Context) (PaLmConfig_SdkV2, bool) { + var e PaLmConfig_SdkV2 + if o.PalmConfig.IsNull() || o.PalmConfig.IsUnknown() { + return e, false + } + var v []PaLmConfig_SdkV2 + d := o.PalmConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPalmConfig sets the value of the PalmConfig field in ExternalModel_SdkV2. +func (o *ExternalModel_SdkV2) SetPalmConfig(ctx context.Context, v PaLmConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["palm_config"] + o.PalmConfig = types.ListValueMust(t, vs) +} + +type ExternalModelUsageElement_SdkV2 struct { + // The number of tokens in the chat/completions response. + CompletionTokens types.Int64 `tfsdk:"completion_tokens" tf:"optional"` + // The number of tokens in the prompt. + PromptTokens types.Int64 `tfsdk:"prompt_tokens" tf:"optional"` + // The total number of tokens in the prompt and response. + TotalTokens types.Int64 `tfsdk:"total_tokens" tf:"optional"` +} + +func (newState *ExternalModelUsageElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalModelUsageElement_SdkV2) { +} + +func (newState *ExternalModelUsageElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalModelUsageElement_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalModelUsageElement. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExternalModelUsageElement_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, ExternalModelUsageElement_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalModelUsageElement_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "completion_tokens": o.CompletionTokens, + "prompt_tokens": o.PromptTokens, + "total_tokens": o.TotalTokens, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalModelUsageElement_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "completion_tokens": types.Int64Type, + "prompt_tokens": types.Int64Type, + "total_tokens": types.Int64Type, + }, + } +} + +type FoundationModel_SdkV2 struct { + // The description of the foundation model. + Description types.String `tfsdk:"description" tf:"optional"` + // The display name of the foundation model. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The URL to the documentation of the foundation model. + Docs types.String `tfsdk:"docs" tf:"optional"` + // The name of the foundation model. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *FoundationModel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FoundationModel_SdkV2) { +} + +func (newState *FoundationModel_SdkV2) SyncEffectiveFieldsDuringRead(existingState FoundationModel_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FoundationModel. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FoundationModel_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, FoundationModel_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FoundationModel_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "display_name": o.DisplayName, + "docs": o.Docs, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FoundationModel_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "display_name": types.StringType, + "docs": types.StringType, + "name": types.StringType, + }, + } +} + +// Get the schema for a serving endpoint +type GetOpenApiRequest_SdkV2 struct { + // The name of the serving endpoint that the served model belongs to. This + // field is required. + Name types.String `tfsdk:"-"` +} + +func (newState *GetOpenApiRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiRequest_SdkV2) { +} + +func (newState *GetOpenApiRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOpenApiRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetOpenApiRequest_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, GetOpenApiRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetOpenApiRequest_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 GetOpenApiRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// The response is an OpenAPI spec in JSON format that typically includes fields +// like openapi, info, servers and paths, etc. +type GetOpenApiResponse_SdkV2 struct { +} + +func (newState *GetOpenApiResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetOpenApiResponse_SdkV2) { +} + +func (newState *GetOpenApiResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetOpenApiResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetOpenApiResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetOpenApiResponse_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, GetOpenApiResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetOpenApiResponse_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 GetOpenApiResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Get serving endpoint permission levels +type GetServingEndpointPermissionLevelsRequest_SdkV2 struct { + // The serving endpoint for which to get or manage permissions. + ServingEndpointId types.String `tfsdk:"-"` +} + +func (newState *GetServingEndpointPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetServingEndpointPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetServingEndpointPermissionLevelsRequest_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, GetServingEndpointPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "serving_endpoint_id": o.ServingEndpointId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetServingEndpointPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "serving_endpoint_id": types.StringType, + }, + } +} + +type GetServingEndpointPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetServingEndpointPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetServingEndpointPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetServingEndpointPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(ServingEndpointPermissionsDescription_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, GetServingEndpointPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetServingEndpointPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: ServingEndpointPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetServingEndpointPermissionLevelsResponse_SdkV2 as +// a slice of ServingEndpointPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetServingEndpointPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]ServingEndpointPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []ServingEndpointPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetServingEndpointPermissionLevelsResponse_SdkV2. +func (o *GetServingEndpointPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []ServingEndpointPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get serving endpoint permissions +type GetServingEndpointPermissionsRequest_SdkV2 struct { + // The serving endpoint for which to get or manage permissions. + ServingEndpointId types.String `tfsdk:"-"` +} + +func (newState *GetServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointPermissionsRequest_SdkV2) { +} + +func (newState *GetServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetServingEndpointPermissionsRequest_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, GetServingEndpointPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "serving_endpoint_id": o.ServingEndpointId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetServingEndpointPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "serving_endpoint_id": types.StringType, + }, + } +} + +// Get a single serving endpoint +type GetServingEndpointRequest_SdkV2 struct { + // The name of the serving endpoint. This field is required. + Name types.String `tfsdk:"-"` +} + +func (newState *GetServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServingEndpointRequest_SdkV2) { +} + +func (newState *GetServingEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServingEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServingEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetServingEndpointRequest_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, GetServingEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointRequest_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 GetServingEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GoogleCloudVertexAiConfig_SdkV2 struct { + // The Databricks secret key reference for a private key for the service + // account which has access to the Google Cloud Vertex AI Service. See [Best + // practices for managing service account keys]. If you prefer to paste your + // API key directly, see `private_key_plaintext`. You must provide an API + // key using one of the following fields: `private_key` or + // `private_key_plaintext` + // + // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys + PrivateKey types.String `tfsdk:"private_key" tf:"optional"` + // The private key for the service account which has access to the Google + // Cloud Vertex AI Service provided as a plaintext secret. See [Best + // practices for managing service account keys]. If you prefer to reference + // your key using Databricks Secrets, see `private_key`. You must provide an + // API key using one of the following fields: `private_key` or + // `private_key_plaintext`. + // + // [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys + PrivateKeyPlaintext types.String `tfsdk:"private_key_plaintext" tf:"optional"` + // This is the Google Cloud project id that the service account is + // associated with. + ProjectId types.String `tfsdk:"project_id" tf:"optional"` + // This is the region for the Google Cloud Vertex AI Service. See [supported + // regions] for more details. Some models are only available in specific + // regions. + // + // [supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations + Region types.String `tfsdk:"region" tf:"optional"` +} + +func (newState *GoogleCloudVertexAiConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GoogleCloudVertexAiConfig_SdkV2) { +} + +func (newState *GoogleCloudVertexAiConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GoogleCloudVertexAiConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GoogleCloudVertexAiConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GoogleCloudVertexAiConfig_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, GoogleCloudVertexAiConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GoogleCloudVertexAiConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "private_key": o.PrivateKey, + "private_key_plaintext": o.PrivateKeyPlaintext, + "project_id": o.ProjectId, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GoogleCloudVertexAiConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "private_key": types.StringType, + "private_key_plaintext": types.StringType, + "project_id": types.StringType, + "region": types.StringType, + }, + } +} + +type ListEndpointsResponse_SdkV2 struct { + // The list of endpoints. + Endpoints types.List `tfsdk:"endpoints" tf:"optional"` +} + +func (newState *ListEndpointsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsResponse_SdkV2) { +} + +func (newState *ListEndpointsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListEndpointsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "endpoints": reflect.TypeOf(ServingEndpoint_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, ListEndpointsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListEndpointsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoints": o.Endpoints, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListEndpointsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoints": basetypes.ListType{ + ElemType: ServingEndpoint{}.Type(ctx), + }, + }, + } +} + +// GetEndpoints returns the value of the Endpoints field in ListEndpointsResponse_SdkV2 as +// a slice of ServingEndpoint_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListEndpointsResponse_SdkV2) GetEndpoints(ctx context.Context) ([]ServingEndpoint_SdkV2, bool) { + if o.Endpoints.IsNull() || o.Endpoints.IsUnknown() { + return nil, false + } + var v []ServingEndpoint_SdkV2 + d := o.Endpoints.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEndpoints sets the value of the Endpoints field in ListEndpointsResponse_SdkV2. +func (o *ListEndpointsResponse_SdkV2) SetEndpoints(ctx context.Context, v []ServingEndpoint_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["endpoints"] + t = t.(attr.TypeWithElementType).ElementType() + o.Endpoints = types.ListValueMust(t, vs) +} + +// Get the latest logs for a served model +type LogsRequest_SdkV2 struct { + // The name of the serving endpoint that the served model belongs to. This + // field is required. + Name types.String `tfsdk:"-"` + // The name of the served model that logs will be retrieved for. This field + // is required. + ServedModelName types.String `tfsdk:"-"` +} + +func (newState *LogsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LogsRequest_SdkV2) { +} + +func (newState *LogsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState LogsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LogsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LogsRequest_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, LogsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LogsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "served_model_name": o.ServedModelName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LogsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "served_model_name": types.StringType, + }, + } +} + +type ModelDataPlaneInfo_SdkV2 struct { + // Information required to query DataPlane API 'query' endpoint. + QueryInfo types.List `tfsdk:"query_info" tf:"optional,object"` +} + +func (newState *ModelDataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDataPlaneInfo_SdkV2) { +} + +func (newState *ModelDataPlaneInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ModelDataPlaneInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ModelDataPlaneInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ModelDataPlaneInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query_info": reflect.TypeOf(oauth2_tf.DataPlaneInfo_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, ModelDataPlaneInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ModelDataPlaneInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_info": o.QueryInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ModelDataPlaneInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_info": basetypes.ListType{ + ElemType: oauth2_tf.DataPlaneInfo{}.Type(ctx), + }, + }, + } +} + +// GetQueryInfo returns the value of the QueryInfo field in ModelDataPlaneInfo_SdkV2 as +// a oauth2_tf.DataPlaneInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ModelDataPlaneInfo_SdkV2) GetQueryInfo(ctx context.Context) (oauth2_tf.DataPlaneInfo_SdkV2, bool) { + var e oauth2_tf.DataPlaneInfo_SdkV2 + if o.QueryInfo.IsNull() || o.QueryInfo.IsUnknown() { + return e, false + } + var v []oauth2_tf.DataPlaneInfo_SdkV2 + d := o.QueryInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueryInfo sets the value of the QueryInfo field in ModelDataPlaneInfo_SdkV2. +func (o *ModelDataPlaneInfo_SdkV2) SetQueryInfo(ctx context.Context, v oauth2_tf.DataPlaneInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_info"] + o.QueryInfo = types.ListValueMust(t, vs) +} + +type OpenAiConfig_SdkV2 struct { + // This field is only required for Azure AD OpenAI and is the Microsoft + // Entra Client ID. + MicrosoftEntraClientId types.String `tfsdk:"microsoft_entra_client_id" tf:"optional"` + // The Databricks secret key reference for a client secret used for + // Microsoft Entra ID authentication. If you prefer to paste your client + // secret directly, see `microsoft_entra_client_secret_plaintext`. You must + // provide an API key using one of the following fields: + // `microsoft_entra_client_secret` or + // `microsoft_entra_client_secret_plaintext`. + MicrosoftEntraClientSecret types.String `tfsdk:"microsoft_entra_client_secret" tf:"optional"` + // The client secret used for Microsoft Entra ID authentication provided as + // a plaintext string. If you prefer to reference your key using Databricks + // Secrets, see `microsoft_entra_client_secret`. You must provide an API key + // using one of the following fields: `microsoft_entra_client_secret` or + // `microsoft_entra_client_secret_plaintext`. + MicrosoftEntraClientSecretPlaintext types.String `tfsdk:"microsoft_entra_client_secret_plaintext" tf:"optional"` + // This field is only required for Azure AD OpenAI and is the Microsoft + // Entra Tenant ID. + MicrosoftEntraTenantId types.String `tfsdk:"microsoft_entra_tenant_id" tf:"optional"` + // This is a field to provide a customized base URl for the OpenAI API. For + // Azure OpenAI, this field is required, and is the base URL for the Azure + // OpenAI API service provided by Azure. For other OpenAI API types, this + // field is optional, and if left unspecified, the standard OpenAI base URL + // is used. + OpenaiApiBase types.String `tfsdk:"openai_api_base" tf:"optional"` + // The Databricks secret key reference for an OpenAI API key using the + // OpenAI or Azure service. If you prefer to paste your API key directly, + // see `openai_api_key_plaintext`. You must provide an API key using one of + // the following fields: `openai_api_key` or `openai_api_key_plaintext`. + OpenaiApiKey types.String `tfsdk:"openai_api_key" tf:"optional"` + // The OpenAI API key using the OpenAI or Azure service provided as a + // plaintext string. If you prefer to reference your key using Databricks + // Secrets, see `openai_api_key`. You must provide an API key using one of + // the following fields: `openai_api_key` or `openai_api_key_plaintext`. + OpenaiApiKeyPlaintext types.String `tfsdk:"openai_api_key_plaintext" tf:"optional"` + // This is an optional field to specify the type of OpenAI API to use. For + // Azure OpenAI, this field is required, and adjust this parameter to + // represent the preferred security access validation protocol. For access + // token validation, use azure. For authentication using Azure Active + // Directory (Azure AD) use, azuread. + OpenaiApiType types.String `tfsdk:"openai_api_type" tf:"optional"` + // This is an optional field to specify the OpenAI API version. For Azure + // OpenAI, this field is required, and is the version of the Azure OpenAI + // service to utilize, specified by a date. + OpenaiApiVersion types.String `tfsdk:"openai_api_version" tf:"optional"` + // This field is only required for Azure OpenAI and is the name of the + // deployment resource for the Azure OpenAI service. + OpenaiDeploymentName types.String `tfsdk:"openai_deployment_name" tf:"optional"` + // This is an optional field to specify the organization in OpenAI or Azure + // OpenAI. + OpenaiOrganization types.String `tfsdk:"openai_organization" tf:"optional"` +} + +func (newState *OpenAiConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OpenAiConfig_SdkV2) { +} + +func (newState *OpenAiConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState OpenAiConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OpenAiConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OpenAiConfig_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, OpenAiConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OpenAiConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "microsoft_entra_client_id": o.MicrosoftEntraClientId, + "microsoft_entra_client_secret": o.MicrosoftEntraClientSecret, + "microsoft_entra_client_secret_plaintext": o.MicrosoftEntraClientSecretPlaintext, + "microsoft_entra_tenant_id": o.MicrosoftEntraTenantId, + "openai_api_base": o.OpenaiApiBase, + "openai_api_key": o.OpenaiApiKey, + "openai_api_key_plaintext": o.OpenaiApiKeyPlaintext, + "openai_api_type": o.OpenaiApiType, + "openai_api_version": o.OpenaiApiVersion, + "openai_deployment_name": o.OpenaiDeploymentName, + "openai_organization": o.OpenaiOrganization, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OpenAiConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "microsoft_entra_client_id": types.StringType, + "microsoft_entra_client_secret": types.StringType, + "microsoft_entra_client_secret_plaintext": types.StringType, + "microsoft_entra_tenant_id": types.StringType, + "openai_api_base": types.StringType, + "openai_api_key": types.StringType, + "openai_api_key_plaintext": types.StringType, + "openai_api_type": types.StringType, + "openai_api_version": types.StringType, + "openai_deployment_name": types.StringType, + "openai_organization": types.StringType, + }, + } +} + +type PaLmConfig_SdkV2 struct { + // The Databricks secret key reference for a PaLM API key. If you prefer to + // paste your API key directly, see `palm_api_key_plaintext`. You must + // provide an API key using one of the following fields: `palm_api_key` or + // `palm_api_key_plaintext`. + PalmApiKey types.String `tfsdk:"palm_api_key" tf:"optional"` + // The PaLM API key provided as a plaintext string. If you prefer to + // reference your key using Databricks Secrets, see `palm_api_key`. You must + // provide an API key using one of the following fields: `palm_api_key` or + // `palm_api_key_plaintext`. + PalmApiKeyPlaintext types.String `tfsdk:"palm_api_key_plaintext" tf:"optional"` +} + +func (newState *PaLmConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PaLmConfig_SdkV2) { +} + +func (newState *PaLmConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState PaLmConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PaLmConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PaLmConfig_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, PaLmConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PaLmConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "palm_api_key": o.PalmApiKey, + "palm_api_key_plaintext": o.PalmApiKeyPlaintext, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PaLmConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "palm_api_key": types.StringType, + "palm_api_key_plaintext": types.StringType, + }, + } +} + +type PatchServingEndpointTags_SdkV2 struct { + // List of endpoint tags to add + AddTags types.List `tfsdk:"add_tags" tf:"optional"` + // List of tag keys to delete + DeleteTags types.List `tfsdk:"delete_tags" tf:"optional"` + // The name of the serving endpoint who's tags to patch. This field is + // required. + Name types.String `tfsdk:"-"` +} + +func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PatchServingEndpointTags_SdkV2) { +} + +func (newState *PatchServingEndpointTags_SdkV2) SyncEffectiveFieldsDuringRead(existingState PatchServingEndpointTags_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PatchServingEndpointTags_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "add_tags": reflect.TypeOf(EndpointTag_SdkV2{}), + "delete_tags": 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, PatchServingEndpointTags_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PatchServingEndpointTags_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "add_tags": o.AddTags, + "delete_tags": o.DeleteTags, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PatchServingEndpointTags_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "add_tags": basetypes.ListType{ + ElemType: EndpointTag{}.Type(ctx), + }, + "delete_tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "name": types.StringType, + }, + } +} + +// GetAddTags returns the value of the AddTags field in PatchServingEndpointTags_SdkV2 as +// a slice of EndpointTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PatchServingEndpointTags_SdkV2) GetAddTags(ctx context.Context) ([]EndpointTag_SdkV2, bool) { + if o.AddTags.IsNull() || o.AddTags.IsUnknown() { + return nil, false + } + var v []EndpointTag_SdkV2 + d := o.AddTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAddTags sets the value of the AddTags field in PatchServingEndpointTags_SdkV2. +func (o *PatchServingEndpointTags_SdkV2) SetAddTags(ctx context.Context, v []EndpointTag_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["add_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.AddTags = types.ListValueMust(t, vs) +} + +// GetDeleteTags returns the value of the DeleteTags field in PatchServingEndpointTags_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PatchServingEndpointTags_SdkV2) GetDeleteTags(ctx context.Context) ([]types.String, bool) { + if o.DeleteTags.IsNull() || o.DeleteTags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DeleteTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDeleteTags sets the value of the DeleteTags field in PatchServingEndpointTags_SdkV2. +func (o *PatchServingEndpointTags_SdkV2) SetDeleteTags(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["delete_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.DeleteTags = types.ListValueMust(t, vs) +} + +type PayloadTable_SdkV2 struct { + // The name of the payload table. + Name types.String `tfsdk:"name" tf:"optional"` + // The status of the payload table. + Status types.String `tfsdk:"status" tf:"optional"` + // The status message of the payload table. + StatusMessage types.String `tfsdk:"status_message" tf:"optional"` +} + +func (newState *PayloadTable_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PayloadTable_SdkV2) { +} + +func (newState *PayloadTable_SdkV2) SyncEffectiveFieldsDuringRead(existingState PayloadTable_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PayloadTable. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PayloadTable_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, PayloadTable_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PayloadTable_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "status": o.Status, + "status_message": o.StatusMessage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PayloadTable_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "status": types.StringType, + "status_message": types.StringType, + }, + } +} + +// Update AI Gateway of a serving endpoint +type PutAiGatewayRequest_SdkV2 struct { + // Configuration for AI Guardrails to prevent unwanted data and unsafe data + // in requests and responses. + Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + // Configuration for payload logging using inference tables. Use these + // tables to monitor and audit data being sent to and received from model + // APIs and to improve model quality. + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + // The name of the serving endpoint whose AI Gateway is being updated. This + // field is required. + Name types.String `tfsdk:"-"` + // Configuration for rate limits which can be set to limit endpoint traffic. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + // Configuration to enable usage tracking using system tables. These tables + // allow you to monitor operational usage on endpoints and their associated + // costs. + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` +} + +func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest_SdkV2) { +} + +func (newState *PutAiGatewayRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutAiGatewayRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "guardrails": reflect.TypeOf(AiGatewayGuardrails_SdkV2{}), + "inference_table_config": reflect.TypeOf(AiGatewayInferenceTableConfig_SdkV2{}), + "rate_limits": reflect.TypeOf(AiGatewayRateLimit_SdkV2{}), + "usage_tracking_config": reflect.TypeOf(AiGatewayUsageTrackingConfig_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, PutAiGatewayRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutAiGatewayRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "guardrails": o.Guardrails, + "inference_table_config": o.InferenceTableConfig, + "name": o.Name, + "rate_limits": o.RateLimits, + "usage_tracking_config": o.UsageTrackingConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutAiGatewayRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "guardrails": basetypes.ListType{ + ElemType: AiGatewayGuardrails{}.Type(ctx), + }, + "inference_table_config": basetypes.ListType{ + ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + }, + "name": types.StringType, + "rate_limits": basetypes.ListType{ + ElemType: AiGatewayRateLimit{}.Type(ctx), + }, + "usage_tracking_config": basetypes.ListType{ + ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + }, + }, + } +} + +// GetGuardrails returns the value of the Guardrails field in PutAiGatewayRequest_SdkV2 as +// a AiGatewayGuardrails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayRequest_SdkV2) GetGuardrails(ctx context.Context) (AiGatewayGuardrails_SdkV2, bool) { + var e AiGatewayGuardrails_SdkV2 + if o.Guardrails.IsNull() || o.Guardrails.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrails_SdkV2 + d := o.Guardrails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGuardrails sets the value of the Guardrails field in PutAiGatewayRequest_SdkV2. +func (o *PutAiGatewayRequest_SdkV2) SetGuardrails(ctx context.Context, v AiGatewayGuardrails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] + o.Guardrails = types.ListValueMust(t, vs) +} + +// GetInferenceTableConfig returns the value of the InferenceTableConfig field in PutAiGatewayRequest_SdkV2 as +// a AiGatewayInferenceTableConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayRequest_SdkV2) GetInferenceTableConfig(ctx context.Context) (AiGatewayInferenceTableConfig_SdkV2, bool) { + var e AiGatewayInferenceTableConfig_SdkV2 + if o.InferenceTableConfig.IsNull() || o.InferenceTableConfig.IsUnknown() { + return e, false + } + var v []AiGatewayInferenceTableConfig_SdkV2 + d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceTableConfig sets the value of the InferenceTableConfig field in PutAiGatewayRequest_SdkV2. +func (o *PutAiGatewayRequest_SdkV2) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] + o.InferenceTableConfig = types.ListValueMust(t, vs) +} + +// GetRateLimits returns the value of the RateLimits field in PutAiGatewayRequest_SdkV2 as +// a slice of AiGatewayRateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayRequest_SdkV2) GetRateLimits(ctx context.Context) ([]AiGatewayRateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []AiGatewayRateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in PutAiGatewayRequest_SdkV2. +func (o *PutAiGatewayRequest_SdkV2) SetRateLimits(ctx context.Context, v []AiGatewayRateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +// GetUsageTrackingConfig returns the value of the UsageTrackingConfig field in PutAiGatewayRequest_SdkV2 as +// a AiGatewayUsageTrackingConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayRequest_SdkV2) GetUsageTrackingConfig(ctx context.Context) (AiGatewayUsageTrackingConfig_SdkV2, bool) { + var e AiGatewayUsageTrackingConfig_SdkV2 + if o.UsageTrackingConfig.IsNull() || o.UsageTrackingConfig.IsUnknown() { + return e, false + } + var v []AiGatewayUsageTrackingConfig_SdkV2 + d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in PutAiGatewayRequest_SdkV2. +func (o *PutAiGatewayRequest_SdkV2) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] + o.UsageTrackingConfig = types.ListValueMust(t, vs) +} + +type PutAiGatewayResponse_SdkV2 struct { + // Configuration for AI Guardrails to prevent unwanted data and unsafe data + // in requests and responses. + Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + // Configuration for payload logging using inference tables. Use these + // tables to monitor and audit data being sent to and received from model + // APIs and to improve model quality . + InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + // Configuration for rate limits which can be set to limit endpoint traffic. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` + // Configuration to enable usage tracking using system tables. These tables + // allow you to monitor operational usage on endpoints and their associated + // costs. + UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` +} + +func (newState *PutAiGatewayResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayResponse_SdkV2) { +} + +func (newState *PutAiGatewayResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAiGatewayResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAiGatewayResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutAiGatewayResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "guardrails": reflect.TypeOf(AiGatewayGuardrails_SdkV2{}), + "inference_table_config": reflect.TypeOf(AiGatewayInferenceTableConfig_SdkV2{}), + "rate_limits": reflect.TypeOf(AiGatewayRateLimit_SdkV2{}), + "usage_tracking_config": reflect.TypeOf(AiGatewayUsageTrackingConfig_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, PutAiGatewayResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutAiGatewayResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "guardrails": o.Guardrails, + "inference_table_config": o.InferenceTableConfig, + "rate_limits": o.RateLimits, + "usage_tracking_config": o.UsageTrackingConfig, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutAiGatewayResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "guardrails": basetypes.ListType{ + ElemType: AiGatewayGuardrails{}.Type(ctx), + }, + "inference_table_config": basetypes.ListType{ + ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + }, + "rate_limits": basetypes.ListType{ + ElemType: AiGatewayRateLimit{}.Type(ctx), + }, + "usage_tracking_config": basetypes.ListType{ + ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + }, + }, + } +} + +// GetGuardrails returns the value of the Guardrails field in PutAiGatewayResponse_SdkV2 as +// a AiGatewayGuardrails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayResponse_SdkV2) GetGuardrails(ctx context.Context) (AiGatewayGuardrails_SdkV2, bool) { + var e AiGatewayGuardrails_SdkV2 + if o.Guardrails.IsNull() || o.Guardrails.IsUnknown() { + return e, false + } + var v []AiGatewayGuardrails_SdkV2 + d := o.Guardrails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGuardrails sets the value of the Guardrails field in PutAiGatewayResponse_SdkV2. +func (o *PutAiGatewayResponse_SdkV2) SetGuardrails(ctx context.Context, v AiGatewayGuardrails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] + o.Guardrails = types.ListValueMust(t, vs) +} + +// GetInferenceTableConfig returns the value of the InferenceTableConfig field in PutAiGatewayResponse_SdkV2 as +// a AiGatewayInferenceTableConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayResponse_SdkV2) GetInferenceTableConfig(ctx context.Context) (AiGatewayInferenceTableConfig_SdkV2, bool) { + var e AiGatewayInferenceTableConfig_SdkV2 + if o.InferenceTableConfig.IsNull() || o.InferenceTableConfig.IsUnknown() { + return e, false + } + var v []AiGatewayInferenceTableConfig_SdkV2 + d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInferenceTableConfig sets the value of the InferenceTableConfig field in PutAiGatewayResponse_SdkV2. +func (o *PutAiGatewayResponse_SdkV2) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] + o.InferenceTableConfig = types.ListValueMust(t, vs) +} + +// GetRateLimits returns the value of the RateLimits field in PutAiGatewayResponse_SdkV2 as +// a slice of AiGatewayRateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayResponse_SdkV2) GetRateLimits(ctx context.Context) ([]AiGatewayRateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []AiGatewayRateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in PutAiGatewayResponse_SdkV2. +func (o *PutAiGatewayResponse_SdkV2) SetRateLimits(ctx context.Context, v []AiGatewayRateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +// GetUsageTrackingConfig returns the value of the UsageTrackingConfig field in PutAiGatewayResponse_SdkV2 as +// a AiGatewayUsageTrackingConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PutAiGatewayResponse_SdkV2) GetUsageTrackingConfig(ctx context.Context) (AiGatewayUsageTrackingConfig_SdkV2, bool) { + var e AiGatewayUsageTrackingConfig_SdkV2 + if o.UsageTrackingConfig.IsNull() || o.UsageTrackingConfig.IsUnknown() { + return e, false + } + var v []AiGatewayUsageTrackingConfig_SdkV2 + d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in PutAiGatewayResponse_SdkV2. +func (o *PutAiGatewayResponse_SdkV2) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] + o.UsageTrackingConfig = types.ListValueMust(t, vs) +} + +// Update rate limits of a serving endpoint +type PutRequest_SdkV2 struct { + // The name of the serving endpoint whose rate limits are being updated. + // This field is required. + Name types.String `tfsdk:"-"` + // The list of endpoint rate limits. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` +} + +func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutRequest_SdkV2) { +} + +func (newState *PutRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "rate_limits": reflect.TypeOf(RateLimit_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, PutRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "rate_limits": o.RateLimits, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "rate_limits": basetypes.ListType{ + ElemType: RateLimit{}.Type(ctx), + }, + }, + } +} + +// GetRateLimits returns the value of the RateLimits field in PutRequest_SdkV2 as +// a slice of RateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PutRequest_SdkV2) GetRateLimits(ctx context.Context) ([]RateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []RateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in PutRequest_SdkV2. +func (o *PutRequest_SdkV2) SetRateLimits(ctx context.Context, v []RateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +type PutResponse_SdkV2 struct { + // The list of endpoint rate limits. + RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` +} + +func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutResponse_SdkV2) { +} + +func (newState *PutResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PutResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "rate_limits": reflect.TypeOf(RateLimit_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, PutResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "rate_limits": o.RateLimits, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "rate_limits": basetypes.ListType{ + ElemType: RateLimit{}.Type(ctx), + }, + }, + } +} + +// GetRateLimits returns the value of the RateLimits field in PutResponse_SdkV2 as +// a slice of RateLimit_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PutResponse_SdkV2) GetRateLimits(ctx context.Context) ([]RateLimit_SdkV2, bool) { + if o.RateLimits.IsNull() || o.RateLimits.IsUnknown() { + return nil, false + } + var v []RateLimit_SdkV2 + d := o.RateLimits.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRateLimits sets the value of the RateLimits field in PutResponse_SdkV2. +func (o *PutResponse_SdkV2) SetRateLimits(ctx context.Context, v []RateLimit_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["rate_limits"] + t = t.(attr.TypeWithElementType).ElementType() + o.RateLimits = types.ListValueMust(t, vs) +} + +type QueryEndpointInput_SdkV2 struct { + // Pandas Dataframe input in the records orientation. + DataframeRecords types.List `tfsdk:"dataframe_records" tf:"optional"` + // Pandas Dataframe input in the split orientation. + DataframeSplit types.List `tfsdk:"dataframe_split" tf:"optional,object"` + // The extra parameters field used ONLY for __completions, chat,__ and + // __embeddings external & foundation model__ serving endpoints. This is a + // map of strings and should only be used with other external/foundation + // model query fields. + ExtraParams types.Map `tfsdk:"extra_params" tf:"optional"` + // The input string (or array of strings) field used ONLY for __embeddings + // external & foundation model__ serving endpoints and is the only field + // (along with extra_params if needed) used by embeddings queries. + Input types.Object `tfsdk:"input" tf:"optional"` + // Tensor-based input in columnar format. + Inputs types.Object `tfsdk:"inputs" tf:"optional"` + // Tensor-based input in row format. + Instances types.List `tfsdk:"instances" tf:"optional"` + // The max tokens field used ONLY for __completions__ and __chat external & + // foundation model__ serving endpoints. This is an integer and should only + // be used with other chat/completions query fields. + MaxTokens types.Int64 `tfsdk:"max_tokens" tf:"optional"` + // The messages field used ONLY for __chat external & foundation model__ + // serving endpoints. This is a map of strings and should only be used with + // other chat query fields. + Messages types.List `tfsdk:"messages" tf:"optional"` + // The n (number of candidates) field used ONLY for __completions__ and + // __chat external & foundation model__ serving endpoints. This is an + // integer between 1 and 5 with a default of 1 and should only be used with + // other chat/completions query fields. + N types.Int64 `tfsdk:"n" tf:"optional"` + // The name of the serving endpoint. This field is required. + Name types.String `tfsdk:"-"` + // The prompt string (or array of strings) field used ONLY for __completions + // external & foundation model__ serving endpoints and should only be used + // with other completions query fields. + Prompt types.Object `tfsdk:"prompt" tf:"optional"` + // The stop sequences field used ONLY for __completions__ and __chat + // external & foundation model__ serving endpoints. This is a list of + // strings and should only be used with other chat/completions query fields. + Stop types.List `tfsdk:"stop" tf:"optional"` + // The stream field used ONLY for __completions__ and __chat external & + // foundation model__ serving endpoints. This is a boolean defaulting to + // false and should only be used with other chat/completions query fields. + Stream types.Bool `tfsdk:"stream" tf:"optional"` + // The temperature field used ONLY for __completions__ and __chat external & + // foundation model__ serving endpoints. This is a float between 0.0 and 2.0 + // with a default of 1.0 and should only be used with other chat/completions + // query fields. + Temperature types.Float64 `tfsdk:"temperature" tf:"optional"` +} + +func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointInput_SdkV2) { +} + +func (newState *QueryEndpointInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEndpointInput_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryEndpointInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "dataframe_records": reflect.TypeOf(types.Object{}), + "dataframe_split": reflect.TypeOf(DataframeSplitInput_SdkV2{}), + "extra_params": reflect.TypeOf(types.String{}), + "instances": reflect.TypeOf(types.Object{}), + "messages": reflect.TypeOf(ChatMessage_SdkV2{}), + "stop": 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, QueryEndpointInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryEndpointInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dataframe_records": o.DataframeRecords, + "dataframe_split": o.DataframeSplit, + "extra_params": o.ExtraParams, + "input": o.Input, + "inputs": o.Inputs, + "instances": o.Instances, + "max_tokens": o.MaxTokens, + "messages": o.Messages, + "n": o.N, + "name": o.Name, + "prompt": o.Prompt, + "stop": o.Stop, + "stream": o.Stream, + "temperature": o.Temperature, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryEndpointInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dataframe_records": basetypes.ListType{ + ElemType: types.ObjectType{}, + }, + "dataframe_split": basetypes.ListType{ + ElemType: DataframeSplitInput{}.Type(ctx), + }, + "extra_params": basetypes.MapType{ + ElemType: types.StringType, + }, + "input": types.ObjectType{}, + "inputs": types.ObjectType{}, + "instances": basetypes.ListType{ + ElemType: types.ObjectType{}, + }, + "max_tokens": types.Int64Type, + "messages": basetypes.ListType{ + ElemType: ChatMessage{}.Type(ctx), + }, + "n": types.Int64Type, + "name": types.StringType, + "prompt": types.ObjectType{}, + "stop": basetypes.ListType{ + ElemType: types.StringType, + }, + "stream": types.BoolType, + "temperature": types.Float64Type, + }, + } +} + +// GetDataframeRecords returns the value of the DataframeRecords field in QueryEndpointInput_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointInput_SdkV2) GetDataframeRecords(ctx context.Context) ([]types.Object, bool) { + if o.DataframeRecords.IsNull() || o.DataframeRecords.IsUnknown() { + return nil, false + } + var v []types.Object + d := o.DataframeRecords.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataframeRecords sets the value of the DataframeRecords field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetDataframeRecords(ctx context.Context, v []types.Object) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dataframe_records"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataframeRecords = types.ListValueMust(t, vs) +} + +// GetDataframeSplit returns the value of the DataframeSplit field in QueryEndpointInput_SdkV2 as +// a DataframeSplitInput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointInput_SdkV2) GetDataframeSplit(ctx context.Context) (DataframeSplitInput_SdkV2, bool) { + var e DataframeSplitInput_SdkV2 + if o.DataframeSplit.IsNull() || o.DataframeSplit.IsUnknown() { + return e, false + } + var v []DataframeSplitInput_SdkV2 + d := o.DataframeSplit.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataframeSplit sets the value of the DataframeSplit field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetDataframeSplit(ctx context.Context, v DataframeSplitInput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dataframe_split"] + o.DataframeSplit = types.ListValueMust(t, vs) +} + +// GetExtraParams returns the value of the ExtraParams field in QueryEndpointInput_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 *QueryEndpointInput_SdkV2) GetExtraParams(ctx context.Context) (map[string]types.String, bool) { + if o.ExtraParams.IsNull() || o.ExtraParams.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.ExtraParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExtraParams sets the value of the ExtraParams field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetExtraParams(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["extra_params"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExtraParams = types.MapValueMust(t, vs) +} + +// GetInstances returns the value of the Instances field in QueryEndpointInput_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointInput_SdkV2) GetInstances(ctx context.Context) ([]types.Object, bool) { + if o.Instances.IsNull() || o.Instances.IsUnknown() { + return nil, false + } + var v []types.Object + d := o.Instances.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInstances sets the value of the Instances field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetInstances(ctx context.Context, v []types.Object) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["instances"] + t = t.(attr.TypeWithElementType).ElementType() + o.Instances = types.ListValueMust(t, vs) +} + +// GetMessages returns the value of the Messages field in QueryEndpointInput_SdkV2 as +// a slice of ChatMessage_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointInput_SdkV2) GetMessages(ctx context.Context) ([]ChatMessage_SdkV2, bool) { + if o.Messages.IsNull() || o.Messages.IsUnknown() { + return nil, false + } + var v []ChatMessage_SdkV2 + d := o.Messages.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetMessages sets the value of the Messages field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetMessages(ctx context.Context, v []ChatMessage_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["messages"] + t = t.(attr.TypeWithElementType).ElementType() + o.Messages = types.ListValueMust(t, vs) +} + +// GetStop returns the value of the Stop field in QueryEndpointInput_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointInput_SdkV2) GetStop(ctx context.Context) ([]types.String, bool) { + if o.Stop.IsNull() || o.Stop.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Stop.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStop sets the value of the Stop field in QueryEndpointInput_SdkV2. +func (o *QueryEndpointInput_SdkV2) SetStop(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["stop"] + t = t.(attr.TypeWithElementType).ElementType() + o.Stop = types.ListValueMust(t, vs) +} + +type QueryEndpointResponse_SdkV2 struct { + // The list of choices returned by the __chat or completions + // external/foundation model__ serving endpoint. + Choices types.List `tfsdk:"choices" tf:"optional"` + // The timestamp in seconds when the query was created in Unix time returned + // by a __completions or chat external/foundation model__ serving endpoint. + Created types.Int64 `tfsdk:"created" tf:"optional"` + // The list of the embeddings returned by the __embeddings + // external/foundation model__ serving endpoint. + Data types.List `tfsdk:"data" tf:"optional"` + // The ID of the query that may be returned by a __completions or chat + // external/foundation model__ serving endpoint. + Id types.String `tfsdk:"id" tf:"optional"` + // The name of the __external/foundation model__ used for querying. This is + // the name of the model that was specified in the endpoint config. + Model types.String `tfsdk:"model" tf:"optional"` + // The type of object returned by the __external/foundation model__ serving + // endpoint, one of [text_completion, chat.completion, list (of + // embeddings)]. + Object types.String `tfsdk:"object" tf:"optional"` + // The predictions returned by the serving endpoint. + Predictions types.List `tfsdk:"predictions" tf:"optional"` + // The name of the served model that served the request. This is useful when + // there are multiple models behind the same endpoint with traffic split. + ServedModelName types.String `tfsdk:"-"` + // The usage object that may be returned by the __external/foundation + // model__ serving endpoint. This contains information about the number of + // tokens used in the prompt and response. + Usage types.List `tfsdk:"usage" tf:"optional,object"` +} + +func (newState *QueryEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointResponse_SdkV2) { +} + +func (newState *QueryEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEndpointResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryEndpointResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryEndpointResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "choices": reflect.TypeOf(V1ResponseChoiceElement_SdkV2{}), + "data": reflect.TypeOf(EmbeddingsV1ResponseEmbeddingElement_SdkV2{}), + "predictions": reflect.TypeOf(types.Object{}), + "usage": reflect.TypeOf(ExternalModelUsageElement_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, QueryEndpointResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryEndpointResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "choices": o.Choices, + "created": o.Created, + "data": o.Data, + "id": o.Id, + "model": o.Model, + "object": o.Object, + "predictions": o.Predictions, + "served-model-name": o.ServedModelName, + "usage": o.Usage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "choices": basetypes.ListType{ + ElemType: V1ResponseChoiceElement{}.Type(ctx), + }, + "created": types.Int64Type, + "data": basetypes.ListType{ + ElemType: EmbeddingsV1ResponseEmbeddingElement{}.Type(ctx), + }, + "id": types.StringType, + "model": types.StringType, + "object": types.StringType, + "predictions": basetypes.ListType{ + ElemType: types.ObjectType{}, + }, + "served-model-name": types.StringType, + "usage": basetypes.ListType{ + ElemType: ExternalModelUsageElement{}.Type(ctx), + }, + }, + } +} + +// GetChoices returns the value of the Choices field in QueryEndpointResponse_SdkV2 as +// a slice of V1ResponseChoiceElement_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointResponse_SdkV2) GetChoices(ctx context.Context) ([]V1ResponseChoiceElement_SdkV2, bool) { + if o.Choices.IsNull() || o.Choices.IsUnknown() { + return nil, false + } + var v []V1ResponseChoiceElement_SdkV2 + d := o.Choices.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChoices sets the value of the Choices field in QueryEndpointResponse_SdkV2. +func (o *QueryEndpointResponse_SdkV2) SetChoices(ctx context.Context, v []V1ResponseChoiceElement_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["choices"] + t = t.(attr.TypeWithElementType).ElementType() + o.Choices = types.ListValueMust(t, vs) +} + +// GetData returns the value of the Data field in QueryEndpointResponse_SdkV2 as +// a slice of EmbeddingsV1ResponseEmbeddingElement_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointResponse_SdkV2) GetData(ctx context.Context) ([]EmbeddingsV1ResponseEmbeddingElement_SdkV2, bool) { + if o.Data.IsNull() || o.Data.IsUnknown() { + return nil, false + } + var v []EmbeddingsV1ResponseEmbeddingElement_SdkV2 + d := o.Data.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetData sets the value of the Data field in QueryEndpointResponse_SdkV2. +func (o *QueryEndpointResponse_SdkV2) SetData(ctx context.Context, v []EmbeddingsV1ResponseEmbeddingElement_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["data"] + t = t.(attr.TypeWithElementType).ElementType() + o.Data = types.ListValueMust(t, vs) +} + +// GetPredictions returns the value of the Predictions field in QueryEndpointResponse_SdkV2 as +// a slice of types.Object values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointResponse_SdkV2) GetPredictions(ctx context.Context) ([]types.Object, bool) { + if o.Predictions.IsNull() || o.Predictions.IsUnknown() { + return nil, false + } + var v []types.Object + d := o.Predictions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPredictions sets the value of the Predictions field in QueryEndpointResponse_SdkV2. +func (o *QueryEndpointResponse_SdkV2) SetPredictions(ctx context.Context, v []types.Object) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["predictions"] + t = t.(attr.TypeWithElementType).ElementType() + o.Predictions = types.ListValueMust(t, vs) +} + +// GetUsage returns the value of the Usage field in QueryEndpointResponse_SdkV2 as +// a ExternalModelUsageElement_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEndpointResponse_SdkV2) GetUsage(ctx context.Context) (ExternalModelUsageElement_SdkV2, bool) { + var e ExternalModelUsageElement_SdkV2 + if o.Usage.IsNull() || o.Usage.IsUnknown() { + return e, false + } + var v []ExternalModelUsageElement_SdkV2 + d := o.Usage.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUsage sets the value of the Usage field in QueryEndpointResponse_SdkV2. +func (o *QueryEndpointResponse_SdkV2) SetUsage(ctx context.Context, v ExternalModelUsageElement_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage"] + o.Usage = types.ListValueMust(t, vs) +} + +type RateLimit_SdkV2 struct { + // Used to specify how many calls are allowed for a key within the + // renewal_period. + Calls types.Int64 `tfsdk:"calls" tf:""` + // Key field for a serving endpoint rate limit. Currently, only 'user' and + // 'endpoint' are supported, with 'endpoint' being the default if not + // specified. + Key types.String `tfsdk:"key" tf:"optional"` + // Renewal period field for a serving endpoint rate limit. Currently, only + // 'minute' is supported. + RenewalPeriod types.String `tfsdk:"renewal_period" tf:""` +} + +func (newState *RateLimit_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RateLimit_SdkV2) { +} + +func (newState *RateLimit_SdkV2) SyncEffectiveFieldsDuringRead(existingState RateLimit_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RateLimit. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RateLimit_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, RateLimit_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RateLimit_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "calls": o.Calls, + "key": o.Key, + "renewal_period": o.RenewalPeriod, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RateLimit_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "calls": types.Int64Type, + "key": types.StringType, + "renewal_period": types.StringType, + }, + } +} + +type Route_SdkV2 struct { + // The name of the served model this route configures traffic for. + ServedModelName types.String `tfsdk:"served_model_name" tf:""` + // The percentage of endpoint traffic to send to this route. It must be an + // integer between 0 and 100 inclusive. + TrafficPercentage types.Int64 `tfsdk:"traffic_percentage" tf:""` +} + +func (newState *Route_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Route_SdkV2) { +} + +func (newState *Route_SdkV2) SyncEffectiveFieldsDuringRead(existingState Route_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Route. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Route_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, Route_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Route_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "served_model_name": o.ServedModelName, + "traffic_percentage": o.TrafficPercentage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Route_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "served_model_name": types.StringType, + "traffic_percentage": types.Int64Type, + }, + } +} + +type ServedEntityInput_SdkV2 struct { + // The name of the entity to be served. The entity may be a model in the + // Databricks Model Registry, a model in the Unity Catalog (UC), or a + // function of type FEATURE_SPEC in the UC. If it is a UC object, the full + // name of the object should be given in the form of + // __catalog_name__.__schema_name__.__model_name__. + EntityName types.String `tfsdk:"entity_name" tf:"optional"` + // The version of the model in Databricks Model Registry to be served or + // empty if the entity is a FEATURE_SPEC. + EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs used for serving this entity. Note: this is an + // experimental feature and subject to change. Example entity environment + // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": + // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": + // "{{secrets/my_scope2/my_key2}}"}` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + // The external model to be served. NOTE: Only one of external_model and + // (entity_name, entity_version, workload_size, workload_type, and + // scale_to_zero_enabled) can be specified with the latter set being used + // for custom model serving for a Databricks registered model. For an + // existing endpoint with external_model, it cannot be updated to an + // endpoint without external_model. If the endpoint is created without + // external_model, users cannot update it to add external_model later. The + // task type of all external models within an endpoint must be the same. + ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + // ARN of the instance profile that the served entity uses to access AWS + // resources. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // The maximum tokens per second that the endpoint can scale up to. + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + // The minimum tokens per second that the endpoint can scale down to. + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + // The name of a served entity. It must be unique across an endpoint. A + // served entity name can consist of alphanumeric characters, dashes, and + // underscores. If not specified for an external model, this field defaults + // to external_model.name, with '.' and ':' replaced with '-', and if not + // specified for other entities, it defaults to + // -. + Name types.String `tfsdk:"name" tf:"optional"` + // Whether the compute resources for the served entity should scale down to + // zero. + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + // The workload size of the served entity. The workload size corresponds to + // a range of provisioned concurrency that the compute autoscales between. A + // single unit of provisioned concurrency can process one request at a time. + // Valid workload sizes are "Small" (4 - 4 provisioned concurrency), + // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 + // provisioned concurrency). If scale-to-zero is enabled, the lower bound of + // the provisioned concurrency for each workload size is 0. + WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + // The workload type of the served entity. The workload type selects which + // type of compute to use in the endpoint. The default value for this + // parameter is "CPU". For deep learning workloads, GPU acceleration is + // available by selecting workload types like GPU_SMALL and others. See the + // available [GPU types]. + // + // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types + WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` +} + +func (newState *ServedEntityInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityInput_SdkV2) { +} + +func (newState *ServedEntityInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntityInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedEntityInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "environment_vars": reflect.TypeOf(types.String{}), + "external_model": reflect.TypeOf(ExternalModel_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, ServedEntityInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedEntityInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "entity_name": o.EntityName, + "entity_version": o.EntityVersion, + "environment_vars": o.EnvironmentVars, + "external_model": o.ExternalModel, + "instance_profile_arn": o.InstanceProfileArn, + "max_provisioned_throughput": o.MaxProvisionedThroughput, + "min_provisioned_throughput": o.MinProvisionedThroughput, + "name": o.Name, + "scale_to_zero_enabled": o.ScaleToZeroEnabled, + "workload_size": o.WorkloadSize, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedEntityInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "entity_name": types.StringType, + "entity_version": types.StringType, + "environment_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "external_model": basetypes.ListType{ + ElemType: ExternalModel{}.Type(ctx), + }, + "instance_profile_arn": types.StringType, + "max_provisioned_throughput": types.Int64Type, + "min_provisioned_throughput": types.Int64Type, + "name": types.StringType, + "scale_to_zero_enabled": types.BoolType, + "workload_size": types.StringType, + "workload_type": types.StringType, + }, + } +} + +// GetEnvironmentVars returns the value of the EnvironmentVars field in ServedEntityInput_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 *ServedEntityInput_SdkV2) GetEnvironmentVars(ctx context.Context) (map[string]types.String, bool) { + if o.EnvironmentVars.IsNull() || o.EnvironmentVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.EnvironmentVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironmentVars sets the value of the EnvironmentVars field in ServedEntityInput_SdkV2. +func (o *ServedEntityInput_SdkV2) SetEnvironmentVars(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["environment_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnvironmentVars = types.MapValueMust(t, vs) +} + +// GetExternalModel returns the value of the ExternalModel field in ServedEntityInput_SdkV2 as +// a ExternalModel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntityInput_SdkV2) GetExternalModel(ctx context.Context) (ExternalModel_SdkV2, bool) { + var e ExternalModel_SdkV2 + if o.ExternalModel.IsNull() || o.ExternalModel.IsUnknown() { + return e, false + } + var v []ExternalModel_SdkV2 + d := o.ExternalModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalModel sets the value of the ExternalModel field in ServedEntityInput_SdkV2. +func (o *ServedEntityInput_SdkV2) SetExternalModel(ctx context.Context, v ExternalModel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] + o.ExternalModel = types.ListValueMust(t, vs) +} + +type ServedEntityOutput_SdkV2 struct { + // The creation timestamp of the served entity in Unix time. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // The email of the user who created the served entity. + Creator types.String `tfsdk:"creator" tf:"optional"` + // The name of the entity served. The entity may be a model in the + // Databricks Model Registry, a model in the Unity Catalog (UC), or a + // function of type FEATURE_SPEC in the UC. If it is a UC object, the full + // name of the object is given in the form of + // __catalog_name__.__schema_name__.__model_name__. + EntityName types.String `tfsdk:"entity_name" tf:"optional"` + // The version of the served entity in Databricks Model Registry or empty if + // the entity is a FEATURE_SPEC. + EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs used for serving this entity. Note: this is an + // experimental feature and subject to change. Example entity environment + // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": + // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": + // "{{secrets/my_scope2/my_key2}}"}` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + // The external model that is served. NOTE: Only one of external_model, + // foundation_model, and (entity_name, entity_version, workload_size, + // workload_type, and scale_to_zero_enabled) is returned based on the + // endpoint type. + ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + // The foundation model that is served. NOTE: Only one of foundation_model, + // external_model, and (entity_name, entity_version, workload_size, + // workload_type, and scale_to_zero_enabled) is returned based on the + // endpoint type. + FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + // ARN of the instance profile that the served entity uses to access AWS + // resources. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // The maximum tokens per second that the endpoint can scale up to. + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + // The minimum tokens per second that the endpoint can scale down to. + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + // The name of the served entity. + Name types.String `tfsdk:"name" tf:"optional"` + // Whether the compute resources for the served entity should scale down to + // zero. + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + // Information corresponding to the state of the served entity. + State types.List `tfsdk:"state" tf:"optional,object"` + // The workload size of the served entity. The workload size corresponds to + // a range of provisioned concurrency that the compute autoscales between. A + // single unit of provisioned concurrency can process one request at a time. + // Valid workload sizes are "Small" (4 - 4 provisioned concurrency), + // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 + // provisioned concurrency). If scale-to-zero is enabled, the lower bound of + // the provisioned concurrency for each workload size will be 0. + WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + // The workload type of the served entity. The workload type selects which + // type of compute to use in the endpoint. The default value for this + // parameter is "CPU". For deep learning workloads, GPU acceleration is + // available by selecting workload types like GPU_SMALL and others. See the + // available [GPU types]. + // + // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types + WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` +} + +func (newState *ServedEntityOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntityOutput_SdkV2) { +} + +func (newState *ServedEntityOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntityOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntityOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedEntityOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "environment_vars": reflect.TypeOf(types.String{}), + "external_model": reflect.TypeOf(ExternalModel_SdkV2{}), + "foundation_model": reflect.TypeOf(FoundationModel_SdkV2{}), + "state": reflect.TypeOf(ServedModelState_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, ServedEntityOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedEntityOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "creator": o.Creator, + "entity_name": o.EntityName, + "entity_version": o.EntityVersion, + "environment_vars": o.EnvironmentVars, + "external_model": o.ExternalModel, + "foundation_model": o.FoundationModel, + "instance_profile_arn": o.InstanceProfileArn, + "max_provisioned_throughput": o.MaxProvisionedThroughput, + "min_provisioned_throughput": o.MinProvisionedThroughput, + "name": o.Name, + "scale_to_zero_enabled": o.ScaleToZeroEnabled, + "state": o.State, + "workload_size": o.WorkloadSize, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedEntityOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "entity_name": types.StringType, + "entity_version": types.StringType, + "environment_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "external_model": basetypes.ListType{ + ElemType: ExternalModel{}.Type(ctx), + }, + "foundation_model": basetypes.ListType{ + ElemType: FoundationModel{}.Type(ctx), + }, + "instance_profile_arn": types.StringType, + "max_provisioned_throughput": types.Int64Type, + "min_provisioned_throughput": types.Int64Type, + "name": types.StringType, + "scale_to_zero_enabled": types.BoolType, + "state": basetypes.ListType{ + ElemType: ServedModelState{}.Type(ctx), + }, + "workload_size": types.StringType, + "workload_type": types.StringType, + }, + } +} + +// GetEnvironmentVars returns the value of the EnvironmentVars field in ServedEntityOutput_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 *ServedEntityOutput_SdkV2) GetEnvironmentVars(ctx context.Context) (map[string]types.String, bool) { + if o.EnvironmentVars.IsNull() || o.EnvironmentVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.EnvironmentVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironmentVars sets the value of the EnvironmentVars field in ServedEntityOutput_SdkV2. +func (o *ServedEntityOutput_SdkV2) SetEnvironmentVars(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["environment_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnvironmentVars = types.MapValueMust(t, vs) +} + +// GetExternalModel returns the value of the ExternalModel field in ServedEntityOutput_SdkV2 as +// a ExternalModel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntityOutput_SdkV2) GetExternalModel(ctx context.Context) (ExternalModel_SdkV2, bool) { + var e ExternalModel_SdkV2 + if o.ExternalModel.IsNull() || o.ExternalModel.IsUnknown() { + return e, false + } + var v []ExternalModel_SdkV2 + d := o.ExternalModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalModel sets the value of the ExternalModel field in ServedEntityOutput_SdkV2. +func (o *ServedEntityOutput_SdkV2) SetExternalModel(ctx context.Context, v ExternalModel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] + o.ExternalModel = types.ListValueMust(t, vs) +} + +// GetFoundationModel returns the value of the FoundationModel field in ServedEntityOutput_SdkV2 as +// a FoundationModel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntityOutput_SdkV2) GetFoundationModel(ctx context.Context) (FoundationModel_SdkV2, bool) { + var e FoundationModel_SdkV2 + if o.FoundationModel.IsNull() || o.FoundationModel.IsUnknown() { + return e, false + } + var v []FoundationModel_SdkV2 + d := o.FoundationModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFoundationModel sets the value of the FoundationModel field in ServedEntityOutput_SdkV2. +func (o *ServedEntityOutput_SdkV2) SetFoundationModel(ctx context.Context, v FoundationModel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foundation_model"] + o.FoundationModel = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in ServedEntityOutput_SdkV2 as +// a ServedModelState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntityOutput_SdkV2) GetState(ctx context.Context) (ServedModelState_SdkV2, bool) { + var e ServedModelState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []ServedModelState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in ServedEntityOutput_SdkV2. +func (o *ServedEntityOutput_SdkV2) SetState(ctx context.Context, v ServedModelState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +type ServedEntitySpec_SdkV2 struct { + // The name of the entity served. The entity may be a model in the + // Databricks Model Registry, a model in the Unity Catalog (UC), or a + // function of type FEATURE_SPEC in the UC. If it is a UC object, the full + // name of the object is given in the form of + // __catalog_name__.__schema_name__.__model_name__. + EntityName types.String `tfsdk:"entity_name" tf:"optional"` + // The version of the served entity in Databricks Model Registry or empty if + // the entity is a FEATURE_SPEC. + EntityVersion types.String `tfsdk:"entity_version" tf:"optional"` + // The external model that is served. NOTE: Only one of external_model, + // foundation_model, and (entity_name, entity_version) is returned based on + // the endpoint type. + ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + // The foundation model that is served. NOTE: Only one of foundation_model, + // external_model, and (entity_name, entity_version) is returned based on + // the endpoint type. + FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + // The name of the served entity. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *ServedEntitySpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedEntitySpec_SdkV2) { +} + +func (newState *ServedEntitySpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedEntitySpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedEntitySpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedEntitySpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "external_model": reflect.TypeOf(ExternalModel_SdkV2{}), + "foundation_model": reflect.TypeOf(FoundationModel_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, ServedEntitySpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedEntitySpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "entity_name": o.EntityName, + "entity_version": o.EntityVersion, + "external_model": o.ExternalModel, + "foundation_model": o.FoundationModel, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedEntitySpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "entity_name": types.StringType, + "entity_version": types.StringType, + "external_model": basetypes.ListType{ + ElemType: ExternalModel{}.Type(ctx), + }, + "foundation_model": basetypes.ListType{ + ElemType: FoundationModel{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetExternalModel returns the value of the ExternalModel field in ServedEntitySpec_SdkV2 as +// a ExternalModel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntitySpec_SdkV2) GetExternalModel(ctx context.Context) (ExternalModel_SdkV2, bool) { + var e ExternalModel_SdkV2 + if o.ExternalModel.IsNull() || o.ExternalModel.IsUnknown() { + return e, false + } + var v []ExternalModel_SdkV2 + d := o.ExternalModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetExternalModel sets the value of the ExternalModel field in ServedEntitySpec_SdkV2. +func (o *ServedEntitySpec_SdkV2) SetExternalModel(ctx context.Context, v ExternalModel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] + o.ExternalModel = types.ListValueMust(t, vs) +} + +// GetFoundationModel returns the value of the FoundationModel field in ServedEntitySpec_SdkV2 as +// a FoundationModel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedEntitySpec_SdkV2) GetFoundationModel(ctx context.Context) (FoundationModel_SdkV2, bool) { + var e FoundationModel_SdkV2 + if o.FoundationModel.IsNull() || o.FoundationModel.IsUnknown() { + return e, false + } + var v []FoundationModel_SdkV2 + d := o.FoundationModel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFoundationModel sets the value of the FoundationModel field in ServedEntitySpec_SdkV2. +func (o *ServedEntitySpec_SdkV2) SetFoundationModel(ctx context.Context, v FoundationModel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foundation_model"] + o.FoundationModel = types.ListValueMust(t, vs) +} + +type ServedModelInput_SdkV2 struct { + // An object containing a set of optional, user-specified environment + // variable key-value pairs used for serving this model. Note: this is an + // experimental feature and subject to change. Example model environment + // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": + // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": + // "{{secrets/my_scope2/my_key2}}"}` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + // ARN of the instance profile that the served model will use to access AWS + // resources. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // The maximum tokens per second that the endpoint can scale up to. + MaxProvisionedThroughput types.Int64 `tfsdk:"max_provisioned_throughput" tf:"optional"` + // The minimum tokens per second that the endpoint can scale down to. + MinProvisionedThroughput types.Int64 `tfsdk:"min_provisioned_throughput" tf:"optional"` + // The name of the model in Databricks Model Registry to be served or if the + // model resides in Unity Catalog, the full name of model, in the form of + // __catalog_name__.__schema_name__.__model_name__. + ModelName types.String `tfsdk:"model_name" tf:""` + // The version of the model in Databricks Model Registry or Unity Catalog to + // be served. + ModelVersion types.String `tfsdk:"model_version" tf:""` + // The name of a served model. It must be unique across an endpoint. If not + // specified, this field will default to -. A + // served model name can consist of alphanumeric characters, dashes, and + // underscores. + Name types.String `tfsdk:"name" tf:"optional"` + // Whether the compute resources for the served model should scale down to + // zero. + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:""` + // The workload size of the served model. The workload size corresponds to a + // range of provisioned concurrency that the compute will autoscale between. + // A single unit of provisioned concurrency can process one request at a + // time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), + // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 + // provisioned concurrency). If scale-to-zero is enabled, the lower bound of + // the provisioned concurrency for each workload size will be 0. + WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + // The workload type of the served model. The workload type selects which + // type of compute to use in the endpoint. The default value for this + // parameter is "CPU". For deep learning workloads, GPU acceleration is + // available by selecting workload types like GPU_SMALL and others. See the + // available [GPU types]. + // + // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types + WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` +} + +func (newState *ServedModelInput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelInput_SdkV2) { +} + +func (newState *ServedModelInput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelInput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelInput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedModelInput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "environment_vars": 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, ServedModelInput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedModelInput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "environment_vars": o.EnvironmentVars, + "instance_profile_arn": o.InstanceProfileArn, + "max_provisioned_throughput": o.MaxProvisionedThroughput, + "min_provisioned_throughput": o.MinProvisionedThroughput, + "model_name": o.ModelName, + "model_version": o.ModelVersion, + "name": o.Name, + "scale_to_zero_enabled": o.ScaleToZeroEnabled, + "workload_size": o.WorkloadSize, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedModelInput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "environment_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "instance_profile_arn": types.StringType, + "max_provisioned_throughput": types.Int64Type, + "min_provisioned_throughput": types.Int64Type, + "model_name": types.StringType, + "model_version": types.StringType, + "name": types.StringType, + "scale_to_zero_enabled": types.BoolType, + "workload_size": types.StringType, + "workload_type": types.StringType, + }, + } +} + +// GetEnvironmentVars returns the value of the EnvironmentVars field in ServedModelInput_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 *ServedModelInput_SdkV2) GetEnvironmentVars(ctx context.Context) (map[string]types.String, bool) { + if o.EnvironmentVars.IsNull() || o.EnvironmentVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.EnvironmentVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironmentVars sets the value of the EnvironmentVars field in ServedModelInput_SdkV2. +func (o *ServedModelInput_SdkV2) SetEnvironmentVars(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["environment_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnvironmentVars = types.MapValueMust(t, vs) +} + +type ServedModelOutput_SdkV2 struct { + // The creation timestamp of the served model in Unix time. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // The email of the user who created the served model. + Creator types.String `tfsdk:"creator" tf:"optional"` + // An object containing a set of optional, user-specified environment + // variable key-value pairs used for serving this model. Note: this is an + // experimental feature and subject to change. Example model environment + // variables that refer to Databricks secrets: `{"OPENAI_API_KEY": + // "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": + // "{{secrets/my_scope2/my_key2}}"}` + EnvironmentVars types.Map `tfsdk:"environment_vars" tf:"optional"` + // ARN of the instance profile that the served model will use to access AWS + // resources. + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // The name of the model in Databricks Model Registry or the full name of + // the model in Unity Catalog. + ModelName types.String `tfsdk:"model_name" tf:"optional"` + // The version of the model in Databricks Model Registry or Unity Catalog to + // be served. + ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + // The name of the served model. + Name types.String `tfsdk:"name" tf:"optional"` + // Whether the compute resources for the Served Model should scale down to + // zero. + ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` + // Information corresponding to the state of the Served Model. + State types.List `tfsdk:"state" tf:"optional,object"` + // The workload size of the served model. The workload size corresponds to a + // range of provisioned concurrency that the compute will autoscale between. + // A single unit of provisioned concurrency can process one request at a + // time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), + // "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 + // provisioned concurrency). If scale-to-zero is enabled, the lower bound of + // the provisioned concurrency for each workload size will be 0. + WorkloadSize types.String `tfsdk:"workload_size" tf:"optional"` + // The workload type of the served model. The workload type selects which + // type of compute to use in the endpoint. The default value for this + // parameter is "CPU". For deep learning workloads, GPU acceleration is + // available by selecting workload types like GPU_SMALL and others. See the + // available [GPU types]. + // + // [GPU types]: https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types + WorkloadType types.String `tfsdk:"workload_type" tf:"optional"` +} + +func (newState *ServedModelOutput_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelOutput_SdkV2) { +} + +func (newState *ServedModelOutput_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelOutput_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelOutput. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedModelOutput_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "environment_vars": reflect.TypeOf(types.String{}), + "state": reflect.TypeOf(ServedModelState_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, ServedModelOutput_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedModelOutput_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "creator": o.Creator, + "environment_vars": o.EnvironmentVars, + "instance_profile_arn": o.InstanceProfileArn, + "model_name": o.ModelName, + "model_version": o.ModelVersion, + "name": o.Name, + "scale_to_zero_enabled": o.ScaleToZeroEnabled, + "state": o.State, + "workload_size": o.WorkloadSize, + "workload_type": o.WorkloadType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedModelOutput_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "environment_vars": basetypes.MapType{ + ElemType: types.StringType, + }, + "instance_profile_arn": types.StringType, + "model_name": types.StringType, + "model_version": types.StringType, + "name": types.StringType, + "scale_to_zero_enabled": types.BoolType, + "state": basetypes.ListType{ + ElemType: ServedModelState{}.Type(ctx), + }, + "workload_size": types.StringType, + "workload_type": types.StringType, + }, + } +} + +// GetEnvironmentVars returns the value of the EnvironmentVars field in ServedModelOutput_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 *ServedModelOutput_SdkV2) GetEnvironmentVars(ctx context.Context) (map[string]types.String, bool) { + if o.EnvironmentVars.IsNull() || o.EnvironmentVars.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.EnvironmentVars.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnvironmentVars sets the value of the EnvironmentVars field in ServedModelOutput_SdkV2. +func (o *ServedModelOutput_SdkV2) SetEnvironmentVars(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["environment_vars"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnvironmentVars = types.MapValueMust(t, vs) +} + +// GetState returns the value of the State field in ServedModelOutput_SdkV2 as +// a ServedModelState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServedModelOutput_SdkV2) GetState(ctx context.Context) (ServedModelState_SdkV2, bool) { + var e ServedModelState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []ServedModelState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in ServedModelOutput_SdkV2. +func (o *ServedModelOutput_SdkV2) SetState(ctx context.Context, v ServedModelState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +type ServedModelSpec_SdkV2 struct { + // The name of the model in Databricks Model Registry or the full name of + // the model in Unity Catalog. + ModelName types.String `tfsdk:"model_name" tf:"optional"` + // The version of the model in Databricks Model Registry or Unity Catalog to + // be served. + ModelVersion types.String `tfsdk:"model_version" tf:"optional"` + // The name of the served model. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *ServedModelSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelSpec_SdkV2) { +} + +func (newState *ServedModelSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedModelSpec_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, ServedModelSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedModelSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "model_name": o.ModelName, + "model_version": o.ModelVersion, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedModelSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "model_name": types.StringType, + "model_version": types.StringType, + "name": types.StringType, + }, + } +} + +type ServedModelState_SdkV2 struct { + // The state of the served entity deployment. DEPLOYMENT_CREATING indicates + // that the served entity is not ready yet because the deployment is still + // being created (i.e container image is building, model server is deploying + // for the first time, etc.). DEPLOYMENT_RECOVERING indicates that the + // served entity was previously in a ready state but no longer is and is + // attempting to recover. DEPLOYMENT_READY indicates that the served entity + // is ready to receive traffic. DEPLOYMENT_FAILED indicates that there was + // an error trying to bring up the served entity (e.g container image build + // failed, the model server failed to start due to a model loading error, + // etc.) DEPLOYMENT_ABORTED indicates that the deployment was terminated + // likely due to a failure in bringing up another served entity under the + // same endpoint and config version. + Deployment types.String `tfsdk:"deployment" tf:"optional"` + // More information about the state of the served entity, if available. + DeploymentStateMessage types.String `tfsdk:"deployment_state_message" tf:"optional"` +} + +func (newState *ServedModelState_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServedModelState_SdkV2) { +} + +func (newState *ServedModelState_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServedModelState_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServedModelState. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServedModelState_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, ServedModelState_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServedModelState_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "deployment": o.Deployment, + "deployment_state_message": o.DeploymentStateMessage, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServedModelState_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "deployment": types.StringType, + "deployment_state_message": types.StringType, + }, + } +} + +type ServerLogsResponse_SdkV2 struct { + // The most recent log lines of the model server processing invocation + // requests. + Logs types.String `tfsdk:"logs" tf:""` +} + +func (newState *ServerLogsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServerLogsResponse_SdkV2) { +} + +func (newState *ServerLogsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServerLogsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServerLogsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServerLogsResponse_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, ServerLogsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServerLogsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "logs": o.Logs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServerLogsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "logs": types.StringType, + }, + } +} + +type ServingEndpoint_SdkV2 struct { + // The AI Gateway configuration for the serving endpoint. NOTE: Only + // external model endpoints are currently supported. + AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + // The config that is currently being served by the endpoint. + Config types.List `tfsdk:"config" tf:"optional,object"` + // The timestamp when the endpoint was created in Unix time. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // The email of the user who created the serving endpoint. + Creator types.String `tfsdk:"creator" tf:"optional"` + // System-generated ID of the endpoint. This is used to refer to the + // endpoint in the Permissions API + Id types.String `tfsdk:"id" tf:"optional"` + // The timestamp when the endpoint was last updated by a user in Unix time. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // The name of the serving endpoint. + Name types.String `tfsdk:"name" tf:"optional"` + // Information corresponding to the state of the serving endpoint. + State types.List `tfsdk:"state" tf:"optional,object"` + // Tags attached to the serving endpoint. + Tags types.List `tfsdk:"tags" tf:"optional"` + // The task type of the serving endpoint. + Task types.String `tfsdk:"task" tf:"optional"` +} + +func (newState *ServingEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpoint_SdkV2) { +} + +func (newState *ServingEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpoint_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpoint. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpoint_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ai_gateway": reflect.TypeOf(AiGatewayConfig_SdkV2{}), + "config": reflect.TypeOf(EndpointCoreConfigSummary_SdkV2{}), + "state": reflect.TypeOf(EndpointState_SdkV2{}), + "tags": reflect.TypeOf(EndpointTag_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, ServingEndpoint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ai_gateway": o.AiGateway, + "config": o.Config, + "creation_timestamp": o.CreationTimestamp, + "creator": o.Creator, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "name": o.Name, + "state": o.State, + "tags": o.Tags, + "task": o.Task, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ai_gateway": basetypes.ListType{ + ElemType: AiGatewayConfig{}.Type(ctx), + }, + "config": basetypes.ListType{ + ElemType: EndpointCoreConfigSummary{}.Type(ctx), + }, + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "name": types.StringType, + "state": basetypes.ListType{ + ElemType: EndpointState{}.Type(ctx), + }, + "tags": basetypes.ListType{ + ElemType: EndpointTag{}.Type(ctx), + }, + "task": types.StringType, + }, + } +} + +// GetAiGateway returns the value of the AiGateway field in ServingEndpoint_SdkV2 as +// a AiGatewayConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpoint_SdkV2) GetAiGateway(ctx context.Context) (AiGatewayConfig_SdkV2, bool) { + var e AiGatewayConfig_SdkV2 + if o.AiGateway.IsNull() || o.AiGateway.IsUnknown() { + return e, false + } + var v []AiGatewayConfig_SdkV2 + d := o.AiGateway.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAiGateway sets the value of the AiGateway field in ServingEndpoint_SdkV2. +func (o *ServingEndpoint_SdkV2) SetAiGateway(ctx context.Context, v AiGatewayConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] + o.AiGateway = types.ListValueMust(t, vs) +} + +// GetConfig returns the value of the Config field in ServingEndpoint_SdkV2 as +// a EndpointCoreConfigSummary_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpoint_SdkV2) GetConfig(ctx context.Context) (EndpointCoreConfigSummary_SdkV2, bool) { + var e EndpointCoreConfigSummary_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []EndpointCoreConfigSummary_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in ServingEndpoint_SdkV2. +func (o *ServingEndpoint_SdkV2) SetConfig(ctx context.Context, v EndpointCoreConfigSummary_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in ServingEndpoint_SdkV2 as +// a EndpointState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpoint_SdkV2) GetState(ctx context.Context) (EndpointState_SdkV2, bool) { + var e EndpointState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []EndpointState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in ServingEndpoint_SdkV2. +func (o *ServingEndpoint_SdkV2) SetState(ctx context.Context, v EndpointState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ServingEndpoint_SdkV2 as +// a slice of EndpointTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpoint_SdkV2) GetTags(ctx context.Context) ([]EndpointTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []EndpointTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ServingEndpoint_SdkV2. +func (o *ServingEndpoint_SdkV2) SetTags(ctx context.Context, v []EndpointTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ServingEndpointAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ServingEndpointAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlRequest_SdkV2) { +} + +func (newState *ServingEndpointAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointAccessControlRequest_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, ServingEndpointAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type ServingEndpointAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *ServingEndpointAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointAccessControlResponse_SdkV2) { +} + +func (newState *ServingEndpointAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(ServingEndpointPermission_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, ServingEndpointAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: ServingEndpointPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in ServingEndpointAccessControlResponse_SdkV2 as +// a slice of ServingEndpointPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]ServingEndpointPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []ServingEndpointPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in ServingEndpointAccessControlResponse_SdkV2. +func (o *ServingEndpointAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []ServingEndpointPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type ServingEndpointDetailed_SdkV2 struct { + // The AI Gateway configuration for the serving endpoint. NOTE: Only + // external model endpoints are currently supported. + AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + // The config that is currently being served by the endpoint. + Config types.List `tfsdk:"config" tf:"optional,object"` + // The timestamp when the endpoint was created in Unix time. + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // The email of the user who created the serving endpoint. + Creator types.String `tfsdk:"creator" tf:"optional"` + // Information required to query DataPlane APIs. + DataPlaneInfo types.List `tfsdk:"data_plane_info" tf:"optional,object"` + // Endpoint invocation url if route optimization is enabled for endpoint + EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` + // System-generated ID of the endpoint. This is used to refer to the + // endpoint in the Permissions API + Id types.String `tfsdk:"id" tf:"optional"` + // The timestamp when the endpoint was last updated by a user in Unix time. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // The name of the serving endpoint. + Name types.String `tfsdk:"name" tf:"optional"` + // The config that the endpoint is attempting to update to. + PendingConfig types.List `tfsdk:"pending_config" tf:"optional,object"` + // The permission level of the principal making the request. + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // Boolean representing if route optimization has been enabled for the + // endpoint + RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` + // Information corresponding to the state of the serving endpoint. + State types.List `tfsdk:"state" tf:"optional,object"` + // Tags attached to the serving endpoint. + Tags types.List `tfsdk:"tags" tf:"optional"` + // The task type of the serving endpoint. + Task types.String `tfsdk:"task" tf:"optional"` +} + +func (newState *ServingEndpointDetailed_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointDetailed_SdkV2) { +} + +func (newState *ServingEndpointDetailed_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointDetailed_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointDetailed. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointDetailed_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ai_gateway": reflect.TypeOf(AiGatewayConfig_SdkV2{}), + "config": reflect.TypeOf(EndpointCoreConfigOutput_SdkV2{}), + "data_plane_info": reflect.TypeOf(ModelDataPlaneInfo_SdkV2{}), + "pending_config": reflect.TypeOf(EndpointPendingConfig_SdkV2{}), + "state": reflect.TypeOf(EndpointState_SdkV2{}), + "tags": reflect.TypeOf(EndpointTag_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, ServingEndpointDetailed_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointDetailed_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ai_gateway": o.AiGateway, + "config": o.Config, + "creation_timestamp": o.CreationTimestamp, + "creator": o.Creator, + "data_plane_info": o.DataPlaneInfo, + "endpoint_url": o.EndpointUrl, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "name": o.Name, + "pending_config": o.PendingConfig, + "permission_level": o.PermissionLevel, + "route_optimized": o.RouteOptimized, + "state": o.State, + "tags": o.Tags, + "task": o.Task, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointDetailed_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ai_gateway": basetypes.ListType{ + ElemType: AiGatewayConfig{}.Type(ctx), + }, + "config": basetypes.ListType{ + ElemType: EndpointCoreConfigOutput{}.Type(ctx), + }, + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "data_plane_info": basetypes.ListType{ + ElemType: ModelDataPlaneInfo{}.Type(ctx), + }, + "endpoint_url": types.StringType, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "name": types.StringType, + "pending_config": basetypes.ListType{ + ElemType: EndpointPendingConfig{}.Type(ctx), + }, + "permission_level": types.StringType, + "route_optimized": types.BoolType, + "state": basetypes.ListType{ + ElemType: EndpointState{}.Type(ctx), + }, + "tags": basetypes.ListType{ + ElemType: EndpointTag{}.Type(ctx), + }, + "task": types.StringType, + }, + } +} + +// GetAiGateway returns the value of the AiGateway field in ServingEndpointDetailed_SdkV2 as +// a AiGatewayConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetAiGateway(ctx context.Context) (AiGatewayConfig_SdkV2, bool) { + var e AiGatewayConfig_SdkV2 + if o.AiGateway.IsNull() || o.AiGateway.IsUnknown() { + return e, false + } + var v []AiGatewayConfig_SdkV2 + d := o.AiGateway.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAiGateway sets the value of the AiGateway field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetAiGateway(ctx context.Context, v AiGatewayConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] + o.AiGateway = types.ListValueMust(t, vs) +} + +// GetConfig returns the value of the Config field in ServingEndpointDetailed_SdkV2 as +// a EndpointCoreConfigOutput_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetConfig(ctx context.Context) (EndpointCoreConfigOutput_SdkV2, bool) { + var e EndpointCoreConfigOutput_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []EndpointCoreConfigOutput_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetConfig(ctx context.Context, v EndpointCoreConfigOutput_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// GetDataPlaneInfo returns the value of the DataPlaneInfo field in ServingEndpointDetailed_SdkV2 as +// a ModelDataPlaneInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetDataPlaneInfo(ctx context.Context) (ModelDataPlaneInfo_SdkV2, bool) { + var e ModelDataPlaneInfo_SdkV2 + if o.DataPlaneInfo.IsNull() || o.DataPlaneInfo.IsUnknown() { + return e, false + } + var v []ModelDataPlaneInfo_SdkV2 + d := o.DataPlaneInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataPlaneInfo sets the value of the DataPlaneInfo field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetDataPlaneInfo(ctx context.Context, v ModelDataPlaneInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_info"] + o.DataPlaneInfo = types.ListValueMust(t, vs) +} + +// GetPendingConfig returns the value of the PendingConfig field in ServingEndpointDetailed_SdkV2 as +// a EndpointPendingConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetPendingConfig(ctx context.Context) (EndpointPendingConfig_SdkV2, bool) { + var e EndpointPendingConfig_SdkV2 + if o.PendingConfig.IsNull() || o.PendingConfig.IsUnknown() { + return e, false + } + var v []EndpointPendingConfig_SdkV2 + d := o.PendingConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPendingConfig sets the value of the PendingConfig field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetPendingConfig(ctx context.Context, v EndpointPendingConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pending_config"] + o.PendingConfig = types.ListValueMust(t, vs) +} + +// GetState returns the value of the State field in ServingEndpointDetailed_SdkV2 as +// a EndpointState_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetState(ctx context.Context) (EndpointState_SdkV2, bool) { + var e EndpointState_SdkV2 + if o.State.IsNull() || o.State.IsUnknown() { + return e, false + } + var v []EndpointState_SdkV2 + d := o.State.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetState sets the value of the State field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetState(ctx context.Context, v EndpointState_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] + o.State = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ServingEndpointDetailed_SdkV2 as +// a slice of EndpointTag_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointDetailed_SdkV2) GetTags(ctx context.Context) ([]EndpointTag_SdkV2, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []EndpointTag_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ServingEndpointDetailed_SdkV2. +func (o *ServingEndpointDetailed_SdkV2) SetTags(ctx context.Context, v []EndpointTag_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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ServingEndpointPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ServingEndpointPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermission_SdkV2) { +} + +func (newState *ServingEndpointPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, ServingEndpointPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in ServingEndpointPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in ServingEndpointPermission_SdkV2. +func (o *ServingEndpointPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type ServingEndpointPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *ServingEndpointPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissions_SdkV2) { +} + +func (newState *ServingEndpointPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ServingEndpointAccessControlResponse_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, ServingEndpointPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ServingEndpointAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ServingEndpointPermissions_SdkV2 as +// a slice of ServingEndpointAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]ServingEndpointAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ServingEndpointAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ServingEndpointPermissions_SdkV2. +func (o *ServingEndpointPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []ServingEndpointAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type ServingEndpointPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *ServingEndpointPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsDescription_SdkV2) { +} + +func (newState *ServingEndpointPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServingEndpointPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointPermissionsDescription_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, ServingEndpointPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type ServingEndpointPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The serving endpoint for which to get or manage permissions. + ServingEndpointId types.String `tfsdk:"-"` +} + +func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServingEndpointPermissionsRequest_SdkV2) { +} + +func (newState *ServingEndpointPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServingEndpointPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServingEndpointPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ServingEndpointAccessControlRequest_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, ServingEndpointPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "serving_endpoint_id": o.ServingEndpointId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServingEndpointPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: ServingEndpointAccessControlRequest{}.Type(ctx), + }, + "serving_endpoint_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in ServingEndpointPermissionsRequest_SdkV2 as +// a slice of ServingEndpointAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ServingEndpointPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]ServingEndpointAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []ServingEndpointAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in ServingEndpointPermissionsRequest_SdkV2. +func (o *ServingEndpointPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []ServingEndpointAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type TrafficConfig_SdkV2 struct { + // The list of routes that define traffic to each served entity. + Routes types.List `tfsdk:"routes" tf:"optional"` +} + +func (newState *TrafficConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrafficConfig_SdkV2) { +} + +func (newState *TrafficConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrafficConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TrafficConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TrafficConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "routes": reflect.TypeOf(Route_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, TrafficConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TrafficConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "routes": o.Routes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TrafficConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "routes": basetypes.ListType{ + ElemType: Route{}.Type(ctx), + }, + }, + } +} + +// GetRoutes returns the value of the Routes field in TrafficConfig_SdkV2 as +// a slice of Route_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *TrafficConfig_SdkV2) GetRoutes(ctx context.Context) ([]Route_SdkV2, bool) { + if o.Routes.IsNull() || o.Routes.IsUnknown() { + return nil, false + } + var v []Route_SdkV2 + d := o.Routes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRoutes sets the value of the Routes field in TrafficConfig_SdkV2. +func (o *TrafficConfig_SdkV2) SetRoutes(ctx context.Context, v []Route_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["routes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Routes = types.ListValueMust(t, vs) +} + +type V1ResponseChoiceElement_SdkV2 struct { + // The finish reason returned by the endpoint. + FinishReason types.String `tfsdk:"finishReason" tf:"optional"` + // The index of the choice in the __chat or completions__ response. + Index types.Int64 `tfsdk:"index" tf:"optional"` + // The logprobs returned only by the __completions__ endpoint. + Logprobs types.Int64 `tfsdk:"logprobs" tf:"optional"` + // The message response from the __chat__ endpoint. + Message types.List `tfsdk:"message" tf:"optional,object"` + // The text response from the __completions__ endpoint. + Text types.String `tfsdk:"text" tf:"optional"` +} + +func (newState *V1ResponseChoiceElement_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan V1ResponseChoiceElement_SdkV2) { +} + +func (newState *V1ResponseChoiceElement_SdkV2) SyncEffectiveFieldsDuringRead(existingState V1ResponseChoiceElement_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in V1ResponseChoiceElement. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a V1ResponseChoiceElement_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "message": reflect.TypeOf(ChatMessage_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, V1ResponseChoiceElement_SdkV2 +// only implements ToObjectValue() and Type(). +func (o V1ResponseChoiceElement_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "finishReason": o.FinishReason, + "index": o.Index, + "logprobs": o.Logprobs, + "message": o.Message, + "text": o.Text, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o V1ResponseChoiceElement_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "finishReason": types.StringType, + "index": types.Int64Type, + "logprobs": types.Int64Type, + "message": basetypes.ListType{ + ElemType: ChatMessage{}.Type(ctx), + }, + "text": types.StringType, + }, + } +} + +// GetMessage returns the value of the Message field in V1ResponseChoiceElement_SdkV2 as +// a ChatMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *V1ResponseChoiceElement_SdkV2) GetMessage(ctx context.Context) (ChatMessage_SdkV2, bool) { + var e ChatMessage_SdkV2 + if o.Message.IsNull() || o.Message.IsUnknown() { + return e, false + } + var v []ChatMessage_SdkV2 + d := o.Message.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMessage sets the value of the Message field in V1ResponseChoiceElement_SdkV2. +func (o *V1ResponseChoiceElement_SdkV2) SetMessage(ctx context.Context, v ChatMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["message"] + o.Message = types.ListValueMust(t, vs) +} diff --git a/internal/service/serving_tf/model.go b/internal/service/serving_tf/model.go index 0a1d00c0c..f9bf0ddbb 100755 --- a/internal/service/serving_tf/model.go +++ b/internal/service/serving_tf/model.go @@ -77,17 +77,17 @@ func (o Ai21LabsConfig) Type(ctx context.Context) attr.Type { type AiGatewayConfig struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` // Configuration for rate limits which can be set to limit endpoint traffic. RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` } func (newState *AiGatewayConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayConfig) { @@ -130,18 +130,12 @@ func (o AiGatewayConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o AiGatewayConfig) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), - }, - "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), - }, + "guardrails": AiGatewayGuardrails{}.Type(ctx), + "inference_table_config": AiGatewayInferenceTableConfig{}.Type(ctx), "rate_limits": basetypes.ListType{ ElemType: AiGatewayRateLimit{}.Type(ctx), }, - "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), - }, + "usage_tracking_config": AiGatewayUsageTrackingConfig{}.Type(ctx), }, } } @@ -155,7 +149,10 @@ func (o *AiGatewayConfig) GetGuardrails(ctx context.Context) (AiGatewayGuardrail return e, false } var v []AiGatewayGuardrails - d := o.Guardrails.ElementsAs(ctx, &v, true) + d := o.Guardrails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -167,9 +164,8 @@ func (o *AiGatewayConfig) GetGuardrails(ctx context.Context) (AiGatewayGuardrail // SetGuardrails sets the value of the Guardrails field in AiGatewayConfig. func (o *AiGatewayConfig) SetGuardrails(ctx context.Context, v AiGatewayGuardrails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] - o.Guardrails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Guardrails = vs } // GetInferenceTableConfig returns the value of the InferenceTableConfig field in AiGatewayConfig as @@ -181,7 +177,10 @@ func (o *AiGatewayConfig) GetInferenceTableConfig(ctx context.Context) (AiGatewa return e, false } var v []AiGatewayInferenceTableConfig - d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + d := o.InferenceTableConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -193,9 +192,8 @@ func (o *AiGatewayConfig) GetInferenceTableConfig(ctx context.Context) (AiGatewa // SetInferenceTableConfig sets the value of the InferenceTableConfig field in AiGatewayConfig. func (o *AiGatewayConfig) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] - o.InferenceTableConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceTableConfig = vs } // GetRateLimits returns the value of the RateLimits field in AiGatewayConfig as @@ -233,7 +231,10 @@ func (o *AiGatewayConfig) GetUsageTrackingConfig(ctx context.Context) (AiGateway return e, false } var v []AiGatewayUsageTrackingConfig - d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + d := o.UsageTrackingConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -245,9 +246,8 @@ func (o *AiGatewayConfig) GetUsageTrackingConfig(ctx context.Context) (AiGateway // SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in AiGatewayConfig. func (o *AiGatewayConfig) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] - o.UsageTrackingConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.UsageTrackingConfig = vs } type AiGatewayGuardrailParameters struct { @@ -255,7 +255,7 @@ type AiGatewayGuardrailParameters struct { // decide if the keyword exists in the request or response content. InvalidKeywords types.List `tfsdk:"invalid_keywords" tf:"optional"` // Configuration for guardrail PII filter. - Pii types.List `tfsdk:"pii" tf:"optional,object"` + Pii types.Object `tfsdk:"pii" tf:"optional,object"` // Indicates whether the safety filter is enabled. Safety types.Bool `tfsdk:"safety" tf:"optional"` // The list of allowed topics. Given a chat request, this guardrail flags @@ -305,9 +305,7 @@ func (o AiGatewayGuardrailParameters) Type(ctx context.Context) attr.Type { "invalid_keywords": basetypes.ListType{ ElemType: types.StringType, }, - "pii": basetypes.ListType{ - ElemType: AiGatewayGuardrailPiiBehavior{}.Type(ctx), - }, + "pii": AiGatewayGuardrailPiiBehavior{}.Type(ctx), "safety": types.BoolType, "valid_topics": basetypes.ListType{ ElemType: types.StringType, @@ -351,7 +349,10 @@ func (o *AiGatewayGuardrailParameters) GetPii(ctx context.Context) (AiGatewayGua return e, false } var v []AiGatewayGuardrailPiiBehavior - d := o.Pii.ElementsAs(ctx, &v, true) + d := o.Pii.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -363,9 +364,8 @@ func (o *AiGatewayGuardrailParameters) GetPii(ctx context.Context) (AiGatewayGua // SetPii sets the value of the Pii field in AiGatewayGuardrailParameters. func (o *AiGatewayGuardrailParameters) SetPii(ctx context.Context, v AiGatewayGuardrailPiiBehavior) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pii"] - o.Pii = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Pii = vs } // GetValidTopics returns the value of the ValidTopics field in AiGatewayGuardrailParameters as @@ -443,9 +443,9 @@ func (o AiGatewayGuardrailPiiBehavior) Type(ctx context.Context) attr.Type { type AiGatewayGuardrails struct { // Configuration for input guardrail filters. - Input types.List `tfsdk:"input" tf:"optional,object"` + Input types.Object `tfsdk:"input" tf:"optional,object"` // Configuration for output guardrail filters. - Output types.List `tfsdk:"output" tf:"optional,object"` + Output types.Object `tfsdk:"output" tf:"optional,object"` } func (newState *AiGatewayGuardrails) SyncEffectiveFieldsDuringCreateOrUpdate(plan AiGatewayGuardrails) { @@ -484,12 +484,8 @@ func (o AiGatewayGuardrails) ToObjectValue(ctx context.Context) basetypes.Object func (o AiGatewayGuardrails) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "input": basetypes.ListType{ - ElemType: AiGatewayGuardrailParameters{}.Type(ctx), - }, - "output": basetypes.ListType{ - ElemType: AiGatewayGuardrailParameters{}.Type(ctx), - }, + "input": AiGatewayGuardrailParameters{}.Type(ctx), + "output": AiGatewayGuardrailParameters{}.Type(ctx), }, } } @@ -503,7 +499,10 @@ func (o *AiGatewayGuardrails) GetInput(ctx context.Context) (AiGatewayGuardrailP return e, false } var v []AiGatewayGuardrailParameters - d := o.Input.ElementsAs(ctx, &v, true) + d := o.Input.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -515,9 +514,8 @@ func (o *AiGatewayGuardrails) GetInput(ctx context.Context) (AiGatewayGuardrailP // SetInput sets the value of the Input field in AiGatewayGuardrails. func (o *AiGatewayGuardrails) SetInput(ctx context.Context, v AiGatewayGuardrailParameters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["input"] - o.Input = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Input = vs } // GetOutput returns the value of the Output field in AiGatewayGuardrails as @@ -529,7 +527,10 @@ func (o *AiGatewayGuardrails) GetOutput(ctx context.Context) (AiGatewayGuardrail return e, false } var v []AiGatewayGuardrailParameters - d := o.Output.ElementsAs(ctx, &v, true) + d := o.Output.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -541,9 +542,8 @@ func (o *AiGatewayGuardrails) GetOutput(ctx context.Context) (AiGatewayGuardrail // SetOutput sets the value of the Output field in AiGatewayGuardrails. func (o *AiGatewayGuardrails) SetOutput(ctx context.Context, v AiGatewayGuardrailParameters) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["output"] - o.Output = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Output = vs } type AiGatewayInferenceTableConfig struct { @@ -898,7 +898,7 @@ type AutoCaptureConfigOutput struct { // The name of the schema in Unity Catalog. SchemaName types.String `tfsdk:"schema_name" tf:"optional"` - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The prefix of the table in Unity Catalog. TableNamePrefix types.String `tfsdk:"table_name_prefix" tf:"optional"` } @@ -941,12 +941,10 @@ func (o AutoCaptureConfigOutput) ToObjectValue(ctx context.Context) basetypes.Ob func (o AutoCaptureConfigOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "catalog_name": types.StringType, - "enabled": types.BoolType, - "schema_name": types.StringType, - "state": basetypes.ListType{ - ElemType: AutoCaptureState{}.Type(ctx), - }, + "catalog_name": types.StringType, + "enabled": types.BoolType, + "schema_name": types.StringType, + "state": AutoCaptureState{}.Type(ctx), "table_name_prefix": types.StringType, }, } @@ -961,7 +959,10 @@ func (o *AutoCaptureConfigOutput) GetState(ctx context.Context) (AutoCaptureStat return e, false } var v []AutoCaptureState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -973,13 +974,12 @@ func (o *AutoCaptureConfigOutput) GetState(ctx context.Context) (AutoCaptureStat // SetState sets the value of the State field in AutoCaptureConfigOutput. func (o *AutoCaptureConfigOutput) SetState(ctx context.Context, v AutoCaptureState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } type AutoCaptureState struct { - PayloadTable types.List `tfsdk:"payload_table" tf:"optional,object"` + PayloadTable types.Object `tfsdk:"payload_table" tf:"optional,object"` } func (newState *AutoCaptureState) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutoCaptureState) { @@ -1016,9 +1016,7 @@ func (o AutoCaptureState) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o AutoCaptureState) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "payload_table": basetypes.ListType{ - ElemType: PayloadTable{}.Type(ctx), - }, + "payload_table": PayloadTable{}.Type(ctx), }, } } @@ -1032,7 +1030,10 @@ func (o *AutoCaptureState) GetPayloadTable(ctx context.Context) (PayloadTable, b return e, false } var v []PayloadTable - d := o.PayloadTable.ElementsAs(ctx, &v, true) + d := o.PayloadTable.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1044,9 +1045,8 @@ func (o *AutoCaptureState) GetPayloadTable(ctx context.Context) (PayloadTable, b // SetPayloadTable sets the value of the PayloadTable field in AutoCaptureState. func (o *AutoCaptureState) SetPayloadTable(ctx context.Context, v PayloadTable) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["payload_table"] - o.PayloadTable = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PayloadTable = vs } // Get build logs for a served model @@ -1246,9 +1246,9 @@ func (o CohereConfig) Type(ctx context.Context) attr.Type { type CreateServingEndpoint struct { // The AI Gateway configuration for the serving endpoint. NOTE: only // external model endpoints are supported as of now. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` // The core config of the serving endpoint. - Config types.List `tfsdk:"config" tf:"object"` + Config types.Object `tfsdk:"config" tf:"object"` // 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. @@ -1305,13 +1305,9 @@ func (o CreateServingEndpoint) ToObjectValue(ctx context.Context) basetypes.Obje func (o CreateServingEndpoint) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), - }, - "config": basetypes.ListType{ - ElemType: EndpointCoreConfigInput{}.Type(ctx), - }, - "name": types.StringType, + "ai_gateway": AiGatewayConfig{}.Type(ctx), + "config": EndpointCoreConfigInput{}.Type(ctx), + "name": types.StringType, "rate_limits": basetypes.ListType{ ElemType: RateLimit{}.Type(ctx), }, @@ -1332,7 +1328,10 @@ func (o *CreateServingEndpoint) GetAiGateway(ctx context.Context) (AiGatewayConf return e, false } var v []AiGatewayConfig - d := o.AiGateway.ElementsAs(ctx, &v, true) + d := o.AiGateway.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1344,9 +1343,8 @@ func (o *CreateServingEndpoint) GetAiGateway(ctx context.Context) (AiGatewayConf // SetAiGateway sets the value of the AiGateway field in CreateServingEndpoint. func (o *CreateServingEndpoint) SetAiGateway(ctx context.Context, v AiGatewayConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] - o.AiGateway = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AiGateway = vs } // GetConfig returns the value of the Config field in CreateServingEndpoint as @@ -1358,7 +1356,10 @@ func (o *CreateServingEndpoint) GetConfig(ctx context.Context) (EndpointCoreConf return e, false } var v []EndpointCoreConfigInput - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1370,9 +1371,8 @@ func (o *CreateServingEndpoint) GetConfig(ctx context.Context) (EndpointCoreConf // SetConfig sets the value of the Config field in CreateServingEndpoint. func (o *CreateServingEndpoint) SetConfig(ctx context.Context, v EndpointCoreConfigInput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // GetRateLimits returns the value of the RateLimits field in CreateServingEndpoint as @@ -1786,7 +1786,7 @@ func (o *EmbeddingsV1ResponseEmbeddingElement) SetEmbedding(ctx context.Context, type EndpointCoreConfigInput struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` // The name of the serving endpoint to update. This field is required. Name types.String `tfsdk:"-"` // A list of served entities for the endpoint to serve. A serving endpoint @@ -1797,7 +1797,7 @@ type EndpointCoreConfigInput struct { ServedModels types.List `tfsdk:"served_models" tf:"optional"` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` } func (newState *EndpointCoreConfigInput) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigInput) { @@ -1841,19 +1841,15 @@ func (o EndpointCoreConfigInput) ToObjectValue(ctx context.Context) basetypes.Ob func (o EndpointCoreConfigInput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigInput{}.Type(ctx), - }, - "name": types.StringType, + "auto_capture_config": AutoCaptureConfigInput{}.Type(ctx), + "name": types.StringType, "served_entities": basetypes.ListType{ ElemType: ServedEntityInput{}.Type(ctx), }, "served_models": basetypes.ListType{ ElemType: ServedModelInput{}.Type(ctx), }, - "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), - }, + "traffic_config": TrafficConfig{}.Type(ctx), }, } } @@ -1867,7 +1863,10 @@ func (o *EndpointCoreConfigInput) GetAutoCaptureConfig(ctx context.Context) (Aut return e, false } var v []AutoCaptureConfigInput - d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + d := o.AutoCaptureConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1879,9 +1878,8 @@ func (o *EndpointCoreConfigInput) GetAutoCaptureConfig(ctx context.Context) (Aut // SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointCoreConfigInput. func (o *EndpointCoreConfigInput) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigInput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] - o.AutoCaptureConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AutoCaptureConfig = vs } // GetServedEntities returns the value of the ServedEntities field in EndpointCoreConfigInput as @@ -1945,7 +1943,10 @@ func (o *EndpointCoreConfigInput) GetTrafficConfig(ctx context.Context) (Traffic return e, false } var v []TrafficConfig - d := o.TrafficConfig.ElementsAs(ctx, &v, true) + d := o.TrafficConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1957,15 +1958,14 @@ func (o *EndpointCoreConfigInput) GetTrafficConfig(ctx context.Context) (Traffic // SetTrafficConfig sets the value of the TrafficConfig field in EndpointCoreConfigInput. func (o *EndpointCoreConfigInput) SetTrafficConfig(ctx context.Context, v TrafficConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] - o.TrafficConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TrafficConfig = vs } type EndpointCoreConfigOutput struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` // The config version that the serving endpoint is currently serving. ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` // The list of served entities under the serving endpoint config. @@ -1974,7 +1974,7 @@ type EndpointCoreConfigOutput struct { // the serving endpoint config. ServedModels types.List `tfsdk:"served_models" tf:"optional"` // The traffic configuration associated with the serving endpoint config. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` } func (newState *EndpointCoreConfigOutput) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointCoreConfigOutput) { @@ -2018,19 +2018,15 @@ func (o EndpointCoreConfigOutput) ToObjectValue(ctx context.Context) basetypes.O func (o EndpointCoreConfigOutput) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigOutput{}.Type(ctx), - }, - "config_version": types.Int64Type, + "auto_capture_config": AutoCaptureConfigOutput{}.Type(ctx), + "config_version": types.Int64Type, "served_entities": basetypes.ListType{ ElemType: ServedEntityOutput{}.Type(ctx), }, "served_models": basetypes.ListType{ ElemType: ServedModelOutput{}.Type(ctx), }, - "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), - }, + "traffic_config": TrafficConfig{}.Type(ctx), }, } } @@ -2044,7 +2040,10 @@ func (o *EndpointCoreConfigOutput) GetAutoCaptureConfig(ctx context.Context) (Au return e, false } var v []AutoCaptureConfigOutput - d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + d := o.AutoCaptureConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2056,9 +2055,8 @@ func (o *EndpointCoreConfigOutput) GetAutoCaptureConfig(ctx context.Context) (Au // SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointCoreConfigOutput. func (o *EndpointCoreConfigOutput) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] - o.AutoCaptureConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AutoCaptureConfig = vs } // GetServedEntities returns the value of the ServedEntities field in EndpointCoreConfigOutput as @@ -2122,7 +2120,10 @@ func (o *EndpointCoreConfigOutput) GetTrafficConfig(ctx context.Context) (Traffi return e, false } var v []TrafficConfig - d := o.TrafficConfig.ElementsAs(ctx, &v, true) + d := o.TrafficConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2134,9 +2135,8 @@ func (o *EndpointCoreConfigOutput) GetTrafficConfig(ctx context.Context) (Traffi // SetTrafficConfig sets the value of the TrafficConfig field in EndpointCoreConfigOutput. func (o *EndpointCoreConfigOutput) SetTrafficConfig(ctx context.Context, v TrafficConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] - o.TrafficConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TrafficConfig = vs } type EndpointCoreConfigSummary struct { @@ -2248,7 +2248,7 @@ func (o *EndpointCoreConfigSummary) SetServedModels(ctx context.Context, v []Ser type EndpointPendingConfig struct { // Configuration for Inference Tables which automatically logs requests and // responses to Unity Catalog. - AutoCaptureConfig types.List `tfsdk:"auto_capture_config" tf:"optional,object"` + AutoCaptureConfig types.Object `tfsdk:"auto_capture_config" tf:"optional,object"` // The config version that the serving endpoint is currently serving. ConfigVersion types.Int64 `tfsdk:"config_version" tf:"optional"` // The list of served entities belonging to the last issued update to the @@ -2261,7 +2261,7 @@ type EndpointPendingConfig struct { StartTime types.Int64 `tfsdk:"start_time" tf:"optional"` // The traffic config defining how invocations to the serving endpoint // should be routed. - TrafficConfig types.List `tfsdk:"traffic_config" tf:"optional,object"` + TrafficConfig types.Object `tfsdk:"traffic_config" tf:"optional,object"` } func (newState *EndpointPendingConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointPendingConfig) { @@ -2306,20 +2306,16 @@ func (o EndpointPendingConfig) ToObjectValue(ctx context.Context) basetypes.Obje func (o EndpointPendingConfig) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigOutput{}.Type(ctx), - }, - "config_version": types.Int64Type, + "auto_capture_config": AutoCaptureConfigOutput{}.Type(ctx), + "config_version": types.Int64Type, "served_entities": basetypes.ListType{ ElemType: ServedEntityOutput{}.Type(ctx), }, "served_models": basetypes.ListType{ ElemType: ServedModelOutput{}.Type(ctx), }, - "start_time": types.Int64Type, - "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), - }, + "start_time": types.Int64Type, + "traffic_config": TrafficConfig{}.Type(ctx), }, } } @@ -2333,7 +2329,10 @@ func (o *EndpointPendingConfig) GetAutoCaptureConfig(ctx context.Context) (AutoC return e, false } var v []AutoCaptureConfigOutput - d := o.AutoCaptureConfig.ElementsAs(ctx, &v, true) + d := o.AutoCaptureConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2345,9 +2344,8 @@ func (o *EndpointPendingConfig) GetAutoCaptureConfig(ctx context.Context) (AutoC // SetAutoCaptureConfig sets the value of the AutoCaptureConfig field in EndpointPendingConfig. func (o *EndpointPendingConfig) SetAutoCaptureConfig(ctx context.Context, v AutoCaptureConfigOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["auto_capture_config"] - o.AutoCaptureConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AutoCaptureConfig = vs } // GetServedEntities returns the value of the ServedEntities field in EndpointPendingConfig as @@ -2411,7 +2409,10 @@ func (o *EndpointPendingConfig) GetTrafficConfig(ctx context.Context) (TrafficCo return e, false } var v []TrafficConfig - d := o.TrafficConfig.ElementsAs(ctx, &v, true) + d := o.TrafficConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2423,9 +2424,8 @@ func (o *EndpointPendingConfig) GetTrafficConfig(ctx context.Context) (TrafficCo // SetTrafficConfig sets the value of the TrafficConfig field in EndpointPendingConfig. func (o *EndpointPendingConfig) SetTrafficConfig(ctx context.Context, v TrafficConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["traffic_config"] - o.TrafficConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TrafficConfig = vs } type EndpointState struct { @@ -2614,25 +2614,25 @@ func (o ExportMetricsResponse) Type(ctx context.Context) attr.Type { type ExternalModel struct { // AI21Labs Config. Only required if the provider is 'ai21labs'. - Ai21labsConfig types.List `tfsdk:"ai21labs_config" tf:"optional,object"` + Ai21labsConfig types.Object `tfsdk:"ai21labs_config" tf:"optional,object"` // Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. - AmazonBedrockConfig types.List `tfsdk:"amazon_bedrock_config" tf:"optional,object"` + AmazonBedrockConfig types.Object `tfsdk:"amazon_bedrock_config" tf:"optional,object"` // Anthropic Config. Only required if the provider is 'anthropic'. - AnthropicConfig types.List `tfsdk:"anthropic_config" tf:"optional,object"` + AnthropicConfig types.Object `tfsdk:"anthropic_config" tf:"optional,object"` // Cohere Config. Only required if the provider is 'cohere'. - CohereConfig types.List `tfsdk:"cohere_config" tf:"optional,object"` + CohereConfig types.Object `tfsdk:"cohere_config" tf:"optional,object"` // Databricks Model Serving Config. Only required if the provider is // 'databricks-model-serving'. - DatabricksModelServingConfig types.List `tfsdk:"databricks_model_serving_config" tf:"optional,object"` + DatabricksModelServingConfig types.Object `tfsdk:"databricks_model_serving_config" tf:"optional,object"` // Google Cloud Vertex AI Config. Only required if the provider is // 'google-cloud-vertex-ai'. - GoogleCloudVertexAiConfig types.List `tfsdk:"google_cloud_vertex_ai_config" tf:"optional,object"` + GoogleCloudVertexAiConfig types.Object `tfsdk:"google_cloud_vertex_ai_config" tf:"optional,object"` // The name of the external model. Name types.String `tfsdk:"name" tf:""` // OpenAI Config. Only required if the provider is 'openai'. - OpenaiConfig types.List `tfsdk:"openai_config" tf:"optional,object"` + OpenaiConfig types.Object `tfsdk:"openai_config" tf:"optional,object"` // PaLM Config. Only required if the provider is 'palm'. - PalmConfig types.List `tfsdk:"palm_config" tf:"optional,object"` + PalmConfig types.Object `tfsdk:"palm_config" tf:"optional,object"` // The name of the provider for the external model. Currently, the supported // providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', // 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and @@ -2693,33 +2693,17 @@ func (o ExternalModel) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o ExternalModel) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ai21labs_config": basetypes.ListType{ - ElemType: Ai21LabsConfig{}.Type(ctx), - }, - "amazon_bedrock_config": basetypes.ListType{ - ElemType: AmazonBedrockConfig{}.Type(ctx), - }, - "anthropic_config": basetypes.ListType{ - ElemType: AnthropicConfig{}.Type(ctx), - }, - "cohere_config": basetypes.ListType{ - ElemType: CohereConfig{}.Type(ctx), - }, - "databricks_model_serving_config": basetypes.ListType{ - ElemType: DatabricksModelServingConfig{}.Type(ctx), - }, - "google_cloud_vertex_ai_config": basetypes.ListType{ - ElemType: GoogleCloudVertexAiConfig{}.Type(ctx), - }, - "name": types.StringType, - "openai_config": basetypes.ListType{ - ElemType: OpenAiConfig{}.Type(ctx), - }, - "palm_config": basetypes.ListType{ - ElemType: PaLmConfig{}.Type(ctx), - }, - "provider": types.StringType, - "task": types.StringType, + "ai21labs_config": Ai21LabsConfig{}.Type(ctx), + "amazon_bedrock_config": AmazonBedrockConfig{}.Type(ctx), + "anthropic_config": AnthropicConfig{}.Type(ctx), + "cohere_config": CohereConfig{}.Type(ctx), + "databricks_model_serving_config": DatabricksModelServingConfig{}.Type(ctx), + "google_cloud_vertex_ai_config": GoogleCloudVertexAiConfig{}.Type(ctx), + "name": types.StringType, + "openai_config": OpenAiConfig{}.Type(ctx), + "palm_config": PaLmConfig{}.Type(ctx), + "provider": types.StringType, + "task": types.StringType, }, } } @@ -2733,7 +2717,10 @@ func (o *ExternalModel) GetAi21labsConfig(ctx context.Context) (Ai21LabsConfig, return e, false } var v []Ai21LabsConfig - d := o.Ai21labsConfig.ElementsAs(ctx, &v, true) + d := o.Ai21labsConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2745,9 +2732,8 @@ func (o *ExternalModel) GetAi21labsConfig(ctx context.Context) (Ai21LabsConfig, // SetAi21labsConfig sets the value of the Ai21labsConfig field in ExternalModel. func (o *ExternalModel) SetAi21labsConfig(ctx context.Context, v Ai21LabsConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai21labs_config"] - o.Ai21labsConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Ai21labsConfig = vs } // GetAmazonBedrockConfig returns the value of the AmazonBedrockConfig field in ExternalModel as @@ -2759,7 +2745,10 @@ func (o *ExternalModel) GetAmazonBedrockConfig(ctx context.Context) (AmazonBedro return e, false } var v []AmazonBedrockConfig - d := o.AmazonBedrockConfig.ElementsAs(ctx, &v, true) + d := o.AmazonBedrockConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2771,9 +2760,8 @@ func (o *ExternalModel) GetAmazonBedrockConfig(ctx context.Context) (AmazonBedro // SetAmazonBedrockConfig sets the value of the AmazonBedrockConfig field in ExternalModel. func (o *ExternalModel) SetAmazonBedrockConfig(ctx context.Context, v AmazonBedrockConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["amazon_bedrock_config"] - o.AmazonBedrockConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AmazonBedrockConfig = vs } // GetAnthropicConfig returns the value of the AnthropicConfig field in ExternalModel as @@ -2785,7 +2773,10 @@ func (o *ExternalModel) GetAnthropicConfig(ctx context.Context) (AnthropicConfig return e, false } var v []AnthropicConfig - d := o.AnthropicConfig.ElementsAs(ctx, &v, true) + d := o.AnthropicConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2797,9 +2788,8 @@ func (o *ExternalModel) GetAnthropicConfig(ctx context.Context) (AnthropicConfig // SetAnthropicConfig sets the value of the AnthropicConfig field in ExternalModel. func (o *ExternalModel) SetAnthropicConfig(ctx context.Context, v AnthropicConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["anthropic_config"] - o.AnthropicConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AnthropicConfig = vs } // GetCohereConfig returns the value of the CohereConfig field in ExternalModel as @@ -2811,7 +2801,10 @@ func (o *ExternalModel) GetCohereConfig(ctx context.Context) (CohereConfig, bool return e, false } var v []CohereConfig - d := o.CohereConfig.ElementsAs(ctx, &v, true) + d := o.CohereConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2823,9 +2816,8 @@ func (o *ExternalModel) GetCohereConfig(ctx context.Context) (CohereConfig, bool // SetCohereConfig sets the value of the CohereConfig field in ExternalModel. func (o *ExternalModel) SetCohereConfig(ctx context.Context, v CohereConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["cohere_config"] - o.CohereConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CohereConfig = vs } // GetDatabricksModelServingConfig returns the value of the DatabricksModelServingConfig field in ExternalModel as @@ -2837,7 +2829,10 @@ func (o *ExternalModel) GetDatabricksModelServingConfig(ctx context.Context) (Da return e, false } var v []DatabricksModelServingConfig - d := o.DatabricksModelServingConfig.ElementsAs(ctx, &v, true) + d := o.DatabricksModelServingConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2849,9 +2844,8 @@ func (o *ExternalModel) GetDatabricksModelServingConfig(ctx context.Context) (Da // SetDatabricksModelServingConfig sets the value of the DatabricksModelServingConfig field in ExternalModel. func (o *ExternalModel) SetDatabricksModelServingConfig(ctx context.Context, v DatabricksModelServingConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["databricks_model_serving_config"] - o.DatabricksModelServingConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DatabricksModelServingConfig = vs } // GetGoogleCloudVertexAiConfig returns the value of the GoogleCloudVertexAiConfig field in ExternalModel as @@ -2863,7 +2857,10 @@ func (o *ExternalModel) GetGoogleCloudVertexAiConfig(ctx context.Context) (Googl return e, false } var v []GoogleCloudVertexAiConfig - d := o.GoogleCloudVertexAiConfig.ElementsAs(ctx, &v, true) + d := o.GoogleCloudVertexAiConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2875,9 +2872,8 @@ func (o *ExternalModel) GetGoogleCloudVertexAiConfig(ctx context.Context) (Googl // SetGoogleCloudVertexAiConfig sets the value of the GoogleCloudVertexAiConfig field in ExternalModel. func (o *ExternalModel) SetGoogleCloudVertexAiConfig(ctx context.Context, v GoogleCloudVertexAiConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["google_cloud_vertex_ai_config"] - o.GoogleCloudVertexAiConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GoogleCloudVertexAiConfig = vs } // GetOpenaiConfig returns the value of the OpenaiConfig field in ExternalModel as @@ -2889,7 +2885,10 @@ func (o *ExternalModel) GetOpenaiConfig(ctx context.Context) (OpenAiConfig, bool return e, false } var v []OpenAiConfig - d := o.OpenaiConfig.ElementsAs(ctx, &v, true) + d := o.OpenaiConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2901,9 +2900,8 @@ func (o *ExternalModel) GetOpenaiConfig(ctx context.Context) (OpenAiConfig, bool // SetOpenaiConfig sets the value of the OpenaiConfig field in ExternalModel. func (o *ExternalModel) SetOpenaiConfig(ctx context.Context, v OpenAiConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["openai_config"] - o.OpenaiConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OpenaiConfig = vs } // GetPalmConfig returns the value of the PalmConfig field in ExternalModel as @@ -2915,7 +2913,10 @@ func (o *ExternalModel) GetPalmConfig(ctx context.Context) (PaLmConfig, bool) { return e, false } var v []PaLmConfig - d := o.PalmConfig.ElementsAs(ctx, &v, true) + d := o.PalmConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2927,9 +2928,8 @@ func (o *ExternalModel) GetPalmConfig(ctx context.Context) (PaLmConfig, bool) { // SetPalmConfig sets the value of the PalmConfig field in ExternalModel. func (o *ExternalModel) SetPalmConfig(ctx context.Context, v PaLmConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["palm_config"] - o.PalmConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PalmConfig = vs } type ExternalModelUsageElement struct { @@ -3515,7 +3515,7 @@ func (o LogsRequest) Type(ctx context.Context) attr.Type { type ModelDataPlaneInfo struct { // Information required to query DataPlane API 'query' endpoint. - QueryInfo types.List `tfsdk:"query_info" tf:"optional,object"` + QueryInfo types.Object `tfsdk:"query_info" tf:"optional,object"` } func (newState *ModelDataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDataPlaneInfo) { @@ -3552,9 +3552,7 @@ func (o ModelDataPlaneInfo) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o ModelDataPlaneInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "query_info": basetypes.ListType{ - ElemType: oauth2_tf.DataPlaneInfo{}.Type(ctx), - }, + "query_info": oauth2_tf.DataPlaneInfo{}.Type(ctx), }, } } @@ -3568,7 +3566,10 @@ func (o *ModelDataPlaneInfo) GetQueryInfo(ctx context.Context) (oauth2_tf.DataPl return e, false } var v []oauth2_tf.DataPlaneInfo - d := o.QueryInfo.ElementsAs(ctx, &v, true) + d := o.QueryInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3580,9 +3581,8 @@ func (o *ModelDataPlaneInfo) GetQueryInfo(ctx context.Context) (oauth2_tf.DataPl // SetQueryInfo sets the value of the QueryInfo field in ModelDataPlaneInfo. func (o *ModelDataPlaneInfo) SetQueryInfo(ctx context.Context, v oauth2_tf.DataPlaneInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_info"] - o.QueryInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueryInfo = vs } type OpenAiConfig struct { @@ -3912,11 +3912,11 @@ func (o PayloadTable) Type(ctx context.Context) attr.Type { type PutAiGatewayRequest struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality. - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` // The name of the serving endpoint whose AI Gateway is being updated. This // field is required. Name types.String `tfsdk:"-"` @@ -3925,7 +3925,7 @@ type PutAiGatewayRequest struct { // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` } func (newState *PutAiGatewayRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayRequest) { @@ -3969,19 +3969,13 @@ func (o PutAiGatewayRequest) ToObjectValue(ctx context.Context) basetypes.Object func (o PutAiGatewayRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), - }, - "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), - }, - "name": types.StringType, + "guardrails": AiGatewayGuardrails{}.Type(ctx), + "inference_table_config": AiGatewayInferenceTableConfig{}.Type(ctx), + "name": types.StringType, "rate_limits": basetypes.ListType{ ElemType: AiGatewayRateLimit{}.Type(ctx), }, - "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), - }, + "usage_tracking_config": AiGatewayUsageTrackingConfig{}.Type(ctx), }, } } @@ -3995,7 +3989,10 @@ func (o *PutAiGatewayRequest) GetGuardrails(ctx context.Context) (AiGatewayGuard return e, false } var v []AiGatewayGuardrails - d := o.Guardrails.ElementsAs(ctx, &v, true) + d := o.Guardrails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4007,9 +4004,8 @@ func (o *PutAiGatewayRequest) GetGuardrails(ctx context.Context) (AiGatewayGuard // SetGuardrails sets the value of the Guardrails field in PutAiGatewayRequest. func (o *PutAiGatewayRequest) SetGuardrails(ctx context.Context, v AiGatewayGuardrails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] - o.Guardrails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Guardrails = vs } // GetInferenceTableConfig returns the value of the InferenceTableConfig field in PutAiGatewayRequest as @@ -4021,7 +4017,10 @@ func (o *PutAiGatewayRequest) GetInferenceTableConfig(ctx context.Context) (AiGa return e, false } var v []AiGatewayInferenceTableConfig - d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + d := o.InferenceTableConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4033,9 +4032,8 @@ func (o *PutAiGatewayRequest) GetInferenceTableConfig(ctx context.Context) (AiGa // SetInferenceTableConfig sets the value of the InferenceTableConfig field in PutAiGatewayRequest. func (o *PutAiGatewayRequest) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] - o.InferenceTableConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceTableConfig = vs } // GetRateLimits returns the value of the RateLimits field in PutAiGatewayRequest as @@ -4073,7 +4071,10 @@ func (o *PutAiGatewayRequest) GetUsageTrackingConfig(ctx context.Context) (AiGat return e, false } var v []AiGatewayUsageTrackingConfig - d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + d := o.UsageTrackingConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4085,25 +4086,24 @@ func (o *PutAiGatewayRequest) GetUsageTrackingConfig(ctx context.Context) (AiGat // SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in PutAiGatewayRequest. func (o *PutAiGatewayRequest) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] - o.UsageTrackingConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.UsageTrackingConfig = vs } type PutAiGatewayResponse struct { // Configuration for AI Guardrails to prevent unwanted data and unsafe data // in requests and responses. - Guardrails types.List `tfsdk:"guardrails" tf:"optional,object"` + Guardrails types.Object `tfsdk:"guardrails" tf:"optional,object"` // Configuration for payload logging using inference tables. Use these // tables to monitor and audit data being sent to and received from model // APIs and to improve model quality . - InferenceTableConfig types.List `tfsdk:"inference_table_config" tf:"optional,object"` + InferenceTableConfig types.Object `tfsdk:"inference_table_config" tf:"optional,object"` // Configuration for rate limits which can be set to limit endpoint traffic. RateLimits types.List `tfsdk:"rate_limits" tf:"optional"` // Configuration to enable usage tracking using system tables. These tables // allow you to monitor operational usage on endpoints and their associated // costs. - UsageTrackingConfig types.List `tfsdk:"usage_tracking_config" tf:"optional,object"` + UsageTrackingConfig types.Object `tfsdk:"usage_tracking_config" tf:"optional,object"` } func (newState *PutAiGatewayResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAiGatewayResponse) { @@ -4146,18 +4146,12 @@ func (o PutAiGatewayResponse) ToObjectValue(ctx context.Context) basetypes.Objec func (o PutAiGatewayResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), - }, - "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), - }, + "guardrails": AiGatewayGuardrails{}.Type(ctx), + "inference_table_config": AiGatewayInferenceTableConfig{}.Type(ctx), "rate_limits": basetypes.ListType{ ElemType: AiGatewayRateLimit{}.Type(ctx), }, - "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), - }, + "usage_tracking_config": AiGatewayUsageTrackingConfig{}.Type(ctx), }, } } @@ -4171,7 +4165,10 @@ func (o *PutAiGatewayResponse) GetGuardrails(ctx context.Context) (AiGatewayGuar return e, false } var v []AiGatewayGuardrails - d := o.Guardrails.ElementsAs(ctx, &v, true) + d := o.Guardrails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4183,9 +4180,8 @@ func (o *PutAiGatewayResponse) GetGuardrails(ctx context.Context) (AiGatewayGuar // SetGuardrails sets the value of the Guardrails field in PutAiGatewayResponse. func (o *PutAiGatewayResponse) SetGuardrails(ctx context.Context, v AiGatewayGuardrails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["guardrails"] - o.Guardrails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Guardrails = vs } // GetInferenceTableConfig returns the value of the InferenceTableConfig field in PutAiGatewayResponse as @@ -4197,7 +4193,10 @@ func (o *PutAiGatewayResponse) GetInferenceTableConfig(ctx context.Context) (AiG return e, false } var v []AiGatewayInferenceTableConfig - d := o.InferenceTableConfig.ElementsAs(ctx, &v, true) + d := o.InferenceTableConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4209,9 +4208,8 @@ func (o *PutAiGatewayResponse) GetInferenceTableConfig(ctx context.Context) (AiG // SetInferenceTableConfig sets the value of the InferenceTableConfig field in PutAiGatewayResponse. func (o *PutAiGatewayResponse) SetInferenceTableConfig(ctx context.Context, v AiGatewayInferenceTableConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["inference_table_config"] - o.InferenceTableConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InferenceTableConfig = vs } // GetRateLimits returns the value of the RateLimits field in PutAiGatewayResponse as @@ -4249,7 +4247,10 @@ func (o *PutAiGatewayResponse) GetUsageTrackingConfig(ctx context.Context) (AiGa return e, false } var v []AiGatewayUsageTrackingConfig - d := o.UsageTrackingConfig.ElementsAs(ctx, &v, true) + d := o.UsageTrackingConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4261,9 +4262,8 @@ func (o *PutAiGatewayResponse) GetUsageTrackingConfig(ctx context.Context) (AiGa // SetUsageTrackingConfig sets the value of the UsageTrackingConfig field in PutAiGatewayResponse. func (o *PutAiGatewayResponse) SetUsageTrackingConfig(ctx context.Context, v AiGatewayUsageTrackingConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage_tracking_config"] - o.UsageTrackingConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.UsageTrackingConfig = vs } // Update rate limits of a serving endpoint @@ -4420,7 +4420,7 @@ type QueryEndpointInput struct { // Pandas Dataframe input in the records orientation. DataframeRecords types.List `tfsdk:"dataframe_records" tf:"optional"` // Pandas Dataframe input in the split orientation. - DataframeSplit types.List `tfsdk:"dataframe_split" tf:"optional,object"` + DataframeSplit types.Object `tfsdk:"dataframe_split" tf:"optional,object"` // The extra parameters field used ONLY for __completions, chat,__ and // __embeddings external & foundation model__ serving endpoints. This is a // map of strings and should only be used with other external/foundation @@ -4523,9 +4523,7 @@ func (o QueryEndpointInput) Type(ctx context.Context) attr.Type { "dataframe_records": basetypes.ListType{ ElemType: types.ObjectType{}, }, - "dataframe_split": basetypes.ListType{ - ElemType: DataframeSplitInput{}.Type(ctx), - }, + "dataframe_split": DataframeSplitInput{}.Type(ctx), "extra_params": basetypes.MapType{ ElemType: types.StringType, }, @@ -4585,7 +4583,10 @@ func (o *QueryEndpointInput) GetDataframeSplit(ctx context.Context) (DataframeSp return e, false } var v []DataframeSplitInput - d := o.DataframeSplit.ElementsAs(ctx, &v, true) + d := o.DataframeSplit.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4597,9 +4598,8 @@ func (o *QueryEndpointInput) GetDataframeSplit(ctx context.Context) (DataframeSp // SetDataframeSplit sets the value of the DataframeSplit field in QueryEndpointInput. func (o *QueryEndpointInput) SetDataframeSplit(ctx context.Context, v DataframeSplitInput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["dataframe_split"] - o.DataframeSplit = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataframeSplit = vs } // GetExtraParams returns the value of the ExtraParams field in QueryEndpointInput as @@ -4734,7 +4734,7 @@ type QueryEndpointResponse struct { // The usage object that may be returned by the __external/foundation // model__ serving endpoint. This contains information about the number of // tokens used in the prompt and response. - Usage types.List `tfsdk:"usage" tf:"optional,object"` + Usage types.Object `tfsdk:"usage" tf:"optional,object"` } func (newState *QueryEndpointResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEndpointResponse) { @@ -4796,9 +4796,7 @@ func (o QueryEndpointResponse) Type(ctx context.Context) attr.Type { ElemType: types.ObjectType{}, }, "served-model-name": types.StringType, - "usage": basetypes.ListType{ - ElemType: ExternalModelUsageElement{}.Type(ctx), - }, + "usage": ExternalModelUsageElement{}.Type(ctx), }, } } @@ -4890,7 +4888,10 @@ func (o *QueryEndpointResponse) GetUsage(ctx context.Context) (ExternalModelUsag return e, false } var v []ExternalModelUsageElement - d := o.Usage.ElementsAs(ctx, &v, true) + d := o.Usage.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4902,9 +4903,8 @@ func (o *QueryEndpointResponse) GetUsage(ctx context.Context) (ExternalModelUsag // SetUsage sets the value of the Usage field in QueryEndpointResponse. func (o *QueryEndpointResponse) SetUsage(ctx context.Context, v ExternalModelUsageElement) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["usage"] - o.Usage = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Usage = vs } type RateLimit struct { @@ -5033,7 +5033,7 @@ type ServedEntityInput struct { // endpoint without external_model. If the endpoint is created without // external_model, users cannot update it to add external_model later. The // task type of all external models within an endpoint must be the same. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` // ARN of the instance profile that the served entity uses to access AWS // resources. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` @@ -5119,9 +5119,7 @@ func (o ServedEntityInput) Type(ctx context.Context) attr.Type { "environment_vars": basetypes.MapType{ ElemType: types.StringType, }, - "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), - }, + "external_model": ExternalModel{}.Type(ctx), "instance_profile_arn": types.StringType, "max_provisioned_throughput": types.Int64Type, "min_provisioned_throughput": types.Int64Type, @@ -5168,7 +5166,10 @@ func (o *ServedEntityInput) GetExternalModel(ctx context.Context) (ExternalModel return e, false } var v []ExternalModel - d := o.ExternalModel.ElementsAs(ctx, &v, true) + d := o.ExternalModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5180,9 +5181,8 @@ func (o *ServedEntityInput) GetExternalModel(ctx context.Context) (ExternalModel // SetExternalModel sets the value of the ExternalModel field in ServedEntityInput. func (o *ServedEntityInput) SetExternalModel(ctx context.Context, v ExternalModel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] - o.ExternalModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExternalModel = vs } type ServedEntityOutput struct { @@ -5210,12 +5210,12 @@ type ServedEntityOutput struct { // foundation_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version, workload_size, // workload_type, and scale_to_zero_enabled) is returned based on the // endpoint type. - FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.Object `tfsdk:"foundation_model" tf:"optional,object"` // ARN of the instance profile that the served entity uses to access AWS // resources. InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` @@ -5229,7 +5229,7 @@ type ServedEntityOutput struct { // zero. ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` // Information corresponding to the state of the served entity. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The workload size of the served entity. The workload size corresponds to // a range of provisioned concurrency that the compute autoscales between. A // single unit of provisioned concurrency can process one request at a time. @@ -5306,22 +5306,16 @@ func (o ServedEntityOutput) Type(ctx context.Context) attr.Type { "environment_vars": basetypes.MapType{ ElemType: types.StringType, }, - "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), - }, - "foundation_model": basetypes.ListType{ - ElemType: FoundationModel{}.Type(ctx), - }, + "external_model": ExternalModel{}.Type(ctx), + "foundation_model": FoundationModel{}.Type(ctx), "instance_profile_arn": types.StringType, "max_provisioned_throughput": types.Int64Type, "min_provisioned_throughput": types.Int64Type, "name": types.StringType, "scale_to_zero_enabled": types.BoolType, - "state": basetypes.ListType{ - ElemType: ServedModelState{}.Type(ctx), - }, - "workload_size": types.StringType, - "workload_type": types.StringType, + "state": ServedModelState{}.Type(ctx), + "workload_size": types.StringType, + "workload_type": types.StringType, }, } } @@ -5361,7 +5355,10 @@ func (o *ServedEntityOutput) GetExternalModel(ctx context.Context) (ExternalMode return e, false } var v []ExternalModel - d := o.ExternalModel.ElementsAs(ctx, &v, true) + d := o.ExternalModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5373,9 +5370,8 @@ func (o *ServedEntityOutput) GetExternalModel(ctx context.Context) (ExternalMode // SetExternalModel sets the value of the ExternalModel field in ServedEntityOutput. func (o *ServedEntityOutput) SetExternalModel(ctx context.Context, v ExternalModel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] - o.ExternalModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExternalModel = vs } // GetFoundationModel returns the value of the FoundationModel field in ServedEntityOutput as @@ -5387,7 +5383,10 @@ func (o *ServedEntityOutput) GetFoundationModel(ctx context.Context) (Foundation return e, false } var v []FoundationModel - d := o.FoundationModel.ElementsAs(ctx, &v, true) + d := o.FoundationModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5399,9 +5398,8 @@ func (o *ServedEntityOutput) GetFoundationModel(ctx context.Context) (Foundation // SetFoundationModel sets the value of the FoundationModel field in ServedEntityOutput. func (o *ServedEntityOutput) SetFoundationModel(ctx context.Context, v FoundationModel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foundation_model"] - o.FoundationModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FoundationModel = vs } // GetState returns the value of the State field in ServedEntityOutput as @@ -5413,7 +5411,10 @@ func (o *ServedEntityOutput) GetState(ctx context.Context) (ServedModelState, bo return e, false } var v []ServedModelState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5425,9 +5426,8 @@ func (o *ServedEntityOutput) GetState(ctx context.Context) (ServedModelState, bo // SetState sets the value of the State field in ServedEntityOutput. func (o *ServedEntityOutput) SetState(ctx context.Context, v ServedModelState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } type ServedEntitySpec struct { @@ -5443,11 +5443,11 @@ type ServedEntitySpec struct { // The external model that is served. NOTE: Only one of external_model, // foundation_model, and (entity_name, entity_version) is returned based on // the endpoint type. - ExternalModel types.List `tfsdk:"external_model" tf:"optional,object"` + ExternalModel types.Object `tfsdk:"external_model" tf:"optional,object"` // The foundation model that is served. NOTE: Only one of foundation_model, // external_model, and (entity_name, entity_version) is returned based on // the endpoint type. - FoundationModel types.List `tfsdk:"foundation_model" tf:"optional,object"` + FoundationModel types.Object `tfsdk:"foundation_model" tf:"optional,object"` // The name of the served entity. Name types.String `tfsdk:"name" tf:"optional"` } @@ -5491,15 +5491,11 @@ func (o ServedEntitySpec) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o ServedEntitySpec) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "entity_name": types.StringType, - "entity_version": types.StringType, - "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), - }, - "foundation_model": basetypes.ListType{ - ElemType: FoundationModel{}.Type(ctx), - }, - "name": types.StringType, + "entity_name": types.StringType, + "entity_version": types.StringType, + "external_model": ExternalModel{}.Type(ctx), + "foundation_model": FoundationModel{}.Type(ctx), + "name": types.StringType, }, } } @@ -5513,7 +5509,10 @@ func (o *ServedEntitySpec) GetExternalModel(ctx context.Context) (ExternalModel, return e, false } var v []ExternalModel - d := o.ExternalModel.ElementsAs(ctx, &v, true) + d := o.ExternalModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5525,9 +5524,8 @@ func (o *ServedEntitySpec) GetExternalModel(ctx context.Context) (ExternalModel, // SetExternalModel sets the value of the ExternalModel field in ServedEntitySpec. func (o *ServedEntitySpec) SetExternalModel(ctx context.Context, v ExternalModel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["external_model"] - o.ExternalModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ExternalModel = vs } // GetFoundationModel returns the value of the FoundationModel field in ServedEntitySpec as @@ -5539,7 +5537,10 @@ func (o *ServedEntitySpec) GetFoundationModel(ctx context.Context) (FoundationMo return e, false } var v []FoundationModel - d := o.FoundationModel.ElementsAs(ctx, &v, true) + d := o.FoundationModel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5551,9 +5552,8 @@ func (o *ServedEntitySpec) GetFoundationModel(ctx context.Context) (FoundationMo // SetFoundationModel sets the value of the FoundationModel field in ServedEntitySpec. func (o *ServedEntitySpec) SetFoundationModel(ctx context.Context, v FoundationModel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["foundation_model"] - o.FoundationModel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FoundationModel = vs } type ServedModelInput struct { @@ -5716,7 +5716,7 @@ type ServedModelOutput struct { // zero. ScaleToZeroEnabled types.Bool `tfsdk:"scale_to_zero_enabled" tf:"optional"` // Information corresponding to the state of the Served Model. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // The workload size of the served model. The workload size corresponds to a // range of provisioned concurrency that the compute will autoscale between. // A single unit of provisioned concurrency can process one request at a @@ -5790,11 +5790,9 @@ func (o ServedModelOutput) Type(ctx context.Context) attr.Type { "model_version": types.StringType, "name": types.StringType, "scale_to_zero_enabled": types.BoolType, - "state": basetypes.ListType{ - ElemType: ServedModelState{}.Type(ctx), - }, - "workload_size": types.StringType, - "workload_type": types.StringType, + "state": ServedModelState{}.Type(ctx), + "workload_size": types.StringType, + "workload_type": types.StringType, }, } } @@ -5834,7 +5832,10 @@ func (o *ServedModelOutput) GetState(ctx context.Context) (ServedModelState, boo return e, false } var v []ServedModelState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5846,9 +5847,8 @@ func (o *ServedModelOutput) GetState(ctx context.Context) (ServedModelState, boo // SetState sets the value of the State field in ServedModelOutput. func (o *ServedModelOutput) SetState(ctx context.Context, v ServedModelState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } type ServedModelSpec struct { @@ -6006,9 +6006,9 @@ func (o ServerLogsResponse) Type(ctx context.Context) attr.Type { type ServingEndpoint struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` // The config that is currently being served by the endpoint. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // The timestamp when the endpoint was created in Unix time. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` // The email of the user who created the serving endpoint. @@ -6021,7 +6021,7 @@ type ServingEndpoint struct { // The name of the serving endpoint. Name types.String `tfsdk:"name" tf:"optional"` // Information corresponding to the state of the serving endpoint. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // Tags attached to the serving endpoint. Tags types.List `tfsdk:"tags" tf:"optional"` // The task type of the serving endpoint. @@ -6074,20 +6074,14 @@ func (o ServingEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o ServingEndpoint) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), - }, - "config": basetypes.ListType{ - ElemType: EndpointCoreConfigSummary{}.Type(ctx), - }, + "ai_gateway": AiGatewayConfig{}.Type(ctx), + "config": EndpointCoreConfigSummary{}.Type(ctx), "creation_timestamp": types.Int64Type, "creator": types.StringType, "id": types.StringType, "last_updated_timestamp": types.Int64Type, "name": types.StringType, - "state": basetypes.ListType{ - ElemType: EndpointState{}.Type(ctx), - }, + "state": EndpointState{}.Type(ctx), "tags": basetypes.ListType{ ElemType: EndpointTag{}.Type(ctx), }, @@ -6105,7 +6099,10 @@ func (o *ServingEndpoint) GetAiGateway(ctx context.Context) (AiGatewayConfig, bo return e, false } var v []AiGatewayConfig - d := o.AiGateway.ElementsAs(ctx, &v, true) + d := o.AiGateway.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6117,9 +6114,8 @@ func (o *ServingEndpoint) GetAiGateway(ctx context.Context) (AiGatewayConfig, bo // SetAiGateway sets the value of the AiGateway field in ServingEndpoint. func (o *ServingEndpoint) SetAiGateway(ctx context.Context, v AiGatewayConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] - o.AiGateway = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AiGateway = vs } // GetConfig returns the value of the Config field in ServingEndpoint as @@ -6131,7 +6127,10 @@ func (o *ServingEndpoint) GetConfig(ctx context.Context) (EndpointCoreConfigSumm return e, false } var v []EndpointCoreConfigSummary - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6143,9 +6142,8 @@ func (o *ServingEndpoint) GetConfig(ctx context.Context) (EndpointCoreConfigSumm // SetConfig sets the value of the Config field in ServingEndpoint. func (o *ServingEndpoint) SetConfig(ctx context.Context, v EndpointCoreConfigSummary) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // GetState returns the value of the State field in ServingEndpoint as @@ -6157,7 +6155,10 @@ func (o *ServingEndpoint) GetState(ctx context.Context) (EndpointState, bool) { return e, false } var v []EndpointState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6169,9 +6170,8 @@ func (o *ServingEndpoint) GetState(ctx context.Context) (EndpointState, bool) { // SetState sets the value of the State field in ServingEndpoint. func (o *ServingEndpoint) SetState(ctx context.Context, v EndpointState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetTags returns the value of the Tags field in ServingEndpoint as @@ -6345,15 +6345,15 @@ func (o *ServingEndpointAccessControlResponse) SetAllPermissions(ctx context.Con type ServingEndpointDetailed struct { // The AI Gateway configuration for the serving endpoint. NOTE: Only // external model endpoints are currently supported. - AiGateway types.List `tfsdk:"ai_gateway" tf:"optional,object"` + AiGateway types.Object `tfsdk:"ai_gateway" tf:"optional,object"` // The config that is currently being served by the endpoint. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // The timestamp when the endpoint was created in Unix time. CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` // The email of the user who created the serving endpoint. Creator types.String `tfsdk:"creator" tf:"optional"` // Information required to query DataPlane APIs. - DataPlaneInfo types.List `tfsdk:"data_plane_info" tf:"optional,object"` + DataPlaneInfo types.Object `tfsdk:"data_plane_info" tf:"optional,object"` // Endpoint invocation url if route optimization is enabled for endpoint EndpointUrl types.String `tfsdk:"endpoint_url" tf:"optional"` // System-generated ID of the endpoint. This is used to refer to the @@ -6364,14 +6364,14 @@ type ServingEndpointDetailed struct { // The name of the serving endpoint. Name types.String `tfsdk:"name" tf:"optional"` // The config that the endpoint is attempting to update to. - PendingConfig types.List `tfsdk:"pending_config" tf:"optional,object"` + PendingConfig types.Object `tfsdk:"pending_config" tf:"optional,object"` // The permission level of the principal making the request. PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` // Boolean representing if route optimization has been enabled for the // endpoint RouteOptimized types.Bool `tfsdk:"route_optimized" tf:"optional"` // Information corresponding to the state of the serving endpoint. - State types.List `tfsdk:"state" tf:"optional,object"` + State types.Object `tfsdk:"state" tf:"optional,object"` // Tags attached to the serving endpoint. Tags types.List `tfsdk:"tags" tf:"optional"` // The task type of the serving endpoint. @@ -6431,29 +6431,19 @@ func (o ServingEndpointDetailed) ToObjectValue(ctx context.Context) basetypes.Ob func (o ServingEndpointDetailed) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), - }, - "config": basetypes.ListType{ - ElemType: EndpointCoreConfigOutput{}.Type(ctx), - }, - "creation_timestamp": types.Int64Type, - "creator": types.StringType, - "data_plane_info": basetypes.ListType{ - ElemType: ModelDataPlaneInfo{}.Type(ctx), - }, + "ai_gateway": AiGatewayConfig{}.Type(ctx), + "config": EndpointCoreConfigOutput{}.Type(ctx), + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "data_plane_info": ModelDataPlaneInfo{}.Type(ctx), "endpoint_url": types.StringType, "id": types.StringType, "last_updated_timestamp": types.Int64Type, "name": types.StringType, - "pending_config": basetypes.ListType{ - ElemType: EndpointPendingConfig{}.Type(ctx), - }, - "permission_level": types.StringType, - "route_optimized": types.BoolType, - "state": basetypes.ListType{ - ElemType: EndpointState{}.Type(ctx), - }, + "pending_config": EndpointPendingConfig{}.Type(ctx), + "permission_level": types.StringType, + "route_optimized": types.BoolType, + "state": EndpointState{}.Type(ctx), "tags": basetypes.ListType{ ElemType: EndpointTag{}.Type(ctx), }, @@ -6471,7 +6461,10 @@ func (o *ServingEndpointDetailed) GetAiGateway(ctx context.Context) (AiGatewayCo return e, false } var v []AiGatewayConfig - d := o.AiGateway.ElementsAs(ctx, &v, true) + d := o.AiGateway.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6483,9 +6476,8 @@ func (o *ServingEndpointDetailed) GetAiGateway(ctx context.Context) (AiGatewayCo // SetAiGateway sets the value of the AiGateway field in ServingEndpointDetailed. func (o *ServingEndpointDetailed) SetAiGateway(ctx context.Context, v AiGatewayConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ai_gateway"] - o.AiGateway = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AiGateway = vs } // GetConfig returns the value of the Config field in ServingEndpointDetailed as @@ -6497,7 +6489,10 @@ func (o *ServingEndpointDetailed) GetConfig(ctx context.Context) (EndpointCoreCo return e, false } var v []EndpointCoreConfigOutput - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6509,9 +6504,8 @@ func (o *ServingEndpointDetailed) GetConfig(ctx context.Context) (EndpointCoreCo // SetConfig sets the value of the Config field in ServingEndpointDetailed. func (o *ServingEndpointDetailed) SetConfig(ctx context.Context, v EndpointCoreConfigOutput) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // GetDataPlaneInfo returns the value of the DataPlaneInfo field in ServingEndpointDetailed as @@ -6523,7 +6517,10 @@ func (o *ServingEndpointDetailed) GetDataPlaneInfo(ctx context.Context) (ModelDa return e, false } var v []ModelDataPlaneInfo - d := o.DataPlaneInfo.ElementsAs(ctx, &v, true) + d := o.DataPlaneInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6535,9 +6532,8 @@ func (o *ServingEndpointDetailed) GetDataPlaneInfo(ctx context.Context) (ModelDa // SetDataPlaneInfo sets the value of the DataPlaneInfo field in ServingEndpointDetailed. func (o *ServingEndpointDetailed) SetDataPlaneInfo(ctx context.Context, v ModelDataPlaneInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_plane_info"] - o.DataPlaneInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataPlaneInfo = vs } // GetPendingConfig returns the value of the PendingConfig field in ServingEndpointDetailed as @@ -6549,7 +6545,10 @@ func (o *ServingEndpointDetailed) GetPendingConfig(ctx context.Context) (Endpoin return e, false } var v []EndpointPendingConfig - d := o.PendingConfig.ElementsAs(ctx, &v, true) + d := o.PendingConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6561,9 +6560,8 @@ func (o *ServingEndpointDetailed) GetPendingConfig(ctx context.Context) (Endpoin // SetPendingConfig sets the value of the PendingConfig field in ServingEndpointDetailed. func (o *ServingEndpointDetailed) SetPendingConfig(ctx context.Context, v EndpointPendingConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pending_config"] - o.PendingConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PendingConfig = vs } // GetState returns the value of the State field in ServingEndpointDetailed as @@ -6575,7 +6573,10 @@ func (o *ServingEndpointDetailed) GetState(ctx context.Context) (EndpointState, return e, false } var v []EndpointState - d := o.State.ElementsAs(ctx, &v, true) + d := o.State.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6587,9 +6588,8 @@ func (o *ServingEndpointDetailed) GetState(ctx context.Context) (EndpointState, // SetState sets the value of the State field in ServingEndpointDetailed. func (o *ServingEndpointDetailed) SetState(ctx context.Context, v EndpointState) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["state"] - o.State = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.State = vs } // GetTags returns the value of the Tags field in ServingEndpointDetailed as @@ -6976,7 +6976,7 @@ type V1ResponseChoiceElement struct { // The logprobs returned only by the __completions__ endpoint. Logprobs types.Int64 `tfsdk:"logprobs" tf:"optional"` // The message response from the __chat__ endpoint. - Message types.List `tfsdk:"message" tf:"optional,object"` + Message types.Object `tfsdk:"message" tf:"optional,object"` // The text response from the __completions__ endpoint. Text types.String `tfsdk:"text" tf:"optional"` } @@ -7022,10 +7022,8 @@ func (o V1ResponseChoiceElement) Type(ctx context.Context) attr.Type { "finishReason": types.StringType, "index": types.Int64Type, "logprobs": types.Int64Type, - "message": basetypes.ListType{ - ElemType: ChatMessage{}.Type(ctx), - }, - "text": types.StringType, + "message": ChatMessage{}.Type(ctx), + "text": types.StringType, }, } } @@ -7039,7 +7037,10 @@ func (o *V1ResponseChoiceElement) GetMessage(ctx context.Context) (ChatMessage, return e, false } var v []ChatMessage - d := o.Message.ElementsAs(ctx, &v, true) + d := o.Message.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7051,7 +7052,6 @@ func (o *V1ResponseChoiceElement) GetMessage(ctx context.Context) (ChatMessage, // SetMessage sets the value of the Message field in V1ResponseChoiceElement. func (o *V1ResponseChoiceElement) SetMessage(ctx context.Context, v ChatMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["message"] - o.Message = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Message = vs } diff --git a/internal/service/settings_tf/legacy_model.go b/internal/service/settings_tf/legacy_model.go new file mode 100755 index 000000000..d6349566c --- /dev/null +++ b/internal/service/settings_tf/legacy_model.go @@ -0,0 +1,10080 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package settings_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AibiDashboardEmbeddingAccessPolicy_SdkV2 struct { + AccessPolicyType types.String `tfsdk:"access_policy_type" tf:""` +} + +func (newState *AibiDashboardEmbeddingAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingAccessPolicy_SdkV2) { +} + +func (newState *AibiDashboardEmbeddingAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AibiDashboardEmbeddingAccessPolicy_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, AibiDashboardEmbeddingAccessPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingAccessPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_policy_type": o.AccessPolicyType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AibiDashboardEmbeddingAccessPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_policy_type": types.StringType, + }, + } +} + +type AibiDashboardEmbeddingAccessPolicySetting_SdkV2 struct { + AibiDashboardEmbeddingAccessPolicy types.List `tfsdk:"aibi_dashboard_embedding_access_policy" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingAccessPolicySetting_SdkV2) { +} + +func (newState *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingAccessPolicySetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingAccessPolicySetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AibiDashboardEmbeddingAccessPolicySetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aibi_dashboard_embedding_access_policy": reflect.TypeOf(AibiDashboardEmbeddingAccessPolicy_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, AibiDashboardEmbeddingAccessPolicySetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingAccessPolicySetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aibi_dashboard_embedding_access_policy": o.AibiDashboardEmbeddingAccessPolicy, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AibiDashboardEmbeddingAccessPolicySetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aibi_dashboard_embedding_access_policy": basetypes.ListType{ + ElemType: AibiDashboardEmbeddingAccessPolicy{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetAibiDashboardEmbeddingAccessPolicy returns the value of the AibiDashboardEmbeddingAccessPolicy field in AibiDashboardEmbeddingAccessPolicySetting_SdkV2 as +// a AibiDashboardEmbeddingAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) GetAibiDashboardEmbeddingAccessPolicy(ctx context.Context) (AibiDashboardEmbeddingAccessPolicy_SdkV2, bool) { + var e AibiDashboardEmbeddingAccessPolicy_SdkV2 + if o.AibiDashboardEmbeddingAccessPolicy.IsNull() || o.AibiDashboardEmbeddingAccessPolicy.IsUnknown() { + return e, false + } + var v []AibiDashboardEmbeddingAccessPolicy_SdkV2 + d := o.AibiDashboardEmbeddingAccessPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAibiDashboardEmbeddingAccessPolicy sets the value of the AibiDashboardEmbeddingAccessPolicy field in AibiDashboardEmbeddingAccessPolicySetting_SdkV2. +func (o *AibiDashboardEmbeddingAccessPolicySetting_SdkV2) SetAibiDashboardEmbeddingAccessPolicy(ctx context.Context, v AibiDashboardEmbeddingAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aibi_dashboard_embedding_access_policy"] + o.AibiDashboardEmbeddingAccessPolicy = types.ListValueMust(t, vs) +} + +type AibiDashboardEmbeddingApprovedDomains_SdkV2 struct { + ApprovedDomains types.List `tfsdk:"approved_domains" tf:"optional"` +} + +func (newState *AibiDashboardEmbeddingApprovedDomains_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomains_SdkV2) { +} + +func (newState *AibiDashboardEmbeddingApprovedDomains_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomains_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomains. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AibiDashboardEmbeddingApprovedDomains_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "approved_domains": 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, AibiDashboardEmbeddingApprovedDomains_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingApprovedDomains_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "approved_domains": o.ApprovedDomains, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AibiDashboardEmbeddingApprovedDomains_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "approved_domains": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetApprovedDomains returns the value of the ApprovedDomains field in AibiDashboardEmbeddingApprovedDomains_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *AibiDashboardEmbeddingApprovedDomains_SdkV2) GetApprovedDomains(ctx context.Context) ([]types.String, bool) { + if o.ApprovedDomains.IsNull() || o.ApprovedDomains.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ApprovedDomains.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetApprovedDomains sets the value of the ApprovedDomains field in AibiDashboardEmbeddingApprovedDomains_SdkV2. +func (o *AibiDashboardEmbeddingApprovedDomains_SdkV2) SetApprovedDomains(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["approved_domains"] + t = t.(attr.TypeWithElementType).ElementType() + o.ApprovedDomains = types.ListValueMust(t, vs) +} + +type AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 struct { + AibiDashboardEmbeddingApprovedDomains types.List `tfsdk:"aibi_dashboard_embedding_approved_domains" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) { +} + +func (newState *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AibiDashboardEmbeddingApprovedDomainsSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aibi_dashboard_embedding_approved_domains": reflect.TypeOf(AibiDashboardEmbeddingApprovedDomains_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, AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aibi_dashboard_embedding_approved_domains": o.AibiDashboardEmbeddingApprovedDomains, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aibi_dashboard_embedding_approved_domains": basetypes.ListType{ + ElemType: AibiDashboardEmbeddingApprovedDomains{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetAibiDashboardEmbeddingApprovedDomains returns the value of the AibiDashboardEmbeddingApprovedDomains field in AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 as +// a AibiDashboardEmbeddingApprovedDomains_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) GetAibiDashboardEmbeddingApprovedDomains(ctx context.Context) (AibiDashboardEmbeddingApprovedDomains_SdkV2, bool) { + var e AibiDashboardEmbeddingApprovedDomains_SdkV2 + if o.AibiDashboardEmbeddingApprovedDomains.IsNull() || o.AibiDashboardEmbeddingApprovedDomains.IsUnknown() { + return e, false + } + var v []AibiDashboardEmbeddingApprovedDomains_SdkV2 + d := o.AibiDashboardEmbeddingApprovedDomains.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAibiDashboardEmbeddingApprovedDomains sets the value of the AibiDashboardEmbeddingApprovedDomains field in AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2. +func (o *AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) SetAibiDashboardEmbeddingApprovedDomains(ctx context.Context, v AibiDashboardEmbeddingApprovedDomains_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aibi_dashboard_embedding_approved_domains"] + o.AibiDashboardEmbeddingApprovedDomains = types.ListValueMust(t, vs) +} + +type AutomaticClusterUpdateSetting_SdkV2 struct { + AutomaticClusterUpdateWorkspace types.List `tfsdk:"automatic_cluster_update_workspace" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *AutomaticClusterUpdateSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AutomaticClusterUpdateSetting_SdkV2) { +} + +func (newState *AutomaticClusterUpdateSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState AutomaticClusterUpdateSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AutomaticClusterUpdateSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AutomaticClusterUpdateSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "automatic_cluster_update_workspace": reflect.TypeOf(ClusterAutoRestartMessage_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, AutomaticClusterUpdateSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AutomaticClusterUpdateSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "automatic_cluster_update_workspace": o.AutomaticClusterUpdateWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AutomaticClusterUpdateSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "automatic_cluster_update_workspace": basetypes.ListType{ + ElemType: ClusterAutoRestartMessage{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetAutomaticClusterUpdateWorkspace returns the value of the AutomaticClusterUpdateWorkspace field in AutomaticClusterUpdateSetting_SdkV2 as +// a ClusterAutoRestartMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AutomaticClusterUpdateSetting_SdkV2) GetAutomaticClusterUpdateWorkspace(ctx context.Context) (ClusterAutoRestartMessage_SdkV2, bool) { + var e ClusterAutoRestartMessage_SdkV2 + if o.AutomaticClusterUpdateWorkspace.IsNull() || o.AutomaticClusterUpdateWorkspace.IsUnknown() { + return e, false + } + var v []ClusterAutoRestartMessage_SdkV2 + d := o.AutomaticClusterUpdateWorkspace.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAutomaticClusterUpdateWorkspace sets the value of the AutomaticClusterUpdateWorkspace field in AutomaticClusterUpdateSetting_SdkV2. +func (o *AutomaticClusterUpdateSetting_SdkV2) SetAutomaticClusterUpdateWorkspace(ctx context.Context, v ClusterAutoRestartMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["automatic_cluster_update_workspace"] + o.AutomaticClusterUpdateWorkspace = types.ListValueMust(t, vs) +} + +type BooleanMessage_SdkV2 struct { + Value types.Bool `tfsdk:"value" tf:"optional"` +} + +func (newState *BooleanMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BooleanMessage_SdkV2) { +} + +func (newState *BooleanMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState BooleanMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BooleanMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BooleanMessage_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, BooleanMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BooleanMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BooleanMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": types.BoolType, + }, + } +} + +type ClusterAutoRestartMessage_SdkV2 struct { + CanToggle types.Bool `tfsdk:"can_toggle" tf:"optional"` + + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // Contains an information about the enablement status judging (e.g. whether + // the enterprise tier is enabled) This is only additional information that + // MUST NOT be used to decide whether the setting is enabled or not. This is + // intended to use only for purposes like showing an error message to the + // customer with the additional details. For example, using these details we + // can check why exactly the feature is disabled for this customer. + EnablementDetails types.List `tfsdk:"enablement_details" tf:"optional,object"` + + MaintenanceWindow types.List `tfsdk:"maintenance_window" tf:"optional,object"` + + RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:"optional"` +} + +func (newState *ClusterAutoRestartMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessage_SdkV2) { +} + +func (newState *ClusterAutoRestartMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAutoRestartMessage_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "enablement_details": reflect.TypeOf(ClusterAutoRestartMessageEnablementDetails_SdkV2{}), + "maintenance_window": reflect.TypeOf(ClusterAutoRestartMessageMaintenanceWindow_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, ClusterAutoRestartMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "can_toggle": o.CanToggle, + "enabled": o.Enabled, + "enablement_details": o.EnablementDetails, + "maintenance_window": o.MaintenanceWindow, + "restart_even_if_no_updates_available": o.RestartEvenIfNoUpdatesAvailable, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAutoRestartMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "can_toggle": types.BoolType, + "enabled": types.BoolType, + "enablement_details": basetypes.ListType{ + ElemType: ClusterAutoRestartMessageEnablementDetails{}.Type(ctx), + }, + "maintenance_window": basetypes.ListType{ + ElemType: ClusterAutoRestartMessageMaintenanceWindow{}.Type(ctx), + }, + "restart_even_if_no_updates_available": types.BoolType, + }, + } +} + +// GetEnablementDetails returns the value of the EnablementDetails field in ClusterAutoRestartMessage_SdkV2 as +// a ClusterAutoRestartMessageEnablementDetails_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAutoRestartMessage_SdkV2) GetEnablementDetails(ctx context.Context) (ClusterAutoRestartMessageEnablementDetails_SdkV2, bool) { + var e ClusterAutoRestartMessageEnablementDetails_SdkV2 + if o.EnablementDetails.IsNull() || o.EnablementDetails.IsUnknown() { + return e, false + } + var v []ClusterAutoRestartMessageEnablementDetails_SdkV2 + d := o.EnablementDetails.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEnablementDetails sets the value of the EnablementDetails field in ClusterAutoRestartMessage_SdkV2. +func (o *ClusterAutoRestartMessage_SdkV2) SetEnablementDetails(ctx context.Context, v ClusterAutoRestartMessageEnablementDetails_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enablement_details"] + o.EnablementDetails = types.ListValueMust(t, vs) +} + +// GetMaintenanceWindow returns the value of the MaintenanceWindow field in ClusterAutoRestartMessage_SdkV2 as +// a ClusterAutoRestartMessageMaintenanceWindow_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAutoRestartMessage_SdkV2) GetMaintenanceWindow(ctx context.Context) (ClusterAutoRestartMessageMaintenanceWindow_SdkV2, bool) { + var e ClusterAutoRestartMessageMaintenanceWindow_SdkV2 + if o.MaintenanceWindow.IsNull() || o.MaintenanceWindow.IsUnknown() { + return e, false + } + var v []ClusterAutoRestartMessageMaintenanceWindow_SdkV2 + d := o.MaintenanceWindow.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMaintenanceWindow sets the value of the MaintenanceWindow field in ClusterAutoRestartMessage_SdkV2. +func (o *ClusterAutoRestartMessage_SdkV2) SetMaintenanceWindow(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindow_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maintenance_window"] + o.MaintenanceWindow = types.ListValueMust(t, vs) +} + +// 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. +type ClusterAutoRestartMessageEnablementDetails_SdkV2 struct { + // The feature is force enabled if compliance mode is active + ForcedForComplianceMode types.Bool `tfsdk:"forced_for_compliance_mode" tf:"optional"` + // The feature is unavailable if the corresponding entitlement disabled (see + // getShieldEntitlementEnable) + UnavailableForDisabledEntitlement types.Bool `tfsdk:"unavailable_for_disabled_entitlement" tf:"optional"` + // The feature is unavailable if the customer doesn't have enterprise tier + UnavailableForNonEnterpriseTier types.Bool `tfsdk:"unavailable_for_non_enterprise_tier" tf:"optional"` +} + +func (newState *ClusterAutoRestartMessageEnablementDetails_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageEnablementDetails_SdkV2) { +} + +func (newState *ClusterAutoRestartMessageEnablementDetails_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageEnablementDetails_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageEnablementDetails. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAutoRestartMessageEnablementDetails_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, ClusterAutoRestartMessageEnablementDetails_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageEnablementDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "forced_for_compliance_mode": o.ForcedForComplianceMode, + "unavailable_for_disabled_entitlement": o.UnavailableForDisabledEntitlement, + "unavailable_for_non_enterprise_tier": o.UnavailableForNonEnterpriseTier, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAutoRestartMessageEnablementDetails_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "forced_for_compliance_mode": types.BoolType, + "unavailable_for_disabled_entitlement": types.BoolType, + "unavailable_for_non_enterprise_tier": types.BoolType, + }, + } +} + +type ClusterAutoRestartMessageMaintenanceWindow_SdkV2 struct { + WeekDayBasedSchedule types.List `tfsdk:"week_day_based_schedule" tf:"optional,object"` +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindow_SdkV2) { +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindow_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindow. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAutoRestartMessageMaintenanceWindow_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "week_day_based_schedule": reflect.TypeOf(ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_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, ClusterAutoRestartMessageMaintenanceWindow_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindow_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "week_day_based_schedule": o.WeekDayBasedSchedule, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAutoRestartMessageMaintenanceWindow_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "week_day_based_schedule": basetypes.ListType{ + ElemType: ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{}.Type(ctx), + }, + }, + } +} + +// GetWeekDayBasedSchedule returns the value of the WeekDayBasedSchedule field in ClusterAutoRestartMessageMaintenanceWindow_SdkV2 as +// a ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) GetWeekDayBasedSchedule(ctx context.Context) (ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2, bool) { + var e ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 + if o.WeekDayBasedSchedule.IsNull() || o.WeekDayBasedSchedule.IsUnknown() { + return e, false + } + var v []ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 + d := o.WeekDayBasedSchedule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWeekDayBasedSchedule sets the value of the WeekDayBasedSchedule field in ClusterAutoRestartMessageMaintenanceWindow_SdkV2. +func (o *ClusterAutoRestartMessageMaintenanceWindow_SdkV2) SetWeekDayBasedSchedule(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["week_day_based_schedule"] + o.WeekDayBasedSchedule = types.ListValueMust(t, vs) +} + +type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 struct { + DayOfWeek types.String `tfsdk:"day_of_week" tf:"optional"` + + Frequency types.String `tfsdk:"frequency" tf:"optional"` + + WindowStartTime types.List `tfsdk:"window_start_time" tf:"optional,object"` +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) { +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "window_start_time": reflect.TypeOf(ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_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, ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "day_of_week": o.DayOfWeek, + "frequency": o.Frequency, + "window_start_time": o.WindowStartTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "day_of_week": types.StringType, + "frequency": types.StringType, + "window_start_time": basetypes.ListType{ + ElemType: ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{}.Type(ctx), + }, + }, + } +} + +// GetWindowStartTime returns the value of the WindowStartTime field in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2 as +// a ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) GetWindowStartTime(ctx context.Context) (ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2, bool) { + var e ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 + if o.WindowStartTime.IsNull() || o.WindowStartTime.IsUnknown() { + return e, false + } + var v []ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 + d := o.WindowStartTime.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetWindowStartTime sets the value of the WindowStartTime field in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2. +func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) SetWindowStartTime(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["window_start_time"] + o.WindowStartTime = types.ListValueMust(t, vs) +} + +type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 struct { + Hours types.Int64 `tfsdk:"hours" tf:"optional"` + + Minutes types.Int64 `tfsdk:"minutes" tf:"optional"` +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) { +} + +func (newState *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) SyncEffectiveFieldsDuringRead(existingState ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ClusterAutoRestartMessageMaintenanceWindowWindowStartTime. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_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, ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "hours": o.Hours, + "minutes": o.Minutes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "hours": types.Int64Type, + "minutes": types.Int64Type, + }, + } +} + +// SHIELD feature: CSP +type ComplianceSecurityProfile_SdkV2 struct { + // Set by customers when they request Compliance Security Profile (CSP) + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + + IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` +} + +func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfile_SdkV2) { +} + +func (newState *ComplianceSecurityProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfile_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfile. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ComplianceSecurityProfile_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "compliance_standards": 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, ComplianceSecurityProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ComplianceSecurityProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "compliance_standards": o.ComplianceStandards, + "is_enabled": o.IsEnabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ComplianceSecurityProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "compliance_standards": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_enabled": types.BoolType, + }, + } +} + +// GetComplianceStandards returns the value of the ComplianceStandards field in ComplianceSecurityProfile_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ComplianceSecurityProfile_SdkV2) GetComplianceStandards(ctx context.Context) ([]types.String, bool) { + if o.ComplianceStandards.IsNull() || o.ComplianceStandards.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ComplianceStandards.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetComplianceStandards sets the value of the ComplianceStandards field in ComplianceSecurityProfile_SdkV2. +func (o *ComplianceSecurityProfile_SdkV2) SetComplianceStandards(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["compliance_standards"] + t = t.(attr.TypeWithElementType).ElementType() + o.ComplianceStandards = types.ListValueMust(t, vs) +} + +type ComplianceSecurityProfileSetting_SdkV2 struct { + // SHIELD feature: CSP + ComplianceSecurityProfileWorkspace types.List `tfsdk:"compliance_security_profile_workspace" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *ComplianceSecurityProfileSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ComplianceSecurityProfileSetting_SdkV2) { +} + +func (newState *ComplianceSecurityProfileSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState ComplianceSecurityProfileSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ComplianceSecurityProfileSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ComplianceSecurityProfileSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "compliance_security_profile_workspace": reflect.TypeOf(ComplianceSecurityProfile_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, ComplianceSecurityProfileSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ComplianceSecurityProfileSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "compliance_security_profile_workspace": o.ComplianceSecurityProfileWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ComplianceSecurityProfileSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "compliance_security_profile_workspace": basetypes.ListType{ + ElemType: ComplianceSecurityProfile{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetComplianceSecurityProfileWorkspace returns the value of the ComplianceSecurityProfileWorkspace field in ComplianceSecurityProfileSetting_SdkV2 as +// a ComplianceSecurityProfile_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ComplianceSecurityProfileSetting_SdkV2) GetComplianceSecurityProfileWorkspace(ctx context.Context) (ComplianceSecurityProfile_SdkV2, bool) { + var e ComplianceSecurityProfile_SdkV2 + if o.ComplianceSecurityProfileWorkspace.IsNull() || o.ComplianceSecurityProfileWorkspace.IsUnknown() { + return e, false + } + var v []ComplianceSecurityProfile_SdkV2 + d := o.ComplianceSecurityProfileWorkspace.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetComplianceSecurityProfileWorkspace sets the value of the ComplianceSecurityProfileWorkspace field in ComplianceSecurityProfileSetting_SdkV2. +func (o *ComplianceSecurityProfileSetting_SdkV2) SetComplianceSecurityProfileWorkspace(ctx context.Context, v ComplianceSecurityProfile_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["compliance_security_profile_workspace"] + o.ComplianceSecurityProfileWorkspace = types.ListValueMust(t, vs) +} + +type Config_SdkV2 struct { + Email types.List `tfsdk:"email" tf:"optional,object"` + + GenericWebhook types.List `tfsdk:"generic_webhook" tf:"optional,object"` + + MicrosoftTeams types.List `tfsdk:"microsoft_teams" tf:"optional,object"` + + Pagerduty types.List `tfsdk:"pagerduty" tf:"optional,object"` + + Slack types.List `tfsdk:"slack" tf:"optional,object"` +} + +func (newState *Config_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Config_SdkV2) { +} + +func (newState *Config_SdkV2) SyncEffectiveFieldsDuringRead(existingState Config_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Config. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Config_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "email": reflect.TypeOf(EmailConfig_SdkV2{}), + "generic_webhook": reflect.TypeOf(GenericWebhookConfig_SdkV2{}), + "microsoft_teams": reflect.TypeOf(MicrosoftTeamsConfig_SdkV2{}), + "pagerduty": reflect.TypeOf(PagerdutyConfig_SdkV2{}), + "slack": reflect.TypeOf(SlackConfig_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, Config_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Config_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "email": o.Email, + "generic_webhook": o.GenericWebhook, + "microsoft_teams": o.MicrosoftTeams, + "pagerduty": o.Pagerduty, + "slack": o.Slack, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Config_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "email": basetypes.ListType{ + ElemType: EmailConfig{}.Type(ctx), + }, + "generic_webhook": basetypes.ListType{ + ElemType: GenericWebhookConfig{}.Type(ctx), + }, + "microsoft_teams": basetypes.ListType{ + ElemType: MicrosoftTeamsConfig{}.Type(ctx), + }, + "pagerduty": basetypes.ListType{ + ElemType: PagerdutyConfig{}.Type(ctx), + }, + "slack": basetypes.ListType{ + ElemType: SlackConfig{}.Type(ctx), + }, + }, + } +} + +// GetEmail returns the value of the Email field in Config_SdkV2 as +// a EmailConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Config_SdkV2) GetEmail(ctx context.Context) (EmailConfig_SdkV2, bool) { + var e EmailConfig_SdkV2 + if o.Email.IsNull() || o.Email.IsUnknown() { + return e, false + } + var v []EmailConfig_SdkV2 + d := o.Email.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEmail sets the value of the Email field in Config_SdkV2. +func (o *Config_SdkV2) SetEmail(ctx context.Context, v EmailConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email"] + o.Email = types.ListValueMust(t, vs) +} + +// GetGenericWebhook returns the value of the GenericWebhook field in Config_SdkV2 as +// a GenericWebhookConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Config_SdkV2) GetGenericWebhook(ctx context.Context) (GenericWebhookConfig_SdkV2, bool) { + var e GenericWebhookConfig_SdkV2 + if o.GenericWebhook.IsNull() || o.GenericWebhook.IsUnknown() { + return e, false + } + var v []GenericWebhookConfig_SdkV2 + d := o.GenericWebhook.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGenericWebhook sets the value of the GenericWebhook field in Config_SdkV2. +func (o *Config_SdkV2) SetGenericWebhook(ctx context.Context, v GenericWebhookConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["generic_webhook"] + o.GenericWebhook = types.ListValueMust(t, vs) +} + +// GetMicrosoftTeams returns the value of the MicrosoftTeams field in Config_SdkV2 as +// a MicrosoftTeamsConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Config_SdkV2) GetMicrosoftTeams(ctx context.Context) (MicrosoftTeamsConfig_SdkV2, bool) { + var e MicrosoftTeamsConfig_SdkV2 + if o.MicrosoftTeams.IsNull() || o.MicrosoftTeams.IsUnknown() { + return e, false + } + var v []MicrosoftTeamsConfig_SdkV2 + d := o.MicrosoftTeams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMicrosoftTeams sets the value of the MicrosoftTeams field in Config_SdkV2. +func (o *Config_SdkV2) SetMicrosoftTeams(ctx context.Context, v MicrosoftTeamsConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["microsoft_teams"] + o.MicrosoftTeams = types.ListValueMust(t, vs) +} + +// GetPagerduty returns the value of the Pagerduty field in Config_SdkV2 as +// a PagerdutyConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Config_SdkV2) GetPagerduty(ctx context.Context) (PagerdutyConfig_SdkV2, bool) { + var e PagerdutyConfig_SdkV2 + if o.Pagerduty.IsNull() || o.Pagerduty.IsUnknown() { + return e, false + } + var v []PagerdutyConfig_SdkV2 + d := o.Pagerduty.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPagerduty sets the value of the Pagerduty field in Config_SdkV2. +func (o *Config_SdkV2) SetPagerduty(ctx context.Context, v PagerdutyConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pagerduty"] + o.Pagerduty = types.ListValueMust(t, vs) +} + +// GetSlack returns the value of the Slack field in Config_SdkV2 as +// a SlackConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Config_SdkV2) GetSlack(ctx context.Context) (SlackConfig_SdkV2, bool) { + var e SlackConfig_SdkV2 + if o.Slack.IsNull() || o.Slack.IsUnknown() { + return e, false + } + var v []SlackConfig_SdkV2 + d := o.Slack.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSlack sets the value of the Slack field in Config_SdkV2. +func (o *Config_SdkV2) SetSlack(ctx context.Context, v SlackConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["slack"] + o.Slack = types.ListValueMust(t, vs) +} + +// Details required to configure a block list or allow list. +type CreateIpAccessList_SdkV2 struct { + IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + // Label for the IP access list. This **cannot** be empty. + Label types.String `tfsdk:"label" tf:""` + // Type of IP access list. Valid values are as follows and are + // case-sensitive: + // + // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block + // list. Exclude this IP or range. IP addresses in the block list are + // excluded even if they are included in an allow list. + ListType types.String `tfsdk:"list_type" tf:""` +} + +func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessList_SdkV2) { +} + +func (newState *CreateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateIpAccessList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_addresses": 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, CreateIpAccessList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateIpAccessList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_addresses": o.IpAddresses, + "label": o.Label, + "list_type": o.ListType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateIpAccessList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + "label": types.StringType, + "list_type": types.StringType, + }, + } +} + +// GetIpAddresses returns the value of the IpAddresses field in CreateIpAccessList_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateIpAccessList_SdkV2) GetIpAddresses(ctx context.Context) ([]types.String, bool) { + if o.IpAddresses.IsNull() || o.IpAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.IpAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAddresses sets the value of the IpAddresses field in CreateIpAccessList_SdkV2. +func (o *CreateIpAccessList_SdkV2) SetIpAddresses(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["ip_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAddresses = types.ListValueMust(t, vs) +} + +// An IP access list was successfully created. +type CreateIpAccessListResponse_SdkV2 struct { + // Definition of an IP Access list + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` +} + +func (newState *CreateIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessListResponse_SdkV2) { +} + +func (newState *CreateIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateIpAccessListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateIpAccessListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateIpAccessListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessListInfo_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, CreateIpAccessListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateIpAccessListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessListInfo{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in CreateIpAccessListResponse_SdkV2 as +// a IpAccessListInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateIpAccessListResponse_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessListInfo_SdkV2, bool) { + var e IpAccessListInfo_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessListInfo_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in CreateIpAccessListResponse_SdkV2. +func (o *CreateIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessListInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +type CreateNetworkConnectivityConfigRequest_SdkV2 struct { + // The name of the network connectivity configuration. The name can contain + // alphanumeric characters, hyphens, and underscores. The length must be + // between 3 and 30 characters. The name must match the regular expression + // `^[0-9a-zA-Z-_]{3,30}$`. + Name types.String `tfsdk:"name" tf:""` + // The region for the network connectivity configuration. Only workspaces in + // the same region can be attached to the network connectivity + // configuration. + Region types.String `tfsdk:"region" tf:""` +} + +func (newState *CreateNetworkConnectivityConfigRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNetworkConnectivityConfigRequest_SdkV2) { +} + +func (newState *CreateNetworkConnectivityConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNetworkConnectivityConfigRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateNetworkConnectivityConfigRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateNetworkConnectivityConfigRequest_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, CreateNetworkConnectivityConfigRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateNetworkConnectivityConfigRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "region": o.Region, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateNetworkConnectivityConfigRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "region": types.StringType, + }, + } +} + +type CreateNotificationDestinationRequest_SdkV2 struct { + // The configuration for the notification destination. Must wrap EXACTLY one + // of the nested configs. + Config types.List `tfsdk:"config" tf:"optional,object"` + // The display name for the notification destination. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` +} + +func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateNotificationDestinationRequest_SdkV2) { +} + +func (newState *CreateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateNotificationDestinationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateNotificationDestinationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "config": reflect.TypeOf(Config_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, CreateNotificationDestinationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateNotificationDestinationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config": o.Config, + "display_name": o.DisplayName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateNotificationDestinationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config": basetypes.ListType{ + ElemType: Config{}.Type(ctx), + }, + "display_name": types.StringType, + }, + } +} + +// GetConfig returns the value of the Config field in CreateNotificationDestinationRequest_SdkV2 as +// a Config_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateNotificationDestinationRequest_SdkV2) GetConfig(ctx context.Context) (Config_SdkV2, bool) { + var e Config_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []Config_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in CreateNotificationDestinationRequest_SdkV2. +func (o *CreateNotificationDestinationRequest_SdkV2) SetConfig(ctx context.Context, v Config_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// Configuration details for creating on-behalf tokens. +type CreateOboTokenRequest_SdkV2 struct { + // Application ID of the service principal. + ApplicationId types.String `tfsdk:"application_id" tf:""` + // Comment that describes the purpose of the token. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The number of seconds before the token expires. + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` +} + +func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenRequest_SdkV2) { +} + +func (newState *CreateOboTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateOboTokenRequest_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, CreateOboTokenRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateOboTokenRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "application_id": o.ApplicationId, + "comment": o.Comment, + "lifetime_seconds": o.LifetimeSeconds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateOboTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "application_id": types.StringType, + "comment": types.StringType, + "lifetime_seconds": types.Int64Type, + }, + } +} + +// An on-behalf token was successfully created for the service principal. +type CreateOboTokenResponse_SdkV2 struct { + TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + // Value of the token. + TokenValue types.String `tfsdk:"token_value" tf:"optional"` +} + +func (newState *CreateOboTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateOboTokenResponse_SdkV2) { +} + +func (newState *CreateOboTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateOboTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateOboTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateOboTokenResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_info": reflect.TypeOf(TokenInfo_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, CreateOboTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateOboTokenResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_info": o.TokenInfo, + "token_value": o.TokenValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateOboTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_info": basetypes.ListType{ + ElemType: TokenInfo{}.Type(ctx), + }, + "token_value": types.StringType, + }, + } +} + +// GetTokenInfo returns the value of the TokenInfo field in CreateOboTokenResponse_SdkV2 as +// a TokenInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateOboTokenResponse_SdkV2) GetTokenInfo(ctx context.Context) (TokenInfo_SdkV2, bool) { + var e TokenInfo_SdkV2 + if o.TokenInfo.IsNull() || o.TokenInfo.IsUnknown() { + return e, false + } + var v []TokenInfo_SdkV2 + d := o.TokenInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenInfo sets the value of the TokenInfo field in CreateOboTokenResponse_SdkV2. +func (o *CreateOboTokenResponse_SdkV2) SetTokenInfo(ctx context.Context, v TokenInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] + o.TokenInfo = types.ListValueMust(t, vs) +} + +type CreatePrivateEndpointRuleRequest_SdkV2 struct { + // The sub-resource type (group ID) of the target resource. Note that to + // connect to workspace root storage (root DBFS), you need two endpoints, + // one for `blob` and one for `dfs`. + GroupId types.String `tfsdk:"group_id" tf:""` + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` + // The Azure resource ID of the target resource. + ResourceId types.String `tfsdk:"resource_id" tf:""` +} + +func (newState *CreatePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreatePrivateEndpointRuleRequest_SdkV2) { +} + +func (newState *CreatePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreatePrivateEndpointRuleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreatePrivateEndpointRuleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreatePrivateEndpointRuleRequest_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, CreatePrivateEndpointRuleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreatePrivateEndpointRuleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_id": o.GroupId, + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "resource_id": o.ResourceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreatePrivateEndpointRuleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_id": types.StringType, + "network_connectivity_config_id": types.StringType, + "resource_id": types.StringType, + }, + } +} + +type CreateTokenRequest_SdkV2 struct { + // Optional description to attach to the token. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The lifetime of the token, in seconds. + // + // If the lifetime is not specified, this token remains valid indefinitely. + LifetimeSeconds types.Int64 `tfsdk:"lifetime_seconds" tf:"optional"` +} + +func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenRequest_SdkV2) { +} + +func (newState *CreateTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTokenRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateTokenRequest_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, CreateTokenRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateTokenRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "lifetime_seconds": o.LifetimeSeconds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "lifetime_seconds": types.Int64Type, + }, + } +} + +type CreateTokenResponse_SdkV2 struct { + // The information for the new token. + TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + // The value of the new token. + TokenValue types.String `tfsdk:"token_value" tf:"optional"` +} + +func (newState *CreateTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateTokenResponse_SdkV2) { +} + +func (newState *CreateTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateTokenResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_info": reflect.TypeOf(PublicTokenInfo_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, CreateTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateTokenResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_info": o.TokenInfo, + "token_value": o.TokenValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_info": basetypes.ListType{ + ElemType: PublicTokenInfo{}.Type(ctx), + }, + "token_value": types.StringType, + }, + } +} + +// GetTokenInfo returns the value of the TokenInfo field in CreateTokenResponse_SdkV2 as +// a PublicTokenInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateTokenResponse_SdkV2) GetTokenInfo(ctx context.Context) (PublicTokenInfo_SdkV2, bool) { + var e PublicTokenInfo_SdkV2 + if o.TokenInfo.IsNull() || o.TokenInfo.IsUnknown() { + return e, false + } + var v []PublicTokenInfo_SdkV2 + d := o.TokenInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenInfo sets the value of the TokenInfo field in CreateTokenResponse_SdkV2. +func (o *CreateTokenResponse_SdkV2) SetTokenInfo(ctx context.Context, v PublicTokenInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] + o.TokenInfo = types.ListValueMust(t, vs) +} + +// Account level policy for CSP +type CspEnablementAccount_SdkV2 struct { + // Set by customers when they request Compliance Security Profile (CSP) + // Invariants are enforced in Settings policy. + ComplianceStandards types.List `tfsdk:"compliance_standards" tf:"optional"` + // Enforced = it cannot be overriden at workspace level. + IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` +} + +func (newState *CspEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccount_SdkV2) { +} + +func (newState *CspEnablementAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccount_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccount. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CspEnablementAccount_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "compliance_standards": 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, CspEnablementAccount_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CspEnablementAccount_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "compliance_standards": o.ComplianceStandards, + "is_enforced": o.IsEnforced, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CspEnablementAccount_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "compliance_standards": basetypes.ListType{ + ElemType: types.StringType, + }, + "is_enforced": types.BoolType, + }, + } +} + +// GetComplianceStandards returns the value of the ComplianceStandards field in CspEnablementAccount_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CspEnablementAccount_SdkV2) GetComplianceStandards(ctx context.Context) ([]types.String, bool) { + if o.ComplianceStandards.IsNull() || o.ComplianceStandards.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ComplianceStandards.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetComplianceStandards sets the value of the ComplianceStandards field in CspEnablementAccount_SdkV2. +func (o *CspEnablementAccount_SdkV2) SetComplianceStandards(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["compliance_standards"] + t = t.(attr.TypeWithElementType).ElementType() + o.ComplianceStandards = types.ListValueMust(t, vs) +} + +type CspEnablementAccountSetting_SdkV2 struct { + // Account level policy for CSP + CspEnablementAccount types.List `tfsdk:"csp_enablement_account" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *CspEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CspEnablementAccountSetting_SdkV2) { +} + +func (newState *CspEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState CspEnablementAccountSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CspEnablementAccountSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CspEnablementAccountSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "csp_enablement_account": reflect.TypeOf(CspEnablementAccount_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, CspEnablementAccountSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CspEnablementAccountSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "csp_enablement_account": o.CspEnablementAccount, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CspEnablementAccountSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "csp_enablement_account": basetypes.ListType{ + ElemType: CspEnablementAccount{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetCspEnablementAccount returns the value of the CspEnablementAccount field in CspEnablementAccountSetting_SdkV2 as +// a CspEnablementAccount_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CspEnablementAccountSetting_SdkV2) GetCspEnablementAccount(ctx context.Context) (CspEnablementAccount_SdkV2, bool) { + var e CspEnablementAccount_SdkV2 + if o.CspEnablementAccount.IsNull() || o.CspEnablementAccount.IsUnknown() { + return e, false + } + var v []CspEnablementAccount_SdkV2 + d := o.CspEnablementAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCspEnablementAccount sets the value of the CspEnablementAccount field in CspEnablementAccountSetting_SdkV2. +func (o *CspEnablementAccountSetting_SdkV2) SetCspEnablementAccount(ctx context.Context, v CspEnablementAccount_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["csp_enablement_account"] + o.CspEnablementAccount = types.ListValueMust(t, vs) +} + +// 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. +type DefaultNamespaceSetting_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + + Namespace types.List `tfsdk:"namespace" tf:"object"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *DefaultNamespaceSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DefaultNamespaceSetting_SdkV2) { +} + +func (newState *DefaultNamespaceSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState DefaultNamespaceSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DefaultNamespaceSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DefaultNamespaceSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "namespace": reflect.TypeOf(StringMessage_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, DefaultNamespaceSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DefaultNamespaceSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "namespace": o.Namespace, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DefaultNamespaceSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "namespace": basetypes.ListType{ + ElemType: StringMessage{}.Type(ctx), + }, + "setting_name": types.StringType, + }, + } +} + +// GetNamespace returns the value of the Namespace field in DefaultNamespaceSetting_SdkV2 as +// a StringMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DefaultNamespaceSetting_SdkV2) GetNamespace(ctx context.Context) (StringMessage_SdkV2, bool) { + var e StringMessage_SdkV2 + if o.Namespace.IsNull() || o.Namespace.IsUnknown() { + return e, false + } + var v []StringMessage_SdkV2 + d := o.Namespace.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNamespace sets the value of the Namespace field in DefaultNamespaceSetting_SdkV2. +func (o *DefaultNamespaceSetting_SdkV2) SetNamespace(ctx context.Context, v StringMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["namespace"] + o.Namespace = types.ListValueMust(t, vs) +} + +// Delete access list +type DeleteAccountIpAccessListRequest_SdkV2 struct { + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountIpAccessListRequest_SdkV2) { +} + +func (newState *DeleteAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountIpAccessListRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountIpAccessListRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountIpAccessListRequest_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, DeleteAccountIpAccessListRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountIpAccessListRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountIpAccessListRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list_id": types.StringType, + }, + } +} + +// Delete the AI/BI dashboard embedding access policy +type DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_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, DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) { +} + +func (newState *DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingAccessPolicySettingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_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, DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAibiDashboardEmbeddingAccessPolicySettingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete AI/BI dashboard embedding approved domains +type DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_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, DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) { +} + +func (newState *DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_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, DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete the default namespace setting +type DeleteDefaultNamespaceSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDefaultNamespaceSettingRequest_SdkV2) { +} + +func (newState *DeleteDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDefaultNamespaceSettingRequest_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, DeleteDefaultNamespaceSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDefaultNamespaceSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDefaultNamespaceSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteDefaultNamespaceSettingResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteDefaultNamespaceSettingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDefaultNamespaceSettingResponse_SdkV2) { +} + +func (newState *DeleteDefaultNamespaceSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDefaultNamespaceSettingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDefaultNamespaceSettingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDefaultNamespaceSettingResponse_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, DeleteDefaultNamespaceSettingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDefaultNamespaceSettingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDefaultNamespaceSettingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete Legacy Access Disablement Status +type DeleteDisableLegacyAccessRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyAccessRequest_SdkV2) { +} + +func (newState *DeleteDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyAccessRequest_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, DeleteDisableLegacyAccessRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyAccessRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyAccessRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteDisableLegacyAccessResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteDisableLegacyAccessResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyAccessResponse_SdkV2) { +} + +func (newState *DeleteDisableLegacyAccessResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyAccessResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyAccessResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyAccessResponse_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, DeleteDisableLegacyAccessResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyAccessResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyAccessResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete the disable legacy DBFS setting +type DeleteDisableLegacyDbfsRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyDbfsRequest_SdkV2) { +} + +func (newState *DeleteDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyDbfsRequest_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, DeleteDisableLegacyDbfsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyDbfsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyDbfsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteDisableLegacyDbfsResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteDisableLegacyDbfsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyDbfsResponse_SdkV2) { +} + +func (newState *DeleteDisableLegacyDbfsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyDbfsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyDbfsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyDbfsResponse_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, DeleteDisableLegacyDbfsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyDbfsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyDbfsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete the disable legacy features setting +type DeleteDisableLegacyFeaturesRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyFeaturesRequest_SdkV2) { +} + +func (newState *DeleteDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyFeaturesRequest_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, DeleteDisableLegacyFeaturesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyFeaturesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyFeaturesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteDisableLegacyFeaturesResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteDisableLegacyFeaturesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDisableLegacyFeaturesResponse_SdkV2) { +} + +func (newState *DeleteDisableLegacyFeaturesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDisableLegacyFeaturesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDisableLegacyFeaturesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDisableLegacyFeaturesResponse_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, DeleteDisableLegacyFeaturesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyFeaturesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDisableLegacyFeaturesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete access list +type DeleteIpAccessListRequest_SdkV2 struct { + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` +} + +func (newState *DeleteIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIpAccessListRequest_SdkV2) { +} + +func (newState *DeleteIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIpAccessListRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIpAccessListRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteIpAccessListRequest_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, DeleteIpAccessListRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteIpAccessListRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteIpAccessListRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list_id": types.StringType, + }, + } +} + +// Delete a network connectivity configuration +type DeleteNetworkConnectivityConfigurationRequest_SdkV2 struct { + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` +} + +func (newState *DeleteNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationRequest_SdkV2) { +} + +func (newState *DeleteNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteNetworkConnectivityConfigurationRequest_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, DeleteNetworkConnectivityConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteNetworkConnectivityConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteNetworkConnectivityConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_connectivity_config_id": types.StringType, + }, + } +} + +type DeleteNetworkConnectivityConfigurationResponse_SdkV2 struct { +} + +func (newState *DeleteNetworkConnectivityConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNetworkConnectivityConfigurationResponse_SdkV2) { +} + +func (newState *DeleteNetworkConnectivityConfigurationResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNetworkConnectivityConfigurationResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNetworkConnectivityConfigurationResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete a notification destination +type DeleteNotificationDestinationRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteNotificationDestinationRequest_SdkV2) { +} + +func (newState *DeleteNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteNotificationDestinationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteNotificationDestinationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteNotificationDestinationRequest_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, DeleteNotificationDestinationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteNotificationDestinationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteNotificationDestinationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete Personal Compute setting +type DeletePersonalComputeSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeletePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePersonalComputeSettingRequest_SdkV2) { +} + +func (newState *DeletePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePersonalComputeSettingRequest_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, DeletePersonalComputeSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePersonalComputeSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePersonalComputeSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeletePersonalComputeSettingResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeletePersonalComputeSettingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePersonalComputeSettingResponse_SdkV2) { +} + +func (newState *DeletePersonalComputeSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePersonalComputeSettingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePersonalComputeSettingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePersonalComputeSettingResponse_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, DeletePersonalComputeSettingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePersonalComputeSettingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePersonalComputeSettingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete a private endpoint rule +type DeletePrivateEndpointRuleRequest_SdkV2 struct { + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` + // Your private endpoint rule ID. + PrivateEndpointRuleId types.String `tfsdk:"-"` +} + +func (newState *DeletePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeletePrivateEndpointRuleRequest_SdkV2) { +} + +func (newState *DeletePrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeletePrivateEndpointRuleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeletePrivateEndpointRuleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeletePrivateEndpointRuleRequest_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, DeletePrivateEndpointRuleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeletePrivateEndpointRuleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "private_endpoint_rule_id": o.PrivateEndpointRuleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeletePrivateEndpointRuleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_connectivity_config_id": types.StringType, + "private_endpoint_rule_id": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete the restrict workspace admins setting +type DeleteRestrictWorkspaceAdminsSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +func (newState *DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRestrictWorkspaceAdminsSettingRequest_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, DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRestrictWorkspaceAdminsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// The etag is returned. +type DeleteRestrictWorkspaceAdminsSettingResponse_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"etag" tf:""` +} + +func (newState *DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) { +} + +func (newState *DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRestrictWorkspaceAdminsSettingResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRestrictWorkspaceAdminsSettingResponse_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, DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRestrictWorkspaceAdminsSettingResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Delete a token +type DeleteTokenManagementRequest_SdkV2 struct { + // The ID of the token to revoke. + TokenId types.String `tfsdk:"-"` +} + +func (newState *DeleteTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteTokenManagementRequest_SdkV2) { +} + +func (newState *DeleteTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteTokenManagementRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteTokenManagementRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteTokenManagementRequest_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, DeleteTokenManagementRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteTokenManagementRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_id": o.TokenId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_id": types.StringType, + }, + } +} + +type DisableLegacyAccess_SdkV2 struct { + DisableLegacyAccess types.List `tfsdk:"disable_legacy_access" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *DisableLegacyAccess_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyAccess_SdkV2) { +} + +func (newState *DisableLegacyAccess_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyAccess_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyAccess. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DisableLegacyAccess_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "disable_legacy_access": reflect.TypeOf(BooleanMessage_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, DisableLegacyAccess_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyAccess_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "disable_legacy_access": o.DisableLegacyAccess, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DisableLegacyAccess_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "disable_legacy_access": basetypes.ListType{ + ElemType: BooleanMessage{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetDisableLegacyAccess returns the value of the DisableLegacyAccess field in DisableLegacyAccess_SdkV2 as +// a BooleanMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DisableLegacyAccess_SdkV2) GetDisableLegacyAccess(ctx context.Context) (BooleanMessage_SdkV2, bool) { + var e BooleanMessage_SdkV2 + if o.DisableLegacyAccess.IsNull() || o.DisableLegacyAccess.IsUnknown() { + return e, false + } + var v []BooleanMessage_SdkV2 + d := o.DisableLegacyAccess.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDisableLegacyAccess sets the value of the DisableLegacyAccess field in DisableLegacyAccess_SdkV2. +func (o *DisableLegacyAccess_SdkV2) SetDisableLegacyAccess(ctx context.Context, v BooleanMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_access"] + o.DisableLegacyAccess = types.ListValueMust(t, vs) +} + +type DisableLegacyDbfs_SdkV2 struct { + DisableLegacyDbfs types.List `tfsdk:"disable_legacy_dbfs" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *DisableLegacyDbfs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyDbfs_SdkV2) { +} + +func (newState *DisableLegacyDbfs_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyDbfs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyDbfs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DisableLegacyDbfs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "disable_legacy_dbfs": reflect.TypeOf(BooleanMessage_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, DisableLegacyDbfs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyDbfs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "disable_legacy_dbfs": o.DisableLegacyDbfs, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DisableLegacyDbfs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "disable_legacy_dbfs": basetypes.ListType{ + ElemType: BooleanMessage{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetDisableLegacyDbfs returns the value of the DisableLegacyDbfs field in DisableLegacyDbfs_SdkV2 as +// a BooleanMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DisableLegacyDbfs_SdkV2) GetDisableLegacyDbfs(ctx context.Context) (BooleanMessage_SdkV2, bool) { + var e BooleanMessage_SdkV2 + if o.DisableLegacyDbfs.IsNull() || o.DisableLegacyDbfs.IsUnknown() { + return e, false + } + var v []BooleanMessage_SdkV2 + d := o.DisableLegacyDbfs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDisableLegacyDbfs sets the value of the DisableLegacyDbfs field in DisableLegacyDbfs_SdkV2. +func (o *DisableLegacyDbfs_SdkV2) SetDisableLegacyDbfs(ctx context.Context, v BooleanMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_dbfs"] + o.DisableLegacyDbfs = types.ListValueMust(t, vs) +} + +type DisableLegacyFeatures_SdkV2 struct { + DisableLegacyFeatures types.List `tfsdk:"disable_legacy_features" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *DisableLegacyFeatures_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DisableLegacyFeatures_SdkV2) { +} + +func (newState *DisableLegacyFeatures_SdkV2) SyncEffectiveFieldsDuringRead(existingState DisableLegacyFeatures_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DisableLegacyFeatures. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DisableLegacyFeatures_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "disable_legacy_features": reflect.TypeOf(BooleanMessage_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, DisableLegacyFeatures_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyFeatures_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "disable_legacy_features": o.DisableLegacyFeatures, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DisableLegacyFeatures_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "disable_legacy_features": basetypes.ListType{ + ElemType: BooleanMessage{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetDisableLegacyFeatures returns the value of the DisableLegacyFeatures field in DisableLegacyFeatures_SdkV2 as +// a BooleanMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DisableLegacyFeatures_SdkV2) GetDisableLegacyFeatures(ctx context.Context) (BooleanMessage_SdkV2, bool) { + var e BooleanMessage_SdkV2 + if o.DisableLegacyFeatures.IsNull() || o.DisableLegacyFeatures.IsUnknown() { + return e, false + } + var v []BooleanMessage_SdkV2 + d := o.DisableLegacyFeatures.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDisableLegacyFeatures sets the value of the DisableLegacyFeatures field in DisableLegacyFeatures_SdkV2. +func (o *DisableLegacyFeatures_SdkV2) SetDisableLegacyFeatures(ctx context.Context, v BooleanMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_features"] + o.DisableLegacyFeatures = types.ListValueMust(t, vs) +} + +// The network policies applying for egress traffic. This message is used by the +// UI/REST API. We translate this message to the format expected by the +// dataplane in Lakehouse Network Manager (for the format expected by the +// dataplane, see networkconfig.textproto). +type EgressNetworkPolicy_SdkV2 struct { + // The access policy enforced for egress traffic to the internet. + InternetAccess types.List `tfsdk:"internet_access" tf:"optional,object"` +} + +func (newState *EgressNetworkPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicy_SdkV2) { +} + +func (newState *EgressNetworkPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EgressNetworkPolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "internet_access": reflect.TypeOf(EgressNetworkPolicyInternetAccessPolicy_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, EgressNetworkPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EgressNetworkPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "internet_access": o.InternetAccess, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EgressNetworkPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "internet_access": basetypes.ListType{ + ElemType: EgressNetworkPolicyInternetAccessPolicy{}.Type(ctx), + }, + }, + } +} + +// GetInternetAccess returns the value of the InternetAccess field in EgressNetworkPolicy_SdkV2 as +// a EgressNetworkPolicyInternetAccessPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicy_SdkV2) GetInternetAccess(ctx context.Context) (EgressNetworkPolicyInternetAccessPolicy_SdkV2, bool) { + var e EgressNetworkPolicyInternetAccessPolicy_SdkV2 + if o.InternetAccess.IsNull() || o.InternetAccess.IsUnknown() { + return e, false + } + var v []EgressNetworkPolicyInternetAccessPolicy_SdkV2 + d := o.InternetAccess.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetInternetAccess sets the value of the InternetAccess field in EgressNetworkPolicy_SdkV2. +func (o *EgressNetworkPolicy_SdkV2) SetInternetAccess(ctx context.Context, v EgressNetworkPolicyInternetAccessPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["internet_access"] + o.InternetAccess = types.ListValueMust(t, vs) +} + +type EgressNetworkPolicyInternetAccessPolicy_SdkV2 struct { + AllowedInternetDestinations types.List `tfsdk:"allowed_internet_destinations" tf:"optional"` + + AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:"optional"` + // Optional. If not specified, assume the policy is enforced for all + // workloads. + LogOnlyMode types.List `tfsdk:"log_only_mode" tf:"optional,object"` + // At which level can Databricks and Databricks managed compute access + // Internet. FULL_ACCESS: Databricks can access Internet. No blocking rules + // will apply. RESTRICTED_ACCESS: Databricks can only access explicitly + // allowed internet and storage destinations, as well as UC connections and + // external locations. PRIVATE_ACCESS_ONLY (not used): Databricks can only + // access destinations via private link. + RestrictionMode types.String `tfsdk:"restriction_mode" tf:"optional"` +} + +func (newState *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicy_SdkV2) { +} + +func (newState *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EgressNetworkPolicyInternetAccessPolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_internet_destinations": reflect.TypeOf(EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2{}), + "allowed_storage_destinations": reflect.TypeOf(EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2{}), + "log_only_mode": reflect.TypeOf(EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_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, EgressNetworkPolicyInternetAccessPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EgressNetworkPolicyInternetAccessPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_internet_destinations": o.AllowedInternetDestinations, + "allowed_storage_destinations": o.AllowedStorageDestinations, + "log_only_mode": o.LogOnlyMode, + "restriction_mode": o.RestrictionMode, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EgressNetworkPolicyInternetAccessPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_internet_destinations": basetypes.ListType{ + ElemType: EgressNetworkPolicyInternetAccessPolicyInternetDestination{}.Type(ctx), + }, + "allowed_storage_destinations": basetypes.ListType{ + ElemType: EgressNetworkPolicyInternetAccessPolicyStorageDestination{}.Type(ctx), + }, + "log_only_mode": basetypes.ListType{ + ElemType: EgressNetworkPolicyInternetAccessPolicyLogOnlyMode{}.Type(ctx), + }, + "restriction_mode": types.StringType, + }, + } +} + +// GetAllowedInternetDestinations returns the value of the AllowedInternetDestinations field in EgressNetworkPolicyInternetAccessPolicy_SdkV2 as +// a slice of EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) GetAllowedInternetDestinations(ctx context.Context) ([]EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2, bool) { + if o.AllowedInternetDestinations.IsNull() || o.AllowedInternetDestinations.IsUnknown() { + return nil, false + } + var v []EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 + d := o.AllowedInternetDestinations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedInternetDestinations sets the value of the AllowedInternetDestinations field in EgressNetworkPolicyInternetAccessPolicy_SdkV2. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SetAllowedInternetDestinations(ctx context.Context, v []EgressNetworkPolicyInternetAccessPolicyInternetDestination_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["allowed_internet_destinations"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedInternetDestinations = types.ListValueMust(t, vs) +} + +// GetAllowedStorageDestinations returns the value of the AllowedStorageDestinations field in EgressNetworkPolicyInternetAccessPolicy_SdkV2 as +// a slice of EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) GetAllowedStorageDestinations(ctx context.Context) ([]EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2, bool) { + if o.AllowedStorageDestinations.IsNull() || o.AllowedStorageDestinations.IsUnknown() { + return nil, false + } + var v []EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 + d := o.AllowedStorageDestinations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedStorageDestinations sets the value of the AllowedStorageDestinations field in EgressNetworkPolicyInternetAccessPolicy_SdkV2. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SetAllowedStorageDestinations(ctx context.Context, v []EgressNetworkPolicyInternetAccessPolicyStorageDestination_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["allowed_storage_destinations"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedStorageDestinations = types.ListValueMust(t, vs) +} + +// GetLogOnlyMode returns the value of the LogOnlyMode field in EgressNetworkPolicyInternetAccessPolicy_SdkV2 as +// a EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) GetLogOnlyMode(ctx context.Context) (EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2, bool) { + var e EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 + if o.LogOnlyMode.IsNull() || o.LogOnlyMode.IsUnknown() { + return e, false + } + var v []EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 + d := o.LogOnlyMode.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLogOnlyMode sets the value of the LogOnlyMode field in EgressNetworkPolicyInternetAccessPolicy_SdkV2. +func (o *EgressNetworkPolicyInternetAccessPolicy_SdkV2) SetLogOnlyMode(ctx context.Context, v EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_only_mode"] + o.LogOnlyMode = types.ListValueMust(t, vs) +} + +// Users can specify accessible internet destinations when outbound access is +// restricted. We only support domain name (FQDN) destinations for the time +// being, though going forwards we want to support host names and IP addresses. +type EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 struct { + Destination types.String `tfsdk:"destination" tf:"optional"` + // The filtering protocol used by the DP. For private and public preview, + // SEG will only support TCP filtering (i.e. DNS based filtering, filtering + // by destination IP address), so protocol will be set to TCP by default and + // hidden from the user. In the future, users may be able to select HTTP + // filtering (i.e. SNI based filtering, filtering by FQDN). + Protocol types.String `tfsdk:"protocol" tf:"optional"` + + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) { +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyInternetDestination. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EgressNetworkPolicyInternetAccessPolicyInternetDestination_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, EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination": o.Destination, + "protocol": o.Protocol, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination": types.StringType, + "protocol": types.StringType, + "type": types.StringType, + }, + } +} + +type EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 struct { + LogOnlyModeType types.String `tfsdk:"log_only_mode_type" tf:"optional"` + + Workloads types.List `tfsdk:"workloads" tf:"optional"` +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) { +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyLogOnlyMode. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "workloads": 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, EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "log_only_mode_type": o.LogOnlyModeType, + "workloads": o.Workloads, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "log_only_mode_type": types.StringType, + "workloads": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetWorkloads returns the value of the Workloads field in EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) GetWorkloads(ctx context.Context) ([]types.String, bool) { + if o.Workloads.IsNull() || o.Workloads.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Workloads.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWorkloads sets the value of the Workloads field in EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2. +func (o *EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2) SetWorkloads(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["workloads"] + t = t.(attr.TypeWithElementType).ElementType() + o.Workloads = types.ListValueMust(t, vs) +} + +// Users can specify accessible storage destinations. +type EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 struct { + AllowedPaths types.List `tfsdk:"allowed_paths" tf:"optional"` + + AzureContainer types.String `tfsdk:"azure_container" tf:"optional"` + + AzureDnsZone types.String `tfsdk:"azure_dns_zone" tf:"optional"` + + AzureStorageAccount types.String `tfsdk:"azure_storage_account" tf:"optional"` + + AzureStorageService types.String `tfsdk:"azure_storage_service" tf:"optional"` + + BucketName types.String `tfsdk:"bucket_name" tf:"optional"` + + Region types.String `tfsdk:"region" tf:"optional"` + + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) { +} + +func (newState *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EgressNetworkPolicyInternetAccessPolicyStorageDestination. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_paths": 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, EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_paths": o.AllowedPaths, + "azure_container": o.AzureContainer, + "azure_dns_zone": o.AzureDnsZone, + "azure_storage_account": o.AzureStorageAccount, + "azure_storage_service": o.AzureStorageService, + "bucket_name": o.BucketName, + "region": o.Region, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_paths": basetypes.ListType{ + ElemType: types.StringType, + }, + "azure_container": types.StringType, + "azure_dns_zone": types.StringType, + "azure_storage_account": types.StringType, + "azure_storage_service": types.StringType, + "bucket_name": types.StringType, + "region": types.StringType, + "type": types.StringType, + }, + } +} + +// GetAllowedPaths returns the value of the AllowedPaths field in EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) GetAllowedPaths(ctx context.Context) ([]types.String, bool) { + if o.AllowedPaths.IsNull() || o.AllowedPaths.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedPaths.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedPaths sets the value of the AllowedPaths field in EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2. +func (o *EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2) SetAllowedPaths(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_paths"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedPaths = types.ListValueMust(t, vs) +} + +type EmailConfig_SdkV2 struct { + // Email addresses to notify. + Addresses types.List `tfsdk:"addresses" tf:"optional"` +} + +func (newState *EmailConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmailConfig_SdkV2) { +} + +func (newState *EmailConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmailConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EmailConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EmailConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "addresses": 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, EmailConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EmailConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "addresses": o.Addresses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EmailConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAddresses returns the value of the Addresses field in EmailConfig_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *EmailConfig_SdkV2) GetAddresses(ctx context.Context) ([]types.String, bool) { + if o.Addresses.IsNull() || o.Addresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Addresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAddresses sets the value of the Addresses field in EmailConfig_SdkV2. +func (o *EmailConfig_SdkV2) SetAddresses(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["addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.Addresses = types.ListValueMust(t, vs) +} + +type Empty_SdkV2 struct { +} + +func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty_SdkV2) { +} + +func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringRead(existingState Empty_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Empty_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, Empty_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Empty_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 Empty_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// SHIELD feature: ESM +type EnhancedSecurityMonitoring_SdkV2 struct { + IsEnabled types.Bool `tfsdk:"is_enabled" tf:"optional"` +} + +func (newState *EnhancedSecurityMonitoring_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoring_SdkV2) { +} + +func (newState *EnhancedSecurityMonitoring_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoring_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoring. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnhancedSecurityMonitoring_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, EnhancedSecurityMonitoring_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnhancedSecurityMonitoring_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_enabled": o.IsEnabled, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnhancedSecurityMonitoring_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_enabled": types.BoolType, + }, + } +} + +type EnhancedSecurityMonitoringSetting_SdkV2 struct { + // SHIELD feature: ESM + EnhancedSecurityMonitoringWorkspace types.List `tfsdk:"enhanced_security_monitoring_workspace" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *EnhancedSecurityMonitoringSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnhancedSecurityMonitoringSetting_SdkV2) { +} + +func (newState *EnhancedSecurityMonitoringSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnhancedSecurityMonitoringSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnhancedSecurityMonitoringSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnhancedSecurityMonitoringSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "enhanced_security_monitoring_workspace": reflect.TypeOf(EnhancedSecurityMonitoring_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, EnhancedSecurityMonitoringSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnhancedSecurityMonitoringSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enhanced_security_monitoring_workspace": o.EnhancedSecurityMonitoringWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnhancedSecurityMonitoringSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enhanced_security_monitoring_workspace": basetypes.ListType{ + ElemType: EnhancedSecurityMonitoring{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetEnhancedSecurityMonitoringWorkspace returns the value of the EnhancedSecurityMonitoringWorkspace field in EnhancedSecurityMonitoringSetting_SdkV2 as +// a EnhancedSecurityMonitoring_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EnhancedSecurityMonitoringSetting_SdkV2) GetEnhancedSecurityMonitoringWorkspace(ctx context.Context) (EnhancedSecurityMonitoring_SdkV2, bool) { + var e EnhancedSecurityMonitoring_SdkV2 + if o.EnhancedSecurityMonitoringWorkspace.IsNull() || o.EnhancedSecurityMonitoringWorkspace.IsUnknown() { + return e, false + } + var v []EnhancedSecurityMonitoring_SdkV2 + d := o.EnhancedSecurityMonitoringWorkspace.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEnhancedSecurityMonitoringWorkspace sets the value of the EnhancedSecurityMonitoringWorkspace field in EnhancedSecurityMonitoringSetting_SdkV2. +func (o *EnhancedSecurityMonitoringSetting_SdkV2) SetEnhancedSecurityMonitoringWorkspace(ctx context.Context, v EnhancedSecurityMonitoring_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enhanced_security_monitoring_workspace"] + o.EnhancedSecurityMonitoringWorkspace = types.ListValueMust(t, vs) +} + +// Account level policy for ESM +type EsmEnablementAccount_SdkV2 struct { + IsEnforced types.Bool `tfsdk:"is_enforced" tf:"optional"` +} + +func (newState *EsmEnablementAccount_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccount_SdkV2) { +} + +func (newState *EsmEnablementAccount_SdkV2) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccount_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccount. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EsmEnablementAccount_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, EsmEnablementAccount_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EsmEnablementAccount_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "is_enforced": o.IsEnforced, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EsmEnablementAccount_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "is_enforced": types.BoolType, + }, + } +} + +type EsmEnablementAccountSetting_SdkV2 struct { + // Account level policy for ESM + EsmEnablementAccount types.List `tfsdk:"esm_enablement_account" tf:"object"` + // 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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *EsmEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EsmEnablementAccountSetting_SdkV2) { +} + +func (newState *EsmEnablementAccountSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState EsmEnablementAccountSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EsmEnablementAccountSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EsmEnablementAccountSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "esm_enablement_account": reflect.TypeOf(EsmEnablementAccount_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, EsmEnablementAccountSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EsmEnablementAccountSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "esm_enablement_account": o.EsmEnablementAccount, + "etag": o.Etag, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EsmEnablementAccountSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "esm_enablement_account": basetypes.ListType{ + ElemType: EsmEnablementAccount{}.Type(ctx), + }, + "etag": types.StringType, + "setting_name": types.StringType, + }, + } +} + +// GetEsmEnablementAccount returns the value of the EsmEnablementAccount field in EsmEnablementAccountSetting_SdkV2 as +// a EsmEnablementAccount_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EsmEnablementAccountSetting_SdkV2) GetEsmEnablementAccount(ctx context.Context) (EsmEnablementAccount_SdkV2, bool) { + var e EsmEnablementAccount_SdkV2 + if o.EsmEnablementAccount.IsNull() || o.EsmEnablementAccount.IsUnknown() { + return e, false + } + var v []EsmEnablementAccount_SdkV2 + d := o.EsmEnablementAccount.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEsmEnablementAccount sets the value of the EsmEnablementAccount field in EsmEnablementAccountSetting_SdkV2. +func (o *EsmEnablementAccountSetting_SdkV2) SetEsmEnablementAccount(ctx context.Context, v EsmEnablementAccount_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["esm_enablement_account"] + o.EsmEnablementAccount = types.ListValueMust(t, vs) +} + +// The exchange token is the result of the token exchange with the IdP +type ExchangeToken_SdkV2 struct { + // The requested token. + Credential types.String `tfsdk:"credential" tf:"optional"` + // The end-of-life timestamp of the token. The value is in milliseconds + // since the Unix epoch. + CredentialEolTime types.Int64 `tfsdk:"credentialEolTime" tf:"optional"` + // User ID of the user that owns this token. + OwnerId types.Int64 `tfsdk:"ownerId" tf:"optional"` + // The scopes of access granted in the token. + Scopes types.List `tfsdk:"scopes" tf:"optional"` + // The type of this exchange token + TokenType types.String `tfsdk:"tokenType" tf:"optional"` +} + +func (newState *ExchangeToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeToken_SdkV2) { +} + +func (newState *ExchangeToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeToken_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeToken. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExchangeToken_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "scopes": 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, ExchangeToken_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExchangeToken_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential": o.Credential, + "credentialEolTime": o.CredentialEolTime, + "ownerId": o.OwnerId, + "scopes": o.Scopes, + "tokenType": o.TokenType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExchangeToken_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential": types.StringType, + "credentialEolTime": types.Int64Type, + "ownerId": types.Int64Type, + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + "tokenType": types.StringType, + }, + } +} + +// GetScopes returns the value of the Scopes field in ExchangeToken_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExchangeToken_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in ExchangeToken_SdkV2. +func (o *ExchangeToken_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +// Exchange a token with the IdP +type ExchangeTokenRequest_SdkV2 struct { + // The partition of Credentials store + PartitionId types.List `tfsdk:"partitionId" tf:"object"` + // Array of scopes for the token request. + Scopes types.List `tfsdk:"scopes" tf:""` + // A list of token types being requested + TokenType types.List `tfsdk:"tokenType" tf:""` +} + +func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenRequest_SdkV2) { +} + +func (newState *ExchangeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExchangeTokenRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "partitionId": reflect.TypeOf(PartitionId_SdkV2{}), + "scopes": reflect.TypeOf(types.String{}), + "tokenType": 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, ExchangeTokenRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExchangeTokenRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "partitionId": o.PartitionId, + "scopes": o.Scopes, + "tokenType": o.TokenType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExchangeTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "partitionId": basetypes.ListType{ + ElemType: PartitionId{}.Type(ctx), + }, + "scopes": basetypes.ListType{ + ElemType: types.StringType, + }, + "tokenType": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPartitionId returns the value of the PartitionId field in ExchangeTokenRequest_SdkV2 as +// a PartitionId_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ExchangeTokenRequest_SdkV2) GetPartitionId(ctx context.Context) (PartitionId_SdkV2, bool) { + var e PartitionId_SdkV2 + if o.PartitionId.IsNull() || o.PartitionId.IsUnknown() { + return e, false + } + var v []PartitionId_SdkV2 + d := o.PartitionId.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPartitionId sets the value of the PartitionId field in ExchangeTokenRequest_SdkV2. +func (o *ExchangeTokenRequest_SdkV2) SetPartitionId(ctx context.Context, v PartitionId_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["partitionId"] + o.PartitionId = types.ListValueMust(t, vs) +} + +// GetScopes returns the value of the Scopes field in ExchangeTokenRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExchangeTokenRequest_SdkV2) GetScopes(ctx context.Context) ([]types.String, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in ExchangeTokenRequest_SdkV2. +func (o *ExchangeTokenRequest_SdkV2) SetScopes(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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +// GetTokenType returns the value of the TokenType field in ExchangeTokenRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExchangeTokenRequest_SdkV2) GetTokenType(ctx context.Context) ([]types.String, bool) { + if o.TokenType.IsNull() || o.TokenType.IsUnknown() { + return nil, false + } + var v []types.String + d := o.TokenType.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTokenType sets the value of the TokenType field in ExchangeTokenRequest_SdkV2. +func (o *ExchangeTokenRequest_SdkV2) SetTokenType(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["tokenType"] + t = t.(attr.TypeWithElementType).ElementType() + o.TokenType = types.ListValueMust(t, vs) +} + +// Exhanged tokens were successfully returned. +type ExchangeTokenResponse_SdkV2 struct { + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *ExchangeTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExchangeTokenResponse_SdkV2) { +} + +func (newState *ExchangeTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExchangeTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExchangeTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExchangeTokenResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "values": reflect.TypeOf(ExchangeToken_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, ExchangeTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExchangeTokenResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExchangeTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "values": basetypes.ListType{ + ElemType: ExchangeToken{}.Type(ctx), + }, + }, + } +} + +// GetValues returns the value of the Values field in ExchangeTokenResponse_SdkV2 as +// a slice of ExchangeToken_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExchangeTokenResponse_SdkV2) GetValues(ctx context.Context) ([]ExchangeToken_SdkV2, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []ExchangeToken_SdkV2 + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in ExchangeTokenResponse_SdkV2. +func (o *ExchangeTokenResponse_SdkV2) SetValues(ctx context.Context, v []ExchangeToken_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["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +// An IP access list was successfully returned. +type FetchIpAccessListResponse_SdkV2 struct { + // Definition of an IP Access list + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` +} + +func (newState *FetchIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FetchIpAccessListResponse_SdkV2) { +} + +func (newState *FetchIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState FetchIpAccessListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FetchIpAccessListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FetchIpAccessListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessListInfo_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, FetchIpAccessListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FetchIpAccessListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FetchIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessListInfo{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in FetchIpAccessListResponse_SdkV2 as +// a IpAccessListInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FetchIpAccessListResponse_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessListInfo_SdkV2, bool) { + var e IpAccessListInfo_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessListInfo_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in FetchIpAccessListResponse_SdkV2. +func (o *FetchIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessListInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +type GenericWebhookConfig_SdkV2 struct { + // [Input-Only][Optional] Password for webhook. + Password types.String `tfsdk:"password" tf:"optional"` + // [Output-Only] Whether password is set. + PasswordSet types.Bool `tfsdk:"password_set" tf:"optional"` + // [Input-Only] URL for webhook. + Url types.String `tfsdk:"url" tf:"optional"` + // [Output-Only] Whether URL is set. + UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` + // [Input-Only][Optional] Username for webhook. + Username types.String `tfsdk:"username" tf:"optional"` + // [Output-Only] Whether username is set. + UsernameSet types.Bool `tfsdk:"username_set" tf:"optional"` +} + +func (newState *GenericWebhookConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenericWebhookConfig_SdkV2) { +} + +func (newState *GenericWebhookConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState GenericWebhookConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GenericWebhookConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GenericWebhookConfig_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, GenericWebhookConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GenericWebhookConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "password": o.Password, + "password_set": o.PasswordSet, + "url": o.Url, + "url_set": o.UrlSet, + "username": o.Username, + "username_set": o.UsernameSet, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GenericWebhookConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "password": types.StringType, + "password_set": types.BoolType, + "url": types.StringType, + "url_set": types.BoolType, + "username": types.StringType, + "username_set": types.BoolType, + }, + } +} + +// Get IP access list +type GetAccountIpAccessListRequest_SdkV2 struct { + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` +} + +func (newState *GetAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountIpAccessListRequest_SdkV2) { +} + +func (newState *GetAccountIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountIpAccessListRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountIpAccessListRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountIpAccessListRequest_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, GetAccountIpAccessListRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountIpAccessListRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountIpAccessListRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list_id": types.StringType, + }, + } +} + +// Retrieve the AI/BI dashboard embedding access policy +type GetAibiDashboardEmbeddingAccessPolicySettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +func (newState *GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingAccessPolicySettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAibiDashboardEmbeddingAccessPolicySettingRequest_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, GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Retrieve the list of domains approved to host embedded AI/BI dashboards +type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +func (newState *GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAibiDashboardEmbeddingApprovedDomainsSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_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, GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the automatic cluster update setting +type GetAutomaticClusterUpdateSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAutomaticClusterUpdateSettingRequest_SdkV2) { +} + +func (newState *GetAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAutomaticClusterUpdateSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAutomaticClusterUpdateSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAutomaticClusterUpdateSettingRequest_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, GetAutomaticClusterUpdateSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAutomaticClusterUpdateSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAutomaticClusterUpdateSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the compliance security profile setting +type GetComplianceSecurityProfileSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetComplianceSecurityProfileSettingRequest_SdkV2) { +} + +func (newState *GetComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetComplianceSecurityProfileSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetComplianceSecurityProfileSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetComplianceSecurityProfileSettingRequest_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, GetComplianceSecurityProfileSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetComplianceSecurityProfileSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetComplianceSecurityProfileSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the compliance security profile setting for new workspaces +type GetCspEnablementAccountSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCspEnablementAccountSettingRequest_SdkV2) { +} + +func (newState *GetCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCspEnablementAccountSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCspEnablementAccountSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCspEnablementAccountSettingRequest_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, GetCspEnablementAccountSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCspEnablementAccountSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCspEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the default namespace setting +type GetDefaultNamespaceSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDefaultNamespaceSettingRequest_SdkV2) { +} + +func (newState *GetDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDefaultNamespaceSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDefaultNamespaceSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDefaultNamespaceSettingRequest_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, GetDefaultNamespaceSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDefaultNamespaceSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDefaultNamespaceSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Retrieve Legacy Access Disablement Status +type GetDisableLegacyAccessRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyAccessRequest_SdkV2) { +} + +func (newState *GetDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyAccessRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyAccessRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDisableLegacyAccessRequest_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, GetDisableLegacyAccessRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyAccessRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDisableLegacyAccessRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the disable legacy DBFS setting +type GetDisableLegacyDbfsRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyDbfsRequest_SdkV2) { +} + +func (newState *GetDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyDbfsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyDbfsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDisableLegacyDbfsRequest_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, GetDisableLegacyDbfsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyDbfsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDisableLegacyDbfsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the disable legacy features setting +type GetDisableLegacyFeaturesRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDisableLegacyFeaturesRequest_SdkV2) { +} + +func (newState *GetDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDisableLegacyFeaturesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDisableLegacyFeaturesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDisableLegacyFeaturesRequest_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, GetDisableLegacyFeaturesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyFeaturesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDisableLegacyFeaturesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the enhanced security monitoring setting +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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEnhancedSecurityMonitoringSettingRequest_SdkV2) { +} + +func (newState *GetEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEnhancedSecurityMonitoringSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEnhancedSecurityMonitoringSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEnhancedSecurityMonitoringSettingRequest_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, GetEnhancedSecurityMonitoringSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEnhancedSecurityMonitoringSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEnhancedSecurityMonitoringSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get the enhanced security monitoring setting for new workspaces +type GetEsmEnablementAccountSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEsmEnablementAccountSettingRequest_SdkV2) { +} + +func (newState *GetEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEsmEnablementAccountSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEsmEnablementAccountSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEsmEnablementAccountSettingRequest_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, GetEsmEnablementAccountSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEsmEnablementAccountSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEsmEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get access list +type GetIpAccessListRequest_SdkV2 struct { + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` +} + +func (newState *GetIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListRequest_SdkV2) { +} + +func (newState *GetIpAccessListRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetIpAccessListRequest_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, GetIpAccessListRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetIpAccessListRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list_id": types.StringType, + }, + } +} + +type GetIpAccessListResponse_SdkV2 struct { + // Definition of an IP Access list + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` +} + +func (newState *GetIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListResponse_SdkV2) { +} + +func (newState *GetIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetIpAccessListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessListInfo_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, GetIpAccessListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessListInfo{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in GetIpAccessListResponse_SdkV2 as +// a IpAccessListInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetIpAccessListResponse_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessListInfo_SdkV2, bool) { + var e IpAccessListInfo_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessListInfo_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in GetIpAccessListResponse_SdkV2. +func (o *GetIpAccessListResponse_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessListInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +// IP access lists were successfully returned. +type GetIpAccessListsResponse_SdkV2 struct { + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` +} + +func (newState *GetIpAccessListsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListsResponse_SdkV2) { +} + +func (newState *GetIpAccessListsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIpAccessListsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIpAccessListsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetIpAccessListsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_lists": reflect.TypeOf(IpAccessListInfo_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, GetIpAccessListsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_lists": o.IpAccessLists, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetIpAccessListsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_lists": basetypes.ListType{ + ElemType: IpAccessListInfo{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessLists returns the value of the IpAccessLists field in GetIpAccessListsResponse_SdkV2 as +// a slice of IpAccessListInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetIpAccessListsResponse_SdkV2) GetIpAccessLists(ctx context.Context) ([]IpAccessListInfo_SdkV2, bool) { + if o.IpAccessLists.IsNull() || o.IpAccessLists.IsUnknown() { + return nil, false + } + var v []IpAccessListInfo_SdkV2 + d := o.IpAccessLists.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAccessLists sets the value of the IpAccessLists field in GetIpAccessListsResponse_SdkV2. +func (o *GetIpAccessListsResponse_SdkV2) SetIpAccessLists(ctx context.Context, v []IpAccessListInfo_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["ip_access_lists"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAccessLists = types.ListValueMust(t, vs) +} + +// Get a network connectivity configuration +type GetNetworkConnectivityConfigurationRequest_SdkV2 struct { + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` +} + +func (newState *GetNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNetworkConnectivityConfigurationRequest_SdkV2) { +} + +func (newState *GetNetworkConnectivityConfigurationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNetworkConnectivityConfigurationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNetworkConnectivityConfigurationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetNetworkConnectivityConfigurationRequest_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, GetNetworkConnectivityConfigurationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetNetworkConnectivityConfigurationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetNetworkConnectivityConfigurationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_connectivity_config_id": types.StringType, + }, + } +} + +// Get a notification destination +type GetNotificationDestinationRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetNotificationDestinationRequest_SdkV2) { +} + +func (newState *GetNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetNotificationDestinationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetNotificationDestinationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetNotificationDestinationRequest_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, GetNotificationDestinationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetNotificationDestinationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetNotificationDestinationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Get Personal Compute setting +type GetPersonalComputeSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetPersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPersonalComputeSettingRequest_SdkV2) { +} + +func (newState *GetPersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPersonalComputeSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPersonalComputeSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPersonalComputeSettingRequest_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, GetPersonalComputeSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPersonalComputeSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPersonalComputeSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Get a private endpoint rule +type GetPrivateEndpointRuleRequest_SdkV2 struct { + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` + // Your private endpoint rule ID. + PrivateEndpointRuleId types.String `tfsdk:"-"` +} + +func (newState *GetPrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetPrivateEndpointRuleRequest_SdkV2) { +} + +func (newState *GetPrivateEndpointRuleRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetPrivateEndpointRuleRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetPrivateEndpointRuleRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetPrivateEndpointRuleRequest_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, GetPrivateEndpointRuleRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetPrivateEndpointRuleRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "private_endpoint_rule_id": o.PrivateEndpointRuleId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetPrivateEndpointRuleRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_connectivity_config_id": types.StringType, + "private_endpoint_rule_id": types.StringType, + }, + } +} + +// Get the restrict workspace admins setting +type GetRestrictWorkspaceAdminsSettingRequest_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // delete pattern to perform setting deletions in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // DELETE request to identify the rule set version you are deleting. + Etag types.String `tfsdk:"-"` +} + +func (newState *GetRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +func (newState *GetRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRestrictWorkspaceAdminsSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRestrictWorkspaceAdminsSettingRequest_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, GetRestrictWorkspaceAdminsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRestrictWorkspaceAdminsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRestrictWorkspaceAdminsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + }, + } +} + +// Check configuration status +type GetStatusRequest_SdkV2 struct { + Keys types.String `tfsdk:"-"` +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStatusRequest_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, GetStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "keys": o.Keys, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "keys": types.StringType, + }, + } +} + +// Get token info +type GetTokenManagementRequest_SdkV2 struct { + // The ID of the token to get. + TokenId types.String `tfsdk:"-"` +} + +func (newState *GetTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenManagementRequest_SdkV2) { +} + +func (newState *GetTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenManagementRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenManagementRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetTokenManagementRequest_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, GetTokenManagementRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTokenManagementRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_id": o.TokenId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_id": types.StringType, + }, + } +} + +type GetTokenPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetTokenPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetTokenPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetTokenPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(TokenPermissionsDescription_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, GetTokenPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: TokenPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetTokenPermissionLevelsResponse_SdkV2 as +// a slice of TokenPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetTokenPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]TokenPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []TokenPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetTokenPermissionLevelsResponse_SdkV2. +func (o *GetTokenPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []TokenPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Token with specified Token ID was successfully returned. +type GetTokenResponse_SdkV2 struct { + TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` +} + +func (newState *GetTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenResponse_SdkV2) { +} + +func (newState *GetTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetTokenResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_info": reflect.TypeOf(TokenInfo_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, GetTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetTokenResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_info": o.TokenInfo, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_info": basetypes.ListType{ + ElemType: TokenInfo{}.Type(ctx), + }, + }, + } +} + +// GetTokenInfo returns the value of the TokenInfo field in GetTokenResponse_SdkV2 as +// a TokenInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetTokenResponse_SdkV2) GetTokenInfo(ctx context.Context) (TokenInfo_SdkV2, bool) { + var e TokenInfo_SdkV2 + if o.TokenInfo.IsNull() || o.TokenInfo.IsUnknown() { + return e, false + } + var v []TokenInfo_SdkV2 + d := o.TokenInfo.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTokenInfo sets the value of the TokenInfo field in GetTokenResponse_SdkV2. +func (o *GetTokenResponse_SdkV2) SetTokenInfo(ctx context.Context, v TokenInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] + o.TokenInfo = types.ListValueMust(t, vs) +} + +// Definition of an IP Access list +type IpAccessListInfo_SdkV2 struct { + // Total number of IP or CIDR values. + AddressCount types.Int64 `tfsdk:"address_count" tf:"optional"` + // Creation timestamp in milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // User ID of the user who created this list. + CreatedBy types.Int64 `tfsdk:"created_by" tf:"optional"` + // Specifies whether this IP access list is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + + IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + // Label for the IP access list. This **cannot** be empty. + Label types.String `tfsdk:"label" tf:"optional"` + // Universally unique identifier (UUID) of the IP access list. + ListId types.String `tfsdk:"list_id" tf:"optional"` + // Type of IP access list. Valid values are as follows and are + // case-sensitive: + // + // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block + // list. Exclude this IP or range. IP addresses in the block list are + // excluded even if they are included in an allow list. + ListType types.String `tfsdk:"list_type" tf:"optional"` + // Update timestamp in milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // User ID of the user who updated this list. + UpdatedBy types.Int64 `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *IpAccessListInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessListInfo_SdkV2) { +} + +func (newState *IpAccessListInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState IpAccessListInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessListInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a IpAccessListInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_addresses": 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, IpAccessListInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o IpAccessListInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "address_count": o.AddressCount, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "enabled": o.Enabled, + "ip_addresses": o.IpAddresses, + "label": o.Label, + "list_id": o.ListId, + "list_type": o.ListType, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o IpAccessListInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "address_count": types.Int64Type, + "created_at": types.Int64Type, + "created_by": types.Int64Type, + "enabled": types.BoolType, + "ip_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + "label": types.StringType, + "list_id": types.StringType, + "list_type": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.Int64Type, + }, + } +} + +// GetIpAddresses returns the value of the IpAddresses field in IpAccessListInfo_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *IpAccessListInfo_SdkV2) GetIpAddresses(ctx context.Context) ([]types.String, bool) { + if o.IpAddresses.IsNull() || o.IpAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.IpAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAddresses sets the value of the IpAddresses field in IpAccessListInfo_SdkV2. +func (o *IpAccessListInfo_SdkV2) SetIpAddresses(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["ip_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAddresses = types.ListValueMust(t, vs) +} + +// IP access lists were successfully returned. +type ListIpAccessListResponse_SdkV2 struct { + IpAccessLists types.List `tfsdk:"ip_access_lists" tf:"optional"` +} + +func (newState *ListIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIpAccessListResponse_SdkV2) { +} + +func (newState *ListIpAccessListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListIpAccessListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIpAccessListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListIpAccessListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_lists": reflect.TypeOf(IpAccessListInfo_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, ListIpAccessListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListIpAccessListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_lists": o.IpAccessLists, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "ip_access_lists": basetypes.ListType{ + ElemType: IpAccessListInfo{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessLists returns the value of the IpAccessLists field in ListIpAccessListResponse_SdkV2 as +// a slice of IpAccessListInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListIpAccessListResponse_SdkV2) GetIpAccessLists(ctx context.Context) ([]IpAccessListInfo_SdkV2, bool) { + if o.IpAccessLists.IsNull() || o.IpAccessLists.IsUnknown() { + return nil, false + } + var v []IpAccessListInfo_SdkV2 + d := o.IpAccessLists.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAccessLists sets the value of the IpAccessLists field in ListIpAccessListResponse_SdkV2. +func (o *ListIpAccessListResponse_SdkV2) SetIpAccessLists(ctx context.Context, v []IpAccessListInfo_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["ip_access_lists"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAccessLists = types.ListValueMust(t, vs) +} + +type ListNccAzurePrivateEndpointRulesResponse_SdkV2 struct { + Items types.List `tfsdk:"items" tf:"optional"` + // A token that can be used to get the next page of results. If null, there + // are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNccAzurePrivateEndpointRulesResponse_SdkV2) { +} + +func (newState *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNccAzurePrivateEndpointRulesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNccAzurePrivateEndpointRulesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNccAzurePrivateEndpointRulesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "items": reflect.TypeOf(NccAzurePrivateEndpointRule_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, ListNccAzurePrivateEndpointRulesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNccAzurePrivateEndpointRulesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "items": o.Items, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNccAzurePrivateEndpointRulesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "items": basetypes.ListType{ + ElemType: NccAzurePrivateEndpointRule{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetItems returns the value of the Items field in ListNccAzurePrivateEndpointRulesResponse_SdkV2 as +// a slice of NccAzurePrivateEndpointRule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListNccAzurePrivateEndpointRulesResponse_SdkV2) GetItems(ctx context.Context) ([]NccAzurePrivateEndpointRule_SdkV2, bool) { + if o.Items.IsNull() || o.Items.IsUnknown() { + return nil, false + } + var v []NccAzurePrivateEndpointRule_SdkV2 + d := o.Items.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetItems sets the value of the Items field in ListNccAzurePrivateEndpointRulesResponse_SdkV2. +func (o *ListNccAzurePrivateEndpointRulesResponse_SdkV2) SetItems(ctx context.Context, v []NccAzurePrivateEndpointRule_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["items"] + t = t.(attr.TypeWithElementType).ElementType() + o.Items = types.ListValueMust(t, vs) +} + +// List network connectivity configurations +type ListNetworkConnectivityConfigurationsRequest_SdkV2 struct { + // Pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListNetworkConnectivityConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsRequest_SdkV2) { +} + +func (newState *ListNetworkConnectivityConfigurationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNetworkConnectivityConfigurationsRequest_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, ListNetworkConnectivityConfigurationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNetworkConnectivityConfigurationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNetworkConnectivityConfigurationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_token": types.StringType, + }, + } +} + +type ListNetworkConnectivityConfigurationsResponse_SdkV2 struct { + Items types.List `tfsdk:"items" tf:"optional"` + // A token that can be used to get the next page of results. If null, there + // are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListNetworkConnectivityConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNetworkConnectivityConfigurationsResponse_SdkV2) { +} + +func (newState *ListNetworkConnectivityConfigurationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNetworkConnectivityConfigurationsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNetworkConnectivityConfigurationsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNetworkConnectivityConfigurationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "items": reflect.TypeOf(NetworkConnectivityConfiguration_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, ListNetworkConnectivityConfigurationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNetworkConnectivityConfigurationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "items": o.Items, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNetworkConnectivityConfigurationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "items": basetypes.ListType{ + ElemType: NetworkConnectivityConfiguration{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetItems returns the value of the Items field in ListNetworkConnectivityConfigurationsResponse_SdkV2 as +// a slice of NetworkConnectivityConfiguration_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListNetworkConnectivityConfigurationsResponse_SdkV2) GetItems(ctx context.Context) ([]NetworkConnectivityConfiguration_SdkV2, bool) { + if o.Items.IsNull() || o.Items.IsUnknown() { + return nil, false + } + var v []NetworkConnectivityConfiguration_SdkV2 + d := o.Items.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetItems sets the value of the Items field in ListNetworkConnectivityConfigurationsResponse_SdkV2. +func (o *ListNetworkConnectivityConfigurationsResponse_SdkV2) SetItems(ctx context.Context, v []NetworkConnectivityConfiguration_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["items"] + t = t.(attr.TypeWithElementType).ElementType() + o.Items = types.ListValueMust(t, vs) +} + +// List notification destinations +type ListNotificationDestinationsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListNotificationDestinationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsRequest_SdkV2) { +} + +func (newState *ListNotificationDestinationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNotificationDestinationsRequest_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, ListNotificationDestinationsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsRequest_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 ListNotificationDestinationsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListNotificationDestinationsResponse_SdkV2 struct { + // Page token for next of results. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ListNotificationDestinationsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResponse_SdkV2) { +} + +func (newState *ListNotificationDestinationsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNotificationDestinationsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(ListNotificationDestinationsResult_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, ListNotificationDestinationsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNotificationDestinationsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "results": basetypes.ListType{ + ElemType: ListNotificationDestinationsResult{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ListNotificationDestinationsResponse_SdkV2 as +// a slice of ListNotificationDestinationsResult_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListNotificationDestinationsResponse_SdkV2) GetResults(ctx context.Context) ([]ListNotificationDestinationsResult_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []ListNotificationDestinationsResult_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ListNotificationDestinationsResponse_SdkV2. +func (o *ListNotificationDestinationsResponse_SdkV2) SetResults(ctx context.Context, v []ListNotificationDestinationsResult_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +type ListNotificationDestinationsResult_SdkV2 struct { + // [Output-only] The type of the notification destination. The type can not + // be changed once set. + DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + // The display name for the notification destination. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying notification destination. + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *ListNotificationDestinationsResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListNotificationDestinationsResult_SdkV2) { +} + +func (newState *ListNotificationDestinationsResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListNotificationDestinationsResult_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListNotificationDestinationsResult. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListNotificationDestinationsResult_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, ListNotificationDestinationsResult_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsResult_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "destination_type": o.DestinationType, + "display_name": o.DisplayName, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListNotificationDestinationsResult_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "destination_type": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + }, + } +} + +// List private endpoint rules +type ListPrivateEndpointRulesRequest_SdkV2 struct { + // Your Network Connectvity Configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"-"` + // Pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListPrivateEndpointRulesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPrivateEndpointRulesRequest_SdkV2) { +} + +func (newState *ListPrivateEndpointRulesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPrivateEndpointRulesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPrivateEndpointRulesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPrivateEndpointRulesRequest_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, ListPrivateEndpointRulesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPrivateEndpointRulesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPrivateEndpointRulesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "network_connectivity_config_id": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ListPublicTokensResponse_SdkV2 struct { + // The information for each token. + TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` +} + +func (newState *ListPublicTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListPublicTokensResponse_SdkV2) { +} + +func (newState *ListPublicTokensResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListPublicTokensResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListPublicTokensResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListPublicTokensResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_infos": reflect.TypeOf(PublicTokenInfo_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, ListPublicTokensResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListPublicTokensResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_infos": o.TokenInfos, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListPublicTokensResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_infos": basetypes.ListType{ + ElemType: PublicTokenInfo{}.Type(ctx), + }, + }, + } +} + +// GetTokenInfos returns the value of the TokenInfos field in ListPublicTokensResponse_SdkV2 as +// a slice of PublicTokenInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListPublicTokensResponse_SdkV2) GetTokenInfos(ctx context.Context) ([]PublicTokenInfo_SdkV2, bool) { + if o.TokenInfos.IsNull() || o.TokenInfos.IsUnknown() { + return nil, false + } + var v []PublicTokenInfo_SdkV2 + d := o.TokenInfos.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTokenInfos sets the value of the TokenInfos field in ListPublicTokensResponse_SdkV2. +func (o *ListPublicTokensResponse_SdkV2) SetTokenInfos(ctx context.Context, v []PublicTokenInfo_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["token_infos"] + t = t.(attr.TypeWithElementType).ElementType() + o.TokenInfos = types.ListValueMust(t, vs) +} + +// List all tokens +type ListTokenManagementRequest_SdkV2 struct { + // User ID of the user that created the token. + CreatedById types.Int64 `tfsdk:"-"` + // Username of the user that created the token. + CreatedByUsername types.String `tfsdk:"-"` +} + +func (newState *ListTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokenManagementRequest_SdkV2) { +} + +func (newState *ListTokenManagementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTokenManagementRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokenManagementRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTokenManagementRequest_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, ListTokenManagementRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTokenManagementRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_by_id": o.CreatedById, + "created_by_username": o.CreatedByUsername, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTokenManagementRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_by_id": types.Int64Type, + "created_by_username": types.StringType, + }, + } +} + +// Tokens were successfully returned. +type ListTokensResponse_SdkV2 struct { + // Token metadata of each user-created token in the workspace + TokenInfos types.List `tfsdk:"token_infos" tf:"optional"` +} + +func (newState *ListTokensResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListTokensResponse_SdkV2) { +} + +func (newState *ListTokensResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListTokensResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListTokensResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListTokensResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "token_infos": reflect.TypeOf(TokenInfo_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, ListTokensResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListTokensResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_infos": o.TokenInfos, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListTokensResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_infos": basetypes.ListType{ + ElemType: TokenInfo{}.Type(ctx), + }, + }, + } +} + +// GetTokenInfos returns the value of the TokenInfos field in ListTokensResponse_SdkV2 as +// a slice of TokenInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListTokensResponse_SdkV2) GetTokenInfos(ctx context.Context) ([]TokenInfo_SdkV2, bool) { + if o.TokenInfos.IsNull() || o.TokenInfos.IsUnknown() { + return nil, false + } + var v []TokenInfo_SdkV2 + d := o.TokenInfos.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTokenInfos sets the value of the TokenInfos field in ListTokensResponse_SdkV2. +func (o *ListTokensResponse_SdkV2) SetTokenInfos(ctx context.Context, v []TokenInfo_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["token_infos"] + t = t.(attr.TypeWithElementType).ElementType() + o.TokenInfos = types.ListValueMust(t, vs) +} + +type MicrosoftTeamsConfig_SdkV2 struct { + // [Input-Only] URL for Microsoft Teams. + Url types.String `tfsdk:"url" tf:"optional"` + // [Output-Only] Whether URL is set. + UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` +} + +func (newState *MicrosoftTeamsConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MicrosoftTeamsConfig_SdkV2) { +} + +func (newState *MicrosoftTeamsConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState MicrosoftTeamsConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MicrosoftTeamsConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MicrosoftTeamsConfig_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, MicrosoftTeamsConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MicrosoftTeamsConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "url": o.Url, + "url_set": o.UrlSet, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MicrosoftTeamsConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "url": types.StringType, + "url_set": types.BoolType, + }, + } +} + +// The stable AWS IP CIDR blocks. You can use these to configure the firewall of +// your resources to allow traffic from your Databricks workspace. +type NccAwsStableIpRule_SdkV2 struct { + // The list of stable IP CIDR blocks from which Databricks network traffic + // originates when accessing your resources. + CidrBlocks types.List `tfsdk:"cidr_blocks" tf:"optional"` +} + +func (newState *NccAwsStableIpRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAwsStableIpRule_SdkV2) { +} + +func (newState *NccAwsStableIpRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAwsStableIpRule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAwsStableIpRule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccAwsStableIpRule_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "cidr_blocks": 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, NccAwsStableIpRule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccAwsStableIpRule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "cidr_blocks": o.CidrBlocks, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccAwsStableIpRule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "cidr_blocks": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetCidrBlocks returns the value of the CidrBlocks field in NccAwsStableIpRule_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *NccAwsStableIpRule_SdkV2) GetCidrBlocks(ctx context.Context) ([]types.String, bool) { + if o.CidrBlocks.IsNull() || o.CidrBlocks.IsUnknown() { + return nil, false + } + var v []types.String + d := o.CidrBlocks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCidrBlocks sets the value of the CidrBlocks field in NccAwsStableIpRule_SdkV2. +func (o *NccAwsStableIpRule_SdkV2) SetCidrBlocks(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["cidr_blocks"] + t = t.(attr.TypeWithElementType).ElementType() + o.CidrBlocks = types.ListValueMust(t, vs) +} + +type NccAzurePrivateEndpointRule_SdkV2 struct { + // The current status of this private endpoint. The private endpoint rules + // are effective only if the connection state is `ESTABLISHED`. Remember + // that you must approve new endpoints on your resources in the Azure portal + // before they take effect. + // + // The possible values are: - INIT: (deprecated) The endpoint has been + // created and pending approval. - PENDING: The endpoint has been created + // and pending approval. - ESTABLISHED: The endpoint has been approved and + // is ready to use in your serverless compute resources. - REJECTED: + // Connection was rejected by the private link resource owner. - + // DISCONNECTED: Connection was removed by the private link resource owner, + // the private endpoint becomes informative and should be deleted for + // clean-up. + ConnectionState types.String `tfsdk:"connection_state" tf:"optional"` + // Time in epoch milliseconds when this object was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // Whether this private endpoint is deactivated. + Deactivated types.Bool `tfsdk:"deactivated" tf:"computed"` + // Time in epoch milliseconds when this object was deactivated. + DeactivatedAt types.Int64 `tfsdk:"deactivated_at" tf:"computed"` + // The name of the Azure private endpoint resource. + EndpointName types.String `tfsdk:"endpoint_name" tf:"computed"` + // The sub-resource type (group ID) of the target resource. Note that to + // connect to workspace root storage (root DBFS), you need two endpoints, + // one for `blob` and one for `dfs`. + GroupId types.String `tfsdk:"group_id" tf:"optional"` + // The ID of a network connectivity configuration, which is the parent + // resource of this private endpoint rule object. + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"optional"` + // The Azure resource ID of the target resource. + ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + // The ID of a private endpoint rule. + RuleId types.String `tfsdk:"rule_id" tf:"computed"` + // Time in epoch milliseconds when this object was updated. + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` +} + +func (newState *NccAzurePrivateEndpointRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzurePrivateEndpointRule_SdkV2) { +} + +func (newState *NccAzurePrivateEndpointRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAzurePrivateEndpointRule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzurePrivateEndpointRule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccAzurePrivateEndpointRule_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, NccAzurePrivateEndpointRule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccAzurePrivateEndpointRule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "connection_state": o.ConnectionState, + "creation_time": o.CreationTime, + "deactivated": o.Deactivated, + "deactivated_at": o.DeactivatedAt, + "endpoint_name": o.EndpointName, + "group_id": o.GroupId, + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "resource_id": o.ResourceId, + "rule_id": o.RuleId, + "updated_time": o.UpdatedTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccAzurePrivateEndpointRule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "connection_state": types.StringType, + "creation_time": types.Int64Type, + "deactivated": types.BoolType, + "deactivated_at": types.Int64Type, + "endpoint_name": types.StringType, + "group_id": types.StringType, + "network_connectivity_config_id": types.StringType, + "resource_id": types.StringType, + "rule_id": types.StringType, + "updated_time": types.Int64Type, + }, + } +} + +// The stable Azure service endpoints. You can configure the firewall of your +// Azure resources to allow traffic from your Databricks serverless compute +// resources. +type NccAzureServiceEndpointRule_SdkV2 struct { + // The list of subnets from which Databricks network traffic originates when + // accessing your Azure resources. + Subnets types.List `tfsdk:"subnets" tf:"optional"` + // The Azure region in which this service endpoint rule applies. + TargetRegion types.String `tfsdk:"target_region" tf:"optional"` + // The Azure services to which this service endpoint rule applies to. + TargetServices types.List `tfsdk:"target_services" tf:"optional"` +} + +func (newState *NccAzureServiceEndpointRule_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccAzureServiceEndpointRule_SdkV2) { +} + +func (newState *NccAzureServiceEndpointRule_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccAzureServiceEndpointRule_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccAzureServiceEndpointRule. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccAzureServiceEndpointRule_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subnets": reflect.TypeOf(types.String{}), + "target_services": 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, NccAzureServiceEndpointRule_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccAzureServiceEndpointRule_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "subnets": o.Subnets, + "target_region": o.TargetRegion, + "target_services": o.TargetServices, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccAzureServiceEndpointRule_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "subnets": basetypes.ListType{ + ElemType: types.StringType, + }, + "target_region": types.StringType, + "target_services": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetSubnets returns the value of the Subnets field in NccAzureServiceEndpointRule_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *NccAzureServiceEndpointRule_SdkV2) GetSubnets(ctx context.Context) ([]types.String, bool) { + if o.Subnets.IsNull() || o.Subnets.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Subnets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSubnets sets the value of the Subnets field in NccAzureServiceEndpointRule_SdkV2. +func (o *NccAzureServiceEndpointRule_SdkV2) SetSubnets(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["subnets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Subnets = types.ListValueMust(t, vs) +} + +// GetTargetServices returns the value of the TargetServices field in NccAzureServiceEndpointRule_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *NccAzureServiceEndpointRule_SdkV2) GetTargetServices(ctx context.Context) ([]types.String, bool) { + if o.TargetServices.IsNull() || o.TargetServices.IsUnknown() { + return nil, false + } + var v []types.String + d := o.TargetServices.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTargetServices sets the value of the TargetServices field in NccAzureServiceEndpointRule_SdkV2. +func (o *NccAzureServiceEndpointRule_SdkV2) SetTargetServices(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["target_services"] + t = t.(attr.TypeWithElementType).ElementType() + o.TargetServices = types.ListValueMust(t, vs) +} + +// The network connectivity rules that apply to network traffic from your +// serverless compute resources. +type NccEgressConfig_SdkV2 struct { + // The network connectivity rules that are applied by default without + // resource specific configurations. You can find the stable network + // information of your serverless compute resources here. + DefaultRules types.List `tfsdk:"default_rules" tf:"computed,object"` + // The network connectivity rules that configured for each destinations. + // These rules override default rules. + TargetRules types.List `tfsdk:"target_rules" tf:"optional,object"` +} + +func (newState *NccEgressConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressConfig_SdkV2) { +} + +func (newState *NccEgressConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccEgressConfig_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "default_rules": reflect.TypeOf(NccEgressDefaultRules_SdkV2{}), + "target_rules": reflect.TypeOf(NccEgressTargetRules_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, NccEgressConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccEgressConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "default_rules": o.DefaultRules, + "target_rules": o.TargetRules, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccEgressConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "default_rules": basetypes.ListType{ + ElemType: NccEgressDefaultRules{}.Type(ctx), + }, + "target_rules": basetypes.ListType{ + ElemType: NccEgressTargetRules{}.Type(ctx), + }, + }, + } +} + +// GetDefaultRules returns the value of the DefaultRules field in NccEgressConfig_SdkV2 as +// a NccEgressDefaultRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NccEgressConfig_SdkV2) GetDefaultRules(ctx context.Context) (NccEgressDefaultRules_SdkV2, bool) { + var e NccEgressDefaultRules_SdkV2 + if o.DefaultRules.IsNull() || o.DefaultRules.IsUnknown() { + return e, false + } + var v []NccEgressDefaultRules_SdkV2 + d := o.DefaultRules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDefaultRules sets the value of the DefaultRules field in NccEgressConfig_SdkV2. +func (o *NccEgressConfig_SdkV2) SetDefaultRules(ctx context.Context, v NccEgressDefaultRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["default_rules"] + o.DefaultRules = types.ListValueMust(t, vs) +} + +// GetTargetRules returns the value of the TargetRules field in NccEgressConfig_SdkV2 as +// a NccEgressTargetRules_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NccEgressConfig_SdkV2) GetTargetRules(ctx context.Context) (NccEgressTargetRules_SdkV2, bool) { + var e NccEgressTargetRules_SdkV2 + if o.TargetRules.IsNull() || o.TargetRules.IsUnknown() { + return e, false + } + var v []NccEgressTargetRules_SdkV2 + d := o.TargetRules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTargetRules sets the value of the TargetRules field in NccEgressConfig_SdkV2. +func (o *NccEgressConfig_SdkV2) SetTargetRules(ctx context.Context, v NccEgressTargetRules_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target_rules"] + o.TargetRules = types.ListValueMust(t, vs) +} + +// The network connectivity rules that are applied by default without resource +// specific configurations. You can find the stable network information of your +// serverless compute resources here. +type NccEgressDefaultRules_SdkV2 struct { + // The stable AWS IP CIDR blocks. You can use these to configure the + // firewall of your resources to allow traffic from your Databricks + // workspace. + AwsStableIpRule types.List `tfsdk:"aws_stable_ip_rule" tf:"optional,object"` + // The stable Azure service endpoints. You can configure the firewall of + // your Azure resources to allow traffic from your Databricks serverless + // compute resources. + AzureServiceEndpointRule types.List `tfsdk:"azure_service_endpoint_rule" tf:"optional,object"` +} + +func (newState *NccEgressDefaultRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressDefaultRules_SdkV2) { +} + +func (newState *NccEgressDefaultRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressDefaultRules_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressDefaultRules. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccEgressDefaultRules_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "aws_stable_ip_rule": reflect.TypeOf(NccAwsStableIpRule_SdkV2{}), + "azure_service_endpoint_rule": reflect.TypeOf(NccAzureServiceEndpointRule_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, NccEgressDefaultRules_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccEgressDefaultRules_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "aws_stable_ip_rule": o.AwsStableIpRule, + "azure_service_endpoint_rule": o.AzureServiceEndpointRule, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccEgressDefaultRules_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "aws_stable_ip_rule": basetypes.ListType{ + ElemType: NccAwsStableIpRule{}.Type(ctx), + }, + "azure_service_endpoint_rule": basetypes.ListType{ + ElemType: NccAzureServiceEndpointRule{}.Type(ctx), + }, + }, + } +} + +// GetAwsStableIpRule returns the value of the AwsStableIpRule field in NccEgressDefaultRules_SdkV2 as +// a NccAwsStableIpRule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NccEgressDefaultRules_SdkV2) GetAwsStableIpRule(ctx context.Context) (NccAwsStableIpRule_SdkV2, bool) { + var e NccAwsStableIpRule_SdkV2 + if o.AwsStableIpRule.IsNull() || o.AwsStableIpRule.IsUnknown() { + return e, false + } + var v []NccAwsStableIpRule_SdkV2 + d := o.AwsStableIpRule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAwsStableIpRule sets the value of the AwsStableIpRule field in NccEgressDefaultRules_SdkV2. +func (o *NccEgressDefaultRules_SdkV2) SetAwsStableIpRule(ctx context.Context, v NccAwsStableIpRule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_stable_ip_rule"] + o.AwsStableIpRule = types.ListValueMust(t, vs) +} + +// GetAzureServiceEndpointRule returns the value of the AzureServiceEndpointRule field in NccEgressDefaultRules_SdkV2 as +// a NccAzureServiceEndpointRule_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NccEgressDefaultRules_SdkV2) GetAzureServiceEndpointRule(ctx context.Context) (NccAzureServiceEndpointRule_SdkV2, bool) { + var e NccAzureServiceEndpointRule_SdkV2 + if o.AzureServiceEndpointRule.IsNull() || o.AzureServiceEndpointRule.IsUnknown() { + return e, false + } + var v []NccAzureServiceEndpointRule_SdkV2 + d := o.AzureServiceEndpointRule.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAzureServiceEndpointRule sets the value of the AzureServiceEndpointRule field in NccEgressDefaultRules_SdkV2. +func (o *NccEgressDefaultRules_SdkV2) SetAzureServiceEndpointRule(ctx context.Context, v NccAzureServiceEndpointRule_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_endpoint_rule"] + o.AzureServiceEndpointRule = types.ListValueMust(t, vs) +} + +// The network connectivity rules that configured for each destinations. These +// rules override default rules. +type NccEgressTargetRules_SdkV2 struct { + AzurePrivateEndpointRules types.List `tfsdk:"azure_private_endpoint_rules" tf:"optional"` +} + +func (newState *NccEgressTargetRules_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressTargetRules_SdkV2) { +} + +func (newState *NccEgressTargetRules_SdkV2) SyncEffectiveFieldsDuringRead(existingState NccEgressTargetRules_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NccEgressTargetRules. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NccEgressTargetRules_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "azure_private_endpoint_rules": reflect.TypeOf(NccAzurePrivateEndpointRule_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, NccEgressTargetRules_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NccEgressTargetRules_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "azure_private_endpoint_rules": o.AzurePrivateEndpointRules, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NccEgressTargetRules_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "azure_private_endpoint_rules": basetypes.ListType{ + ElemType: NccAzurePrivateEndpointRule{}.Type(ctx), + }, + }, + } +} + +// GetAzurePrivateEndpointRules returns the value of the AzurePrivateEndpointRules field in NccEgressTargetRules_SdkV2 as +// a slice of NccAzurePrivateEndpointRule_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *NccEgressTargetRules_SdkV2) GetAzurePrivateEndpointRules(ctx context.Context) ([]NccAzurePrivateEndpointRule_SdkV2, bool) { + if o.AzurePrivateEndpointRules.IsNull() || o.AzurePrivateEndpointRules.IsUnknown() { + return nil, false + } + var v []NccAzurePrivateEndpointRule_SdkV2 + d := o.AzurePrivateEndpointRules.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAzurePrivateEndpointRules sets the value of the AzurePrivateEndpointRules field in NccEgressTargetRules_SdkV2. +func (o *NccEgressTargetRules_SdkV2) SetAzurePrivateEndpointRules(ctx context.Context, v []NccAzurePrivateEndpointRule_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["azure_private_endpoint_rules"] + t = t.(attr.TypeWithElementType).ElementType() + o.AzurePrivateEndpointRules = types.ListValueMust(t, vs) +} + +type NetworkConnectivityConfiguration_SdkV2 struct { + // The Databricks account ID that hosts the credential. + AccountId types.String `tfsdk:"account_id" tf:"optional"` + // Time in epoch milliseconds when this object was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` + // The network connectivity rules that apply to network traffic from your + // serverless compute resources. + EgressConfig types.List `tfsdk:"egress_config" tf:"optional,object"` + // The name of the network connectivity configuration. The name can contain + // alphanumeric characters, hyphens, and underscores. The length must be + // between 3 and 30 characters. The name must match the regular expression + // `^[0-9a-zA-Z-_]{3,30}$`. + Name types.String `tfsdk:"name" tf:"optional"` + // Databricks network connectivity configuration ID. + NetworkConnectivityConfigId types.String `tfsdk:"network_connectivity_config_id" tf:"computed"` + // The region for the network connectivity configuration. Only workspaces in + // the same region can be attached to the network connectivity + // configuration. + Region types.String `tfsdk:"region" tf:"optional"` + // Time in epoch milliseconds when this object was updated. + UpdatedTime types.Int64 `tfsdk:"updated_time" tf:"computed"` +} + +func (newState *NetworkConnectivityConfiguration_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NetworkConnectivityConfiguration_SdkV2) { +} + +func (newState *NetworkConnectivityConfiguration_SdkV2) SyncEffectiveFieldsDuringRead(existingState NetworkConnectivityConfiguration_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NetworkConnectivityConfiguration. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NetworkConnectivityConfiguration_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "egress_config": reflect.TypeOf(NccEgressConfig_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, NetworkConnectivityConfiguration_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NetworkConnectivityConfiguration_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "account_id": o.AccountId, + "creation_time": o.CreationTime, + "egress_config": o.EgressConfig, + "name": o.Name, + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "region": o.Region, + "updated_time": o.UpdatedTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NetworkConnectivityConfiguration_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "account_id": types.StringType, + "creation_time": types.Int64Type, + "egress_config": basetypes.ListType{ + ElemType: NccEgressConfig{}.Type(ctx), + }, + "name": types.StringType, + "network_connectivity_config_id": types.StringType, + "region": types.StringType, + "updated_time": types.Int64Type, + }, + } +} + +// GetEgressConfig returns the value of the EgressConfig field in NetworkConnectivityConfiguration_SdkV2 as +// a NccEgressConfig_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NetworkConnectivityConfiguration_SdkV2) GetEgressConfig(ctx context.Context) (NccEgressConfig_SdkV2, bool) { + var e NccEgressConfig_SdkV2 + if o.EgressConfig.IsNull() || o.EgressConfig.IsUnknown() { + return e, false + } + var v []NccEgressConfig_SdkV2 + d := o.EgressConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEgressConfig sets the value of the EgressConfig field in NetworkConnectivityConfiguration_SdkV2. +func (o *NetworkConnectivityConfiguration_SdkV2) SetEgressConfig(ctx context.Context, v NccEgressConfig_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["egress_config"] + o.EgressConfig = types.ListValueMust(t, vs) +} + +type NotificationDestination_SdkV2 struct { + // The configuration for the notification destination. Will be exactly one + // of the nested configs. Only returns for users with workspace admin + // permissions. + Config types.List `tfsdk:"config" tf:"optional,object"` + // [Output-only] The type of the notification destination. The type can not + // be changed once set. + DestinationType types.String `tfsdk:"destination_type" tf:"optional"` + // The display name for the notification destination. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying notification destination. + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *NotificationDestination_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NotificationDestination_SdkV2) { +} + +func (newState *NotificationDestination_SdkV2) SyncEffectiveFieldsDuringRead(existingState NotificationDestination_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NotificationDestination. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NotificationDestination_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "config": reflect.TypeOf(Config_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, NotificationDestination_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NotificationDestination_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config": o.Config, + "destination_type": o.DestinationType, + "display_name": o.DisplayName, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NotificationDestination_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config": basetypes.ListType{ + ElemType: Config{}.Type(ctx), + }, + "destination_type": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + }, + } +} + +// GetConfig returns the value of the Config field in NotificationDestination_SdkV2 as +// a Config_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *NotificationDestination_SdkV2) GetConfig(ctx context.Context) (Config_SdkV2, bool) { + var e Config_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []Config_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in NotificationDestination_SdkV2. +func (o *NotificationDestination_SdkV2) SetConfig(ctx context.Context, v Config_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +type PagerdutyConfig_SdkV2 struct { + // [Input-Only] Integration key for PagerDuty. + IntegrationKey types.String `tfsdk:"integration_key" tf:"optional"` + // [Output-Only] Whether integration key is set. + IntegrationKeySet types.Bool `tfsdk:"integration_key_set" tf:"optional"` +} + +func (newState *PagerdutyConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PagerdutyConfig_SdkV2) { +} + +func (newState *PagerdutyConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState PagerdutyConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PagerdutyConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PagerdutyConfig_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, PagerdutyConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PagerdutyConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "integration_key": o.IntegrationKey, + "integration_key_set": o.IntegrationKeySet, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PagerdutyConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "integration_key": types.StringType, + "integration_key_set": types.BoolType, + }, + } +} + +// Partition by workspace or account +type PartitionId_SdkV2 struct { + // The ID of the workspace. + WorkspaceId types.Int64 `tfsdk:"workspaceId" tf:"optional"` +} + +func (newState *PartitionId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionId_SdkV2) { +} + +func (newState *PartitionId_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionId_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionId. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PartitionId_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, PartitionId_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PartitionId_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspaceId": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PartitionId_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspaceId": types.Int64Type, + }, + } +} + +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" tf:""` +} + +func (newState *PersonalComputeMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalComputeMessage_SdkV2) { +} + +func (newState *PersonalComputeMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalComputeMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PersonalComputeMessage_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, PersonalComputeMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PersonalComputeMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PersonalComputeMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": types.StringType, + }, + } +} + +type PersonalComputeSetting_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + + PersonalCompute types.List `tfsdk:"personal_compute" tf:"object"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *PersonalComputeSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PersonalComputeSetting_SdkV2) { +} + +func (newState *PersonalComputeSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState PersonalComputeSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PersonalComputeSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PersonalComputeSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "personal_compute": reflect.TypeOf(PersonalComputeMessage_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, PersonalComputeSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PersonalComputeSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "personal_compute": o.PersonalCompute, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PersonalComputeSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "personal_compute": basetypes.ListType{ + ElemType: PersonalComputeMessage{}.Type(ctx), + }, + "setting_name": types.StringType, + }, + } +} + +// GetPersonalCompute returns the value of the PersonalCompute field in PersonalComputeSetting_SdkV2 as +// a PersonalComputeMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *PersonalComputeSetting_SdkV2) GetPersonalCompute(ctx context.Context) (PersonalComputeMessage_SdkV2, bool) { + var e PersonalComputeMessage_SdkV2 + if o.PersonalCompute.IsNull() || o.PersonalCompute.IsUnknown() { + return e, false + } + var v []PersonalComputeMessage_SdkV2 + d := o.PersonalCompute.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPersonalCompute sets the value of the PersonalCompute field in PersonalComputeSetting_SdkV2. +func (o *PersonalComputeSetting_SdkV2) SetPersonalCompute(ctx context.Context, v PersonalComputeMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["personal_compute"] + o.PersonalCompute = types.ListValueMust(t, vs) +} + +type PublicTokenInfo_SdkV2 struct { + // Comment the token was created with, if applicable. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Server time (in epoch milliseconds) when the token was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + // Server time (in epoch milliseconds) when the token will expire, or -1 if + // not applicable. + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + // The ID of this token. + TokenId types.String `tfsdk:"token_id" tf:"optional"` +} + +func (newState *PublicTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PublicTokenInfo_SdkV2) { +} + +func (newState *PublicTokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState PublicTokenInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PublicTokenInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PublicTokenInfo_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, PublicTokenInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PublicTokenInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "creation_time": o.CreationTime, + "expiry_time": o.ExpiryTime, + "token_id": o.TokenId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PublicTokenInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "creation_time": types.Int64Type, + "expiry_time": types.Int64Type, + "token_id": types.StringType, + }, + } +} + +// Details required to replace an IP access list. +type ReplaceIpAccessList_SdkV2 struct { + // Specifies whether this IP access list is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:""` + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` + + IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + // Label for the IP access list. This **cannot** be empty. + Label types.String `tfsdk:"label" tf:""` + // Type of IP access list. Valid values are as follows and are + // case-sensitive: + // + // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block + // list. Exclude this IP or range. IP addresses in the block list are + // excluded even if they are included in an allow list. + ListType types.String `tfsdk:"list_type" tf:""` +} + +func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceIpAccessList_SdkV2) { +} + +func (newState *ReplaceIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceIpAccessList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceIpAccessList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReplaceIpAccessList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_addresses": 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, ReplaceIpAccessList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReplaceIpAccessList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + "ip_access_list_id": o.IpAccessListId, + "ip_addresses": o.IpAddresses, + "label": o.Label, + "list_type": o.ListType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ReplaceIpAccessList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "ip_access_list_id": types.StringType, + "ip_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + "label": types.StringType, + "list_type": types.StringType, + }, + } +} + +// GetIpAddresses returns the value of the IpAddresses field in ReplaceIpAccessList_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ReplaceIpAccessList_SdkV2) GetIpAddresses(ctx context.Context) ([]types.String, bool) { + if o.IpAddresses.IsNull() || o.IpAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.IpAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAddresses sets the value of the IpAddresses field in ReplaceIpAccessList_SdkV2. +func (o *ReplaceIpAccessList_SdkV2) SetIpAddresses(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["ip_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAddresses = types.ListValueMust(t, vs) +} + +type ReplaceResponse_SdkV2 struct { +} + +func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ReplaceResponse_SdkV2) { +} + +func (newState *ReplaceResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ReplaceResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ReplaceResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ReplaceResponse_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, ReplaceResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ReplaceResponse_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 ReplaceResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RestrictWorkspaceAdminsMessage_SdkV2 struct { + Status types.String `tfsdk:"status" tf:""` +} + +func (newState *RestrictWorkspaceAdminsMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestrictWorkspaceAdminsMessage_SdkV2) { +} + +func (newState *RestrictWorkspaceAdminsMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestrictWorkspaceAdminsMessage_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, RestrictWorkspaceAdminsMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestrictWorkspaceAdminsMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestrictWorkspaceAdminsMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "status": types.StringType, + }, + } +} + +type RestrictWorkspaceAdminsSetting_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 + // help prevent simultaneous writes of a setting overwriting each other. It + // is strongly suggested that systems make use of the etag in the read -> + // update pattern to perform setting updates in order to avoid race + // conditions. That is, get an etag from a GET request, and pass it with the + // PATCH request to identify the setting version you are updating. + Etag types.String `tfsdk:"etag" tf:"optional"` + + RestrictWorkspaceAdmins types.List `tfsdk:"restrict_workspace_admins" tf:"object"` + // Name of the corresponding setting. This field is populated in the + // response, but it will not be respected even if it's set in the request + // body. The setting name in the path parameter will be respected instead. + // Setting name is required to be 'default' if the setting only has one + // instance per workspace. + SettingName types.String `tfsdk:"setting_name" tf:"optional"` +} + +func (newState *RestrictWorkspaceAdminsSetting_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestrictWorkspaceAdminsSetting_SdkV2) { +} + +func (newState *RestrictWorkspaceAdminsSetting_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestrictWorkspaceAdminsSetting_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestrictWorkspaceAdminsSetting. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestrictWorkspaceAdminsSetting_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "restrict_workspace_admins": reflect.TypeOf(RestrictWorkspaceAdminsMessage_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, RestrictWorkspaceAdminsSetting_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestrictWorkspaceAdminsSetting_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "etag": o.Etag, + "restrict_workspace_admins": o.RestrictWorkspaceAdmins, + "setting_name": o.SettingName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestrictWorkspaceAdminsSetting_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "etag": types.StringType, + "restrict_workspace_admins": basetypes.ListType{ + ElemType: RestrictWorkspaceAdminsMessage{}.Type(ctx), + }, + "setting_name": types.StringType, + }, + } +} + +// GetRestrictWorkspaceAdmins returns the value of the RestrictWorkspaceAdmins field in RestrictWorkspaceAdminsSetting_SdkV2 as +// a RestrictWorkspaceAdminsMessage_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RestrictWorkspaceAdminsSetting_SdkV2) GetRestrictWorkspaceAdmins(ctx context.Context) (RestrictWorkspaceAdminsMessage_SdkV2, bool) { + var e RestrictWorkspaceAdminsMessage_SdkV2 + if o.RestrictWorkspaceAdmins.IsNull() || o.RestrictWorkspaceAdmins.IsUnknown() { + return e, false + } + var v []RestrictWorkspaceAdminsMessage_SdkV2 + d := o.RestrictWorkspaceAdmins.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRestrictWorkspaceAdmins sets the value of the RestrictWorkspaceAdmins field in RestrictWorkspaceAdminsSetting_SdkV2. +func (o *RestrictWorkspaceAdminsSetting_SdkV2) SetRestrictWorkspaceAdmins(ctx context.Context, v RestrictWorkspaceAdminsMessage_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restrict_workspace_admins"] + o.RestrictWorkspaceAdmins = types.ListValueMust(t, vs) +} + +type RevokeTokenRequest_SdkV2 struct { + // The ID of the token to be revoked. + TokenId types.String `tfsdk:"token_id" tf:""` +} + +func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RevokeTokenRequest_SdkV2) { +} + +func (newState *RevokeTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RevokeTokenRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RevokeTokenRequest_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, RevokeTokenRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RevokeTokenRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "token_id": o.TokenId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RevokeTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "token_id": types.StringType, + }, + } +} + +type RevokeTokenResponse_SdkV2 struct { +} + +func (newState *RevokeTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RevokeTokenResponse_SdkV2) { +} + +func (newState *RevokeTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RevokeTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RevokeTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RevokeTokenResponse_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, RevokeTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RevokeTokenResponse_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 RevokeTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type SetStatusResponse_SdkV2 struct { +} + +func (newState *SetStatusResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetStatusResponse_SdkV2) { +} + +func (newState *SetStatusResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetStatusResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetStatusResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetStatusResponse_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, SetStatusResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetStatusResponse_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 SetStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type SlackConfig_SdkV2 struct { + // [Input-Only] URL for Slack destination. + Url types.String `tfsdk:"url" tf:"optional"` + // [Output-Only] Whether URL is set. + UrlSet types.Bool `tfsdk:"url_set" tf:"optional"` +} + +func (newState *SlackConfig_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SlackConfig_SdkV2) { +} + +func (newState *SlackConfig_SdkV2) SyncEffectiveFieldsDuringRead(existingState SlackConfig_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SlackConfig. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SlackConfig_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, SlackConfig_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SlackConfig_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "url": o.Url, + "url_set": o.UrlSet, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SlackConfig_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "url": types.StringType, + "url_set": types.BoolType, + }, + } +} + +type StringMessage_SdkV2 struct { + // Represents a generic string value. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *StringMessage_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StringMessage_SdkV2) { +} + +func (newState *StringMessage_SdkV2) SyncEffectiveFieldsDuringRead(existingState StringMessage_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StringMessage. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StringMessage_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, StringMessage_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StringMessage_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StringMessage_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": types.StringType, + }, + } +} + +type TokenAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *TokenAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlRequest_SdkV2) { +} + +func (newState *TokenAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenAccessControlRequest_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, TokenAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type TokenAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *TokenAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenAccessControlResponse_SdkV2) { +} + +func (newState *TokenAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(TokenPermission_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, TokenAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: TokenPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in TokenAccessControlResponse_SdkV2 as +// a slice of TokenPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *TokenAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]TokenPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []TokenPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in TokenAccessControlResponse_SdkV2. +func (o *TokenAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []TokenPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type TokenInfo_SdkV2 struct { + // Comment that describes the purpose of the token, specified by the token + // creator. + Comment types.String `tfsdk:"comment" tf:"optional"` + // User ID of the user that created the token. + CreatedById types.Int64 `tfsdk:"created_by_id" tf:"optional"` + // Username of the user that created the token. + CreatedByUsername types.String `tfsdk:"created_by_username" tf:"optional"` + // Timestamp when the token was created. + CreationTime types.Int64 `tfsdk:"creation_time" tf:"optional"` + // Timestamp when the token expires. + ExpiryTime types.Int64 `tfsdk:"expiry_time" tf:"optional"` + // Approximate timestamp for the day the token was last used. Accurate up to + // 1 day. + LastUsedDay types.Int64 `tfsdk:"last_used_day" tf:"optional"` + // User ID of the user that owns the token. + OwnerId types.Int64 `tfsdk:"owner_id" tf:"optional"` + // ID of the token. + TokenId types.String `tfsdk:"token_id" tf:"optional"` + // If applicable, the ID of the workspace that the token was created in. + WorkspaceId types.Int64 `tfsdk:"workspace_id" tf:"optional"` +} + +func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenInfo_SdkV2) { +} + +func (newState *TokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenInfo_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, TokenInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "created_by_id": o.CreatedById, + "created_by_username": o.CreatedByUsername, + "creation_time": o.CreationTime, + "expiry_time": o.ExpiryTime, + "last_used_day": o.LastUsedDay, + "owner_id": o.OwnerId, + "token_id": o.TokenId, + "workspace_id": o.WorkspaceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "created_by_id": types.Int64Type, + "created_by_username": types.StringType, + "creation_time": types.Int64Type, + "expiry_time": types.Int64Type, + "last_used_day": types.Int64Type, + "owner_id": types.Int64Type, + "token_id": types.StringType, + "workspace_id": types.Int64Type, + }, + } +} + +type TokenPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *TokenPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermission_SdkV2) { +} + +func (newState *TokenPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, TokenPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in TokenPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *TokenPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in TokenPermission_SdkV2. +func (o *TokenPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type TokenPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *TokenPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissions_SdkV2) { +} + +func (newState *TokenPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(TokenAccessControlResponse_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, TokenPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: TokenAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in TokenPermissions_SdkV2 as +// a slice of TokenAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *TokenPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]TokenAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []TokenAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in TokenPermissions_SdkV2. +func (o *TokenPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []TokenAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type TokenPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *TokenPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsDescription_SdkV2) { +} + +func (newState *TokenPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TokenPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenPermissionsDescription_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, TokenPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type TokenPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` +} + +func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TokenPermissionsRequest_SdkV2) { +} + +func (newState *TokenPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TokenPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TokenPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(TokenAccessControlRequest_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, TokenPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TokenPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TokenPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: TokenAccessControlRequest{}.Type(ctx), + }, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in TokenPermissionsRequest_SdkV2 as +// a slice of TokenAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *TokenPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]TokenAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []TokenAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in TokenPermissionsRequest_SdkV2. +func (o *TokenPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []TokenAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(AibiDashboardEmbeddingAccessPolicySetting_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, UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: AibiDashboardEmbeddingAccessPolicySetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2 as +// a AibiDashboardEmbeddingAccessPolicySetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) GetSetting(ctx context.Context) (AibiDashboardEmbeddingAccessPolicySetting_SdkV2, bool) { + var e AibiDashboardEmbeddingAccessPolicySetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []AibiDashboardEmbeddingAccessPolicySetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2. +func (o *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) SetSetting(ctx context.Context, v AibiDashboardEmbeddingAccessPolicySetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(AibiDashboardEmbeddingApprovedDomainsSetting_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, UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: AibiDashboardEmbeddingApprovedDomainsSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2 as +// a AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) GetSetting(ctx context.Context) (AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2, bool) { + var e AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2. +func (o *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) SetSetting(ctx context.Context, v AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateAutomaticClusterUpdateSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAutomaticClusterUpdateSettingRequest_SdkV2) { +} + +func (newState *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAutomaticClusterUpdateSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAutomaticClusterUpdateSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(AutomaticClusterUpdateSetting_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, UpdateAutomaticClusterUpdateSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAutomaticClusterUpdateSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAutomaticClusterUpdateSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: AutomaticClusterUpdateSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateAutomaticClusterUpdateSettingRequest_SdkV2 as +// a AutomaticClusterUpdateSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) GetSetting(ctx context.Context) (AutomaticClusterUpdateSetting_SdkV2, bool) { + var e AutomaticClusterUpdateSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []AutomaticClusterUpdateSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateAutomaticClusterUpdateSettingRequest_SdkV2. +func (o *UpdateAutomaticClusterUpdateSettingRequest_SdkV2) SetSetting(ctx context.Context, v AutomaticClusterUpdateSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateComplianceSecurityProfileSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComplianceSecurityProfileSettingRequest_SdkV2) { +} + +func (newState *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateComplianceSecurityProfileSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateComplianceSecurityProfileSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(ComplianceSecurityProfileSetting_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, UpdateComplianceSecurityProfileSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateComplianceSecurityProfileSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateComplianceSecurityProfileSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: ComplianceSecurityProfileSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateComplianceSecurityProfileSettingRequest_SdkV2 as +// a ComplianceSecurityProfileSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateComplianceSecurityProfileSettingRequest_SdkV2) GetSetting(ctx context.Context) (ComplianceSecurityProfileSetting_SdkV2, bool) { + var e ComplianceSecurityProfileSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []ComplianceSecurityProfileSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateComplianceSecurityProfileSettingRequest_SdkV2. +func (o *UpdateComplianceSecurityProfileSettingRequest_SdkV2) SetSetting(ctx context.Context, v ComplianceSecurityProfileSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateCspEnablementAccountSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCspEnablementAccountSettingRequest_SdkV2) { +} + +func (newState *UpdateCspEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCspEnablementAccountSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCspEnablementAccountSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(CspEnablementAccountSetting_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, UpdateCspEnablementAccountSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCspEnablementAccountSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCspEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: CspEnablementAccountSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateCspEnablementAccountSettingRequest_SdkV2 as +// a CspEnablementAccountSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateCspEnablementAccountSettingRequest_SdkV2) GetSetting(ctx context.Context) (CspEnablementAccountSetting_SdkV2, bool) { + var e CspEnablementAccountSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []CspEnablementAccountSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateCspEnablementAccountSettingRequest_SdkV2. +func (o *UpdateCspEnablementAccountSettingRequest_SdkV2) SetSetting(ctx context.Context, v CspEnablementAccountSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateDefaultNamespaceSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + // 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" tf:"object"` +} + +func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDefaultNamespaceSettingRequest_SdkV2) { +} + +func (newState *UpdateDefaultNamespaceSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDefaultNamespaceSettingRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateDefaultNamespaceSettingRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateDefaultNamespaceSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(DefaultNamespaceSetting_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, UpdateDefaultNamespaceSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateDefaultNamespaceSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateDefaultNamespaceSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: DefaultNamespaceSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateDefaultNamespaceSettingRequest_SdkV2 as +// a DefaultNamespaceSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateDefaultNamespaceSettingRequest_SdkV2) GetSetting(ctx context.Context) (DefaultNamespaceSetting_SdkV2, bool) { + var e DefaultNamespaceSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []DefaultNamespaceSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateDefaultNamespaceSettingRequest_SdkV2. +func (o *UpdateDefaultNamespaceSettingRequest_SdkV2) SetSetting(ctx context.Context, v DefaultNamespaceSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateDisableLegacyAccessRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyAccessRequest_SdkV2) { +} + +func (newState *UpdateDisableLegacyAccessRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyAccessRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateDisableLegacyAccessRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(DisableLegacyAccess_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, UpdateDisableLegacyAccessRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyAccessRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateDisableLegacyAccessRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: DisableLegacyAccess{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateDisableLegacyAccessRequest_SdkV2 as +// a DisableLegacyAccess_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateDisableLegacyAccessRequest_SdkV2) GetSetting(ctx context.Context) (DisableLegacyAccess_SdkV2, bool) { + var e DisableLegacyAccess_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []DisableLegacyAccess_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateDisableLegacyAccessRequest_SdkV2. +func (o *UpdateDisableLegacyAccessRequest_SdkV2) SetSetting(ctx context.Context, v DisableLegacyAccess_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateDisableLegacyDbfsRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyDbfsRequest_SdkV2) { +} + +func (newState *UpdateDisableLegacyDbfsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyDbfsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateDisableLegacyDbfsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(DisableLegacyDbfs_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, UpdateDisableLegacyDbfsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyDbfsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateDisableLegacyDbfsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: DisableLegacyDbfs{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateDisableLegacyDbfsRequest_SdkV2 as +// a DisableLegacyDbfs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateDisableLegacyDbfsRequest_SdkV2) GetSetting(ctx context.Context) (DisableLegacyDbfs_SdkV2, bool) { + var e DisableLegacyDbfs_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []DisableLegacyDbfs_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateDisableLegacyDbfsRequest_SdkV2. +func (o *UpdateDisableLegacyDbfsRequest_SdkV2) SetSetting(ctx context.Context, v DisableLegacyDbfs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateDisableLegacyFeaturesRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyFeaturesRequest_SdkV2) { +} + +func (newState *UpdateDisableLegacyFeaturesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateDisableLegacyFeaturesRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateDisableLegacyFeaturesRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(DisableLegacyFeatures_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, UpdateDisableLegacyFeaturesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyFeaturesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateDisableLegacyFeaturesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: DisableLegacyFeatures{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateDisableLegacyFeaturesRequest_SdkV2 as +// a DisableLegacyFeatures_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateDisableLegacyFeaturesRequest_SdkV2) GetSetting(ctx context.Context) (DisableLegacyFeatures_SdkV2, bool) { + var e DisableLegacyFeatures_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []DisableLegacyFeatures_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateDisableLegacyFeaturesRequest_SdkV2. +func (o *UpdateDisableLegacyFeaturesRequest_SdkV2) SetSetting(ctx context.Context, v DisableLegacyFeatures_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) { +} + +func (newState *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(EnhancedSecurityMonitoringSetting_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, UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: EnhancedSecurityMonitoringSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2 as +// a EnhancedSecurityMonitoringSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) GetSetting(ctx context.Context) (EnhancedSecurityMonitoringSetting_SdkV2, bool) { + var e EnhancedSecurityMonitoringSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []EnhancedSecurityMonitoringSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2. +func (o *UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) SetSetting(ctx context.Context, v EnhancedSecurityMonitoringSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdateEsmEnablementAccountSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEsmEnablementAccountSettingRequest_SdkV2) { +} + +func (newState *UpdateEsmEnablementAccountSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateEsmEnablementAccountSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateEsmEnablementAccountSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(EsmEnablementAccountSetting_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, UpdateEsmEnablementAccountSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateEsmEnablementAccountSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateEsmEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: EsmEnablementAccountSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateEsmEnablementAccountSettingRequest_SdkV2 as +// a EsmEnablementAccountSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateEsmEnablementAccountSettingRequest_SdkV2) GetSetting(ctx context.Context) (EsmEnablementAccountSetting_SdkV2, bool) { + var e EsmEnablementAccountSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []EsmEnablementAccountSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateEsmEnablementAccountSettingRequest_SdkV2. +func (o *UpdateEsmEnablementAccountSettingRequest_SdkV2) SetSetting(ctx context.Context, v EsmEnablementAccountSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +// Details required to update an IP access list. +type UpdateIpAccessList_SdkV2 struct { + // Specifies whether this IP access list is enabled. + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // The ID for the corresponding IP access list + IpAccessListId types.String `tfsdk:"-"` + + IpAddresses types.List `tfsdk:"ip_addresses" tf:"optional"` + // Label for the IP access list. This **cannot** be empty. + Label types.String `tfsdk:"label" tf:"optional"` + // Type of IP access list. Valid values are as follows and are + // case-sensitive: + // + // * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block + // list. Exclude this IP or range. IP addresses in the block list are + // excluded even if they are included in an allow list. + ListType types.String `tfsdk:"list_type" tf:"optional"` +} + +func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateIpAccessList_SdkV2) { +} + +func (newState *UpdateIpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateIpAccessList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateIpAccessList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateIpAccessList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_addresses": 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, UpdateIpAccessList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateIpAccessList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + "ip_access_list_id": o.IpAccessListId, + "ip_addresses": o.IpAddresses, + "label": o.Label, + "list_type": o.ListType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateIpAccessList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "ip_access_list_id": types.StringType, + "ip_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + "label": types.StringType, + "list_type": types.StringType, + }, + } +} + +// GetIpAddresses returns the value of the IpAddresses field in UpdateIpAccessList_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateIpAccessList_SdkV2) GetIpAddresses(ctx context.Context) ([]types.String, bool) { + if o.IpAddresses.IsNull() || o.IpAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.IpAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetIpAddresses sets the value of the IpAddresses field in UpdateIpAccessList_SdkV2. +func (o *UpdateIpAccessList_SdkV2) SetIpAddresses(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["ip_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.IpAddresses = types.ListValueMust(t, vs) +} + +type UpdateNotificationDestinationRequest_SdkV2 struct { + // The configuration for the notification destination. Must wrap EXACTLY one + // of the nested configs. + Config types.List `tfsdk:"config" tf:"optional,object"` + // The display name for the notification destination. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying notification destination. + Id types.String `tfsdk:"-"` +} + +func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateNotificationDestinationRequest_SdkV2) { +} + +func (newState *UpdateNotificationDestinationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateNotificationDestinationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateNotificationDestinationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "config": reflect.TypeOf(Config_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, UpdateNotificationDestinationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateNotificationDestinationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config": o.Config, + "display_name": o.DisplayName, + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateNotificationDestinationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config": basetypes.ListType{ + ElemType: Config{}.Type(ctx), + }, + "display_name": types.StringType, + "id": types.StringType, + }, + } +} + +// GetConfig returns the value of the Config field in UpdateNotificationDestinationRequest_SdkV2 as +// a Config_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateNotificationDestinationRequest_SdkV2) GetConfig(ctx context.Context) (Config_SdkV2, bool) { + var e Config_SdkV2 + if o.Config.IsNull() || o.Config.IsUnknown() { + return e, false + } + var v []Config_SdkV2 + d := o.Config.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfig sets the value of the Config field in UpdateNotificationDestinationRequest_SdkV2. +func (o *UpdateNotificationDestinationRequest_SdkV2) SetConfig(ctx context.Context, v Config_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] + o.Config = types.ListValueMust(t, vs) +} + +// Details required to update a setting. +type UpdatePersonalComputeSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalComputeSettingRequest_SdkV2) { +} + +func (newState *UpdatePersonalComputeSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePersonalComputeSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePersonalComputeSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(PersonalComputeSetting_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, UpdatePersonalComputeSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalComputeSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdatePersonalComputeSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: PersonalComputeSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdatePersonalComputeSettingRequest_SdkV2 as +// a PersonalComputeSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdatePersonalComputeSettingRequest_SdkV2) GetSetting(ctx context.Context) (PersonalComputeSetting_SdkV2, bool) { + var e PersonalComputeSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []PersonalComputeSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdatePersonalComputeSettingRequest_SdkV2. +func (o *UpdatePersonalComputeSettingRequest_SdkV2) SetSetting(ctx context.Context, v PersonalComputeSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Details required to update a setting. +type UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2 struct { + // This should always be set to true for Settings API. Added for AIP + // compliance. + AllowMissing types.Bool `tfsdk:"allow_missing" tf:""` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + FieldMask types.String `tfsdk:"field_mask" tf:""` + + Setting types.List `tfsdk:"setting" tf:"object"` +} + +func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +func (newState *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "setting": reflect.TypeOf(RestrictWorkspaceAdminsSetting_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, UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allow_missing": types.BoolType, + "field_mask": types.StringType, + "setting": basetypes.ListType{ + ElemType: RestrictWorkspaceAdminsSetting{}.Type(ctx), + }, + }, + } +} + +// GetSetting returns the value of the Setting field in UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2 as +// a RestrictWorkspaceAdminsSetting_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) GetSetting(ctx context.Context) (RestrictWorkspaceAdminsSetting_SdkV2, bool) { + var e RestrictWorkspaceAdminsSetting_SdkV2 + if o.Setting.IsNull() || o.Setting.IsUnknown() { + return e, false + } + var v []RestrictWorkspaceAdminsSetting_SdkV2 + d := o.Setting.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSetting sets the value of the Setting field in UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2. +func (o *UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) SetSetting(ctx context.Context, v RestrictWorkspaceAdminsSetting_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] + o.Setting = types.ListValueMust(t, vs) +} diff --git a/internal/service/settings_tf/model.go b/internal/service/settings_tf/model.go index d5e83f079..14010b78d 100755 --- a/internal/service/settings_tf/model.go +++ b/internal/service/settings_tf/model.go @@ -63,7 +63,7 @@ func (o AibiDashboardEmbeddingAccessPolicy) Type(ctx context.Context) attr.Type } type AibiDashboardEmbeddingAccessPolicySetting struct { - AibiDashboardEmbeddingAccessPolicy types.List `tfsdk:"aibi_dashboard_embedding_access_policy" tf:"object"` + AibiDashboardEmbeddingAccessPolicy types.Object `tfsdk:"aibi_dashboard_embedding_access_policy" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -116,11 +116,9 @@ func (o AibiDashboardEmbeddingAccessPolicySetting) ToObjectValue(ctx context.Con func (o AibiDashboardEmbeddingAccessPolicySetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aibi_dashboard_embedding_access_policy": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingAccessPolicy{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "aibi_dashboard_embedding_access_policy": AibiDashboardEmbeddingAccessPolicy{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -134,7 +132,10 @@ func (o *AibiDashboardEmbeddingAccessPolicySetting) GetAibiDashboardEmbeddingAcc return e, false } var v []AibiDashboardEmbeddingAccessPolicy - d := o.AibiDashboardEmbeddingAccessPolicy.ElementsAs(ctx, &v, true) + d := o.AibiDashboardEmbeddingAccessPolicy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -146,9 +147,8 @@ func (o *AibiDashboardEmbeddingAccessPolicySetting) GetAibiDashboardEmbeddingAcc // SetAibiDashboardEmbeddingAccessPolicy sets the value of the AibiDashboardEmbeddingAccessPolicy field in AibiDashboardEmbeddingAccessPolicySetting. func (o *AibiDashboardEmbeddingAccessPolicySetting) SetAibiDashboardEmbeddingAccessPolicy(ctx context.Context, v AibiDashboardEmbeddingAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aibi_dashboard_embedding_access_policy"] - o.AibiDashboardEmbeddingAccessPolicy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AibiDashboardEmbeddingAccessPolicy = vs } type AibiDashboardEmbeddingApprovedDomains struct { @@ -223,7 +223,7 @@ func (o *AibiDashboardEmbeddingApprovedDomains) SetApprovedDomains(ctx context.C } type AibiDashboardEmbeddingApprovedDomainsSetting struct { - AibiDashboardEmbeddingApprovedDomains types.List `tfsdk:"aibi_dashboard_embedding_approved_domains" tf:"object"` + AibiDashboardEmbeddingApprovedDomains types.Object `tfsdk:"aibi_dashboard_embedding_approved_domains" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -276,9 +276,7 @@ func (o AibiDashboardEmbeddingApprovedDomainsSetting) ToObjectValue(ctx context. func (o AibiDashboardEmbeddingApprovedDomainsSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aibi_dashboard_embedding_approved_domains": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingApprovedDomains{}.Type(ctx), - }, + "aibi_dashboard_embedding_approved_domains": AibiDashboardEmbeddingApprovedDomains{}.Type(ctx), "etag": types.StringType, "setting_name": types.StringType, }, @@ -294,7 +292,10 @@ func (o *AibiDashboardEmbeddingApprovedDomainsSetting) GetAibiDashboardEmbedding return e, false } var v []AibiDashboardEmbeddingApprovedDomains - d := o.AibiDashboardEmbeddingApprovedDomains.ElementsAs(ctx, &v, true) + d := o.AibiDashboardEmbeddingApprovedDomains.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -306,13 +307,12 @@ func (o *AibiDashboardEmbeddingApprovedDomainsSetting) GetAibiDashboardEmbedding // SetAibiDashboardEmbeddingApprovedDomains sets the value of the AibiDashboardEmbeddingApprovedDomains field in AibiDashboardEmbeddingApprovedDomainsSetting. func (o *AibiDashboardEmbeddingApprovedDomainsSetting) SetAibiDashboardEmbeddingApprovedDomains(ctx context.Context, v AibiDashboardEmbeddingApprovedDomains) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aibi_dashboard_embedding_approved_domains"] - o.AibiDashboardEmbeddingApprovedDomains = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AibiDashboardEmbeddingApprovedDomains = vs } type AutomaticClusterUpdateSetting struct { - AutomaticClusterUpdateWorkspace types.List `tfsdk:"automatic_cluster_update_workspace" tf:"object"` + AutomaticClusterUpdateWorkspace types.Object `tfsdk:"automatic_cluster_update_workspace" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -365,11 +365,9 @@ func (o AutomaticClusterUpdateSetting) ToObjectValue(ctx context.Context) basety func (o AutomaticClusterUpdateSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "automatic_cluster_update_workspace": basetypes.ListType{ - ElemType: ClusterAutoRestartMessage{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "automatic_cluster_update_workspace": ClusterAutoRestartMessage{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -383,7 +381,10 @@ func (o *AutomaticClusterUpdateSetting) GetAutomaticClusterUpdateWorkspace(ctx c return e, false } var v []ClusterAutoRestartMessage - d := o.AutomaticClusterUpdateWorkspace.ElementsAs(ctx, &v, true) + d := o.AutomaticClusterUpdateWorkspace.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -395,9 +396,8 @@ func (o *AutomaticClusterUpdateSetting) GetAutomaticClusterUpdateWorkspace(ctx c // SetAutomaticClusterUpdateWorkspace sets the value of the AutomaticClusterUpdateWorkspace field in AutomaticClusterUpdateSetting. func (o *AutomaticClusterUpdateSetting) SetAutomaticClusterUpdateWorkspace(ctx context.Context, v ClusterAutoRestartMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["automatic_cluster_update_workspace"] - o.AutomaticClusterUpdateWorkspace = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AutomaticClusterUpdateWorkspace = vs } type BooleanMessage struct { @@ -451,9 +451,9 @@ type ClusterAutoRestartMessage struct { // intended to use only for purposes like showing an error message to the // customer with the additional details. For example, using these details we // can check why exactly the feature is disabled for this customer. - EnablementDetails types.List `tfsdk:"enablement_details" tf:"optional,object"` + EnablementDetails types.Object `tfsdk:"enablement_details" tf:"optional,object"` - MaintenanceWindow types.List `tfsdk:"maintenance_window" tf:"optional,object"` + MaintenanceWindow types.Object `tfsdk:"maintenance_window" tf:"optional,object"` RestartEvenIfNoUpdatesAvailable types.Bool `tfsdk:"restart_even_if_no_updates_available" tf:"optional"` } @@ -497,14 +497,10 @@ func (o ClusterAutoRestartMessage) ToObjectValue(ctx context.Context) basetypes. func (o ClusterAutoRestartMessage) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "can_toggle": types.BoolType, - "enabled": types.BoolType, - "enablement_details": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageEnablementDetails{}.Type(ctx), - }, - "maintenance_window": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindow{}.Type(ctx), - }, + "can_toggle": types.BoolType, + "enabled": types.BoolType, + "enablement_details": ClusterAutoRestartMessageEnablementDetails{}.Type(ctx), + "maintenance_window": ClusterAutoRestartMessageMaintenanceWindow{}.Type(ctx), "restart_even_if_no_updates_available": types.BoolType, }, } @@ -519,7 +515,10 @@ func (o *ClusterAutoRestartMessage) GetEnablementDetails(ctx context.Context) (C return e, false } var v []ClusterAutoRestartMessageEnablementDetails - d := o.EnablementDetails.ElementsAs(ctx, &v, true) + d := o.EnablementDetails.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -531,9 +530,8 @@ func (o *ClusterAutoRestartMessage) GetEnablementDetails(ctx context.Context) (C // SetEnablementDetails sets the value of the EnablementDetails field in ClusterAutoRestartMessage. func (o *ClusterAutoRestartMessage) SetEnablementDetails(ctx context.Context, v ClusterAutoRestartMessageEnablementDetails) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enablement_details"] - o.EnablementDetails = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EnablementDetails = vs } // GetMaintenanceWindow returns the value of the MaintenanceWindow field in ClusterAutoRestartMessage as @@ -545,7 +543,10 @@ func (o *ClusterAutoRestartMessage) GetMaintenanceWindow(ctx context.Context) (C return e, false } var v []ClusterAutoRestartMessageMaintenanceWindow - d := o.MaintenanceWindow.ElementsAs(ctx, &v, true) + d := o.MaintenanceWindow.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -557,9 +558,8 @@ func (o *ClusterAutoRestartMessage) GetMaintenanceWindow(ctx context.Context) (C // SetMaintenanceWindow sets the value of the MaintenanceWindow field in ClusterAutoRestartMessage. func (o *ClusterAutoRestartMessage) SetMaintenanceWindow(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindow) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["maintenance_window"] - o.MaintenanceWindow = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MaintenanceWindow = vs } // Contains an information about the enablement status judging (e.g. whether the @@ -620,7 +620,7 @@ func (o ClusterAutoRestartMessageEnablementDetails) Type(ctx context.Context) at } type ClusterAutoRestartMessageMaintenanceWindow struct { - WeekDayBasedSchedule types.List `tfsdk:"week_day_based_schedule" tf:"optional,object"` + WeekDayBasedSchedule types.Object `tfsdk:"week_day_based_schedule" tf:"optional,object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindow) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindow) { @@ -657,9 +657,7 @@ func (o ClusterAutoRestartMessageMaintenanceWindow) ToObjectValue(ctx context.Co func (o ClusterAutoRestartMessageMaintenanceWindow) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "week_day_based_schedule": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{}.Type(ctx), - }, + "week_day_based_schedule": ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{}.Type(ctx), }, } } @@ -673,7 +671,10 @@ func (o *ClusterAutoRestartMessageMaintenanceWindow) GetWeekDayBasedSchedule(ctx return e, false } var v []ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule - d := o.WeekDayBasedSchedule.ElementsAs(ctx, &v, true) + d := o.WeekDayBasedSchedule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -685,9 +686,8 @@ func (o *ClusterAutoRestartMessageMaintenanceWindow) GetWeekDayBasedSchedule(ctx // SetWeekDayBasedSchedule sets the value of the WeekDayBasedSchedule field in ClusterAutoRestartMessageMaintenanceWindow. func (o *ClusterAutoRestartMessageMaintenanceWindow) SetWeekDayBasedSchedule(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["week_day_based_schedule"] - o.WeekDayBasedSchedule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WeekDayBasedSchedule = vs } type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule struct { @@ -695,7 +695,7 @@ type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule struct { Frequency types.String `tfsdk:"frequency" tf:"optional"` - WindowStartTime types.List `tfsdk:"window_start_time" tf:"optional,object"` + WindowStartTime types.Object `tfsdk:"window_start_time" tf:"optional,object"` } func (newState *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) { @@ -734,11 +734,9 @@ func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) ToObject func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "day_of_week": types.StringType, - "frequency": types.StringType, - "window_start_time": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{}.Type(ctx), - }, + "day_of_week": types.StringType, + "frequency": types.StringType, + "window_start_time": ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{}.Type(ctx), }, } } @@ -752,7 +750,10 @@ func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) GetWind return e, false } var v []ClusterAutoRestartMessageMaintenanceWindowWindowStartTime - d := o.WindowStartTime.ElementsAs(ctx, &v, true) + d := o.WindowStartTime.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -764,9 +765,8 @@ func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) GetWind // SetWindowStartTime sets the value of the WindowStartTime field in ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule. func (o *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) SetWindowStartTime(ctx context.Context, v ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["window_start_time"] - o.WindowStartTime = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.WindowStartTime = vs } type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime struct { @@ -893,7 +893,7 @@ func (o *ComplianceSecurityProfile) SetComplianceStandards(ctx context.Context, type ComplianceSecurityProfileSetting struct { // SHIELD feature: CSP - ComplianceSecurityProfileWorkspace types.List `tfsdk:"compliance_security_profile_workspace" tf:"object"` + ComplianceSecurityProfileWorkspace types.Object `tfsdk:"compliance_security_profile_workspace" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -946,11 +946,9 @@ func (o ComplianceSecurityProfileSetting) ToObjectValue(ctx context.Context) bas func (o ComplianceSecurityProfileSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "compliance_security_profile_workspace": basetypes.ListType{ - ElemType: ComplianceSecurityProfile{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "compliance_security_profile_workspace": ComplianceSecurityProfile{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -964,7 +962,10 @@ func (o *ComplianceSecurityProfileSetting) GetComplianceSecurityProfileWorkspace return e, false } var v []ComplianceSecurityProfile - d := o.ComplianceSecurityProfileWorkspace.ElementsAs(ctx, &v, true) + d := o.ComplianceSecurityProfileWorkspace.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -976,21 +977,20 @@ func (o *ComplianceSecurityProfileSetting) GetComplianceSecurityProfileWorkspace // SetComplianceSecurityProfileWorkspace sets the value of the ComplianceSecurityProfileWorkspace field in ComplianceSecurityProfileSetting. func (o *ComplianceSecurityProfileSetting) SetComplianceSecurityProfileWorkspace(ctx context.Context, v ComplianceSecurityProfile) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["compliance_security_profile_workspace"] - o.ComplianceSecurityProfileWorkspace = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ComplianceSecurityProfileWorkspace = vs } type Config struct { - Email types.List `tfsdk:"email" tf:"optional,object"` + Email types.Object `tfsdk:"email" tf:"optional,object"` - GenericWebhook types.List `tfsdk:"generic_webhook" tf:"optional,object"` + GenericWebhook types.Object `tfsdk:"generic_webhook" tf:"optional,object"` - MicrosoftTeams types.List `tfsdk:"microsoft_teams" tf:"optional,object"` + MicrosoftTeams types.Object `tfsdk:"microsoft_teams" tf:"optional,object"` - Pagerduty types.List `tfsdk:"pagerduty" tf:"optional,object"` + Pagerduty types.Object `tfsdk:"pagerduty" tf:"optional,object"` - Slack types.List `tfsdk:"slack" tf:"optional,object"` + Slack types.Object `tfsdk:"slack" tf:"optional,object"` } func (newState *Config) SyncEffectiveFieldsDuringCreateOrUpdate(plan Config) { @@ -1035,21 +1035,11 @@ func (o Config) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Config) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "email": basetypes.ListType{ - ElemType: EmailConfig{}.Type(ctx), - }, - "generic_webhook": basetypes.ListType{ - ElemType: GenericWebhookConfig{}.Type(ctx), - }, - "microsoft_teams": basetypes.ListType{ - ElemType: MicrosoftTeamsConfig{}.Type(ctx), - }, - "pagerduty": basetypes.ListType{ - ElemType: PagerdutyConfig{}.Type(ctx), - }, - "slack": basetypes.ListType{ - ElemType: SlackConfig{}.Type(ctx), - }, + "email": EmailConfig{}.Type(ctx), + "generic_webhook": GenericWebhookConfig{}.Type(ctx), + "microsoft_teams": MicrosoftTeamsConfig{}.Type(ctx), + "pagerduty": PagerdutyConfig{}.Type(ctx), + "slack": SlackConfig{}.Type(ctx), }, } } @@ -1063,7 +1053,10 @@ func (o *Config) GetEmail(ctx context.Context) (EmailConfig, bool) { return e, false } var v []EmailConfig - d := o.Email.ElementsAs(ctx, &v, true) + d := o.Email.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1075,9 +1068,8 @@ func (o *Config) GetEmail(ctx context.Context) (EmailConfig, bool) { // SetEmail sets the value of the Email field in Config. func (o *Config) SetEmail(ctx context.Context, v EmailConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["email"] - o.Email = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Email = vs } // GetGenericWebhook returns the value of the GenericWebhook field in Config as @@ -1089,7 +1081,10 @@ func (o *Config) GetGenericWebhook(ctx context.Context) (GenericWebhookConfig, b return e, false } var v []GenericWebhookConfig - d := o.GenericWebhook.ElementsAs(ctx, &v, true) + d := o.GenericWebhook.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1101,9 +1096,8 @@ func (o *Config) GetGenericWebhook(ctx context.Context) (GenericWebhookConfig, b // SetGenericWebhook sets the value of the GenericWebhook field in Config. func (o *Config) SetGenericWebhook(ctx context.Context, v GenericWebhookConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["generic_webhook"] - o.GenericWebhook = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GenericWebhook = vs } // GetMicrosoftTeams returns the value of the MicrosoftTeams field in Config as @@ -1115,7 +1109,10 @@ func (o *Config) GetMicrosoftTeams(ctx context.Context) (MicrosoftTeamsConfig, b return e, false } var v []MicrosoftTeamsConfig - d := o.MicrosoftTeams.ElementsAs(ctx, &v, true) + d := o.MicrosoftTeams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1127,9 +1124,8 @@ func (o *Config) GetMicrosoftTeams(ctx context.Context) (MicrosoftTeamsConfig, b // SetMicrosoftTeams sets the value of the MicrosoftTeams field in Config. func (o *Config) SetMicrosoftTeams(ctx context.Context, v MicrosoftTeamsConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["microsoft_teams"] - o.MicrosoftTeams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MicrosoftTeams = vs } // GetPagerduty returns the value of the Pagerduty field in Config as @@ -1141,7 +1137,10 @@ func (o *Config) GetPagerduty(ctx context.Context) (PagerdutyConfig, bool) { return e, false } var v []PagerdutyConfig - d := o.Pagerduty.ElementsAs(ctx, &v, true) + d := o.Pagerduty.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1153,9 +1152,8 @@ func (o *Config) GetPagerduty(ctx context.Context) (PagerdutyConfig, bool) { // SetPagerduty sets the value of the Pagerduty field in Config. func (o *Config) SetPagerduty(ctx context.Context, v PagerdutyConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["pagerduty"] - o.Pagerduty = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Pagerduty = vs } // GetSlack returns the value of the Slack field in Config as @@ -1167,7 +1165,10 @@ func (o *Config) GetSlack(ctx context.Context) (SlackConfig, bool) { return e, false } var v []SlackConfig - d := o.Slack.ElementsAs(ctx, &v, true) + d := o.Slack.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1179,9 +1180,8 @@ func (o *Config) GetSlack(ctx context.Context) (SlackConfig, bool) { // SetSlack sets the value of the Slack field in Config. func (o *Config) SetSlack(ctx context.Context, v SlackConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["slack"] - o.Slack = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Slack = vs } // Details required to configure a block list or allow list. @@ -1272,7 +1272,7 @@ func (o *CreateIpAccessList) SetIpAddresses(ctx context.Context, v []types.Strin // An IP access list was successfully created. type CreateIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` } func (newState *CreateIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateIpAccessListResponse) { @@ -1309,9 +1309,7 @@ func (o CreateIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes func (o CreateIpAccessListResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), - }, + "ip_access_list": IpAccessListInfo{}.Type(ctx), }, } } @@ -1325,7 +1323,10 @@ func (o *CreateIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAcc return e, false } var v []IpAccessListInfo - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1337,9 +1338,8 @@ func (o *CreateIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAcc // SetIpAccessList sets the value of the IpAccessList field in CreateIpAccessListResponse. func (o *CreateIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAccessListInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } type CreateNetworkConnectivityConfigRequest struct { @@ -1396,7 +1396,7 @@ func (o CreateNetworkConnectivityConfigRequest) Type(ctx context.Context) attr.T type CreateNotificationDestinationRequest struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // The display name for the notification destination. DisplayName types.String `tfsdk:"display_name" tf:"optional"` } @@ -1436,9 +1436,7 @@ func (o CreateNotificationDestinationRequest) ToObjectValue(ctx context.Context) func (o CreateNotificationDestinationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), - }, + "config": Config{}.Type(ctx), "display_name": types.StringType, }, } @@ -1453,7 +1451,10 @@ func (o *CreateNotificationDestinationRequest) GetConfig(ctx context.Context) (C return e, false } var v []Config - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1465,9 +1466,8 @@ func (o *CreateNotificationDestinationRequest) GetConfig(ctx context.Context) (C // SetConfig sets the value of the Config field in CreateNotificationDestinationRequest. func (o *CreateNotificationDestinationRequest) SetConfig(ctx context.Context, v Config) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // Configuration details for creating on-behalf tokens. @@ -1523,7 +1523,7 @@ func (o CreateOboTokenRequest) Type(ctx context.Context) attr.Type { // An on-behalf token was successfully created for the service principal. type CreateOboTokenResponse struct { - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` // Value of the token. TokenValue types.String `tfsdk:"token_value" tf:"optional"` } @@ -1563,9 +1563,7 @@ func (o CreateOboTokenResponse) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateOboTokenResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "token_info": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), - }, + "token_info": TokenInfo{}.Type(ctx), "token_value": types.StringType, }, } @@ -1580,7 +1578,10 @@ func (o *CreateOboTokenResponse) GetTokenInfo(ctx context.Context) (TokenInfo, b return e, false } var v []TokenInfo - d := o.TokenInfo.ElementsAs(ctx, &v, true) + d := o.TokenInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1592,9 +1593,8 @@ func (o *CreateOboTokenResponse) GetTokenInfo(ctx context.Context) (TokenInfo, b // SetTokenInfo sets the value of the TokenInfo field in CreateOboTokenResponse. func (o *CreateOboTokenResponse) SetTokenInfo(ctx context.Context, v TokenInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] - o.TokenInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenInfo = vs } type CreatePrivateEndpointRuleRequest struct { @@ -1699,7 +1699,7 @@ func (o CreateTokenRequest) Type(ctx context.Context) attr.Type { type CreateTokenResponse struct { // The information for the new token. - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` // The value of the new token. TokenValue types.String `tfsdk:"token_value" tf:"optional"` } @@ -1739,9 +1739,7 @@ func (o CreateTokenResponse) ToObjectValue(ctx context.Context) basetypes.Object func (o CreateTokenResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "token_info": basetypes.ListType{ - ElemType: PublicTokenInfo{}.Type(ctx), - }, + "token_info": PublicTokenInfo{}.Type(ctx), "token_value": types.StringType, }, } @@ -1756,7 +1754,10 @@ func (o *CreateTokenResponse) GetTokenInfo(ctx context.Context) (PublicTokenInfo return e, false } var v []PublicTokenInfo - d := o.TokenInfo.ElementsAs(ctx, &v, true) + d := o.TokenInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1768,9 +1769,8 @@ func (o *CreateTokenResponse) GetTokenInfo(ctx context.Context) (PublicTokenInfo // SetTokenInfo sets the value of the TokenInfo field in CreateTokenResponse. func (o *CreateTokenResponse) SetTokenInfo(ctx context.Context, v PublicTokenInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] - o.TokenInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenInfo = vs } // Account level policy for CSP @@ -1853,7 +1853,7 @@ func (o *CspEnablementAccount) SetComplianceStandards(ctx context.Context, v []t type CspEnablementAccountSetting struct { // Account level policy for CSP - CspEnablementAccount types.List `tfsdk:"csp_enablement_account" tf:"object"` + CspEnablementAccount types.Object `tfsdk:"csp_enablement_account" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -1906,11 +1906,9 @@ func (o CspEnablementAccountSetting) ToObjectValue(ctx context.Context) basetype func (o CspEnablementAccountSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "csp_enablement_account": basetypes.ListType{ - ElemType: CspEnablementAccount{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "csp_enablement_account": CspEnablementAccount{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -1924,7 +1922,10 @@ func (o *CspEnablementAccountSetting) GetCspEnablementAccount(ctx context.Contex return e, false } var v []CspEnablementAccount - d := o.CspEnablementAccount.ElementsAs(ctx, &v, true) + d := o.CspEnablementAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1936,9 +1937,8 @@ func (o *CspEnablementAccountSetting) GetCspEnablementAccount(ctx context.Contex // SetCspEnablementAccount sets the value of the CspEnablementAccount field in CspEnablementAccountSetting. func (o *CspEnablementAccountSetting) SetCspEnablementAccount(ctx context.Context, v CspEnablementAccount) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["csp_enablement_account"] - o.CspEnablementAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CspEnablementAccount = vs } // This represents the setting configuration for the default namespace in the @@ -1960,7 +1960,7 @@ type DefaultNamespaceSetting struct { // PATCH request to identify the setting version you are updating. Etag types.String `tfsdk:"etag" tf:"optional"` - Namespace types.List `tfsdk:"namespace" tf:"object"` + Namespace types.Object `tfsdk:"namespace" tf:"object"` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. @@ -2005,10 +2005,8 @@ func (o DefaultNamespaceSetting) ToObjectValue(ctx context.Context) basetypes.Ob func (o DefaultNamespaceSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "etag": types.StringType, - "namespace": basetypes.ListType{ - ElemType: StringMessage{}.Type(ctx), - }, + "etag": types.StringType, + "namespace": StringMessage{}.Type(ctx), "setting_name": types.StringType, }, } @@ -2023,7 +2021,10 @@ func (o *DefaultNamespaceSetting) GetNamespace(ctx context.Context) (StringMessa return e, false } var v []StringMessage - d := o.Namespace.ElementsAs(ctx, &v, true) + d := o.Namespace.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2035,9 +2036,8 @@ func (o *DefaultNamespaceSetting) GetNamespace(ctx context.Context) (StringMessa // SetNamespace sets the value of the Namespace field in DefaultNamespaceSetting. func (o *DefaultNamespaceSetting) SetNamespace(ctx context.Context, v StringMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["namespace"] - o.Namespace = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Namespace = vs } // Delete access list @@ -3158,7 +3158,7 @@ func (o DeleteTokenManagementRequest) Type(ctx context.Context) attr.Type { } type DisableLegacyAccess struct { - DisableLegacyAccess types.List `tfsdk:"disable_legacy_access" tf:"object"` + DisableLegacyAccess types.Object `tfsdk:"disable_legacy_access" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -3211,11 +3211,9 @@ func (o DisableLegacyAccess) ToObjectValue(ctx context.Context) basetypes.Object func (o DisableLegacyAccess) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "disable_legacy_access": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "disable_legacy_access": BooleanMessage{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -3229,7 +3227,10 @@ func (o *DisableLegacyAccess) GetDisableLegacyAccess(ctx context.Context) (Boole return e, false } var v []BooleanMessage - d := o.DisableLegacyAccess.ElementsAs(ctx, &v, true) + d := o.DisableLegacyAccess.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3241,13 +3242,12 @@ func (o *DisableLegacyAccess) GetDisableLegacyAccess(ctx context.Context) (Boole // SetDisableLegacyAccess sets the value of the DisableLegacyAccess field in DisableLegacyAccess. func (o *DisableLegacyAccess) SetDisableLegacyAccess(ctx context.Context, v BooleanMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_access"] - o.DisableLegacyAccess = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DisableLegacyAccess = vs } type DisableLegacyDbfs struct { - DisableLegacyDbfs types.List `tfsdk:"disable_legacy_dbfs" tf:"object"` + DisableLegacyDbfs types.Object `tfsdk:"disable_legacy_dbfs" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -3300,11 +3300,9 @@ func (o DisableLegacyDbfs) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o DisableLegacyDbfs) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "disable_legacy_dbfs": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "disable_legacy_dbfs": BooleanMessage{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -3318,7 +3316,10 @@ func (o *DisableLegacyDbfs) GetDisableLegacyDbfs(ctx context.Context) (BooleanMe return e, false } var v []BooleanMessage - d := o.DisableLegacyDbfs.ElementsAs(ctx, &v, true) + d := o.DisableLegacyDbfs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3330,13 +3331,12 @@ func (o *DisableLegacyDbfs) GetDisableLegacyDbfs(ctx context.Context) (BooleanMe // SetDisableLegacyDbfs sets the value of the DisableLegacyDbfs field in DisableLegacyDbfs. func (o *DisableLegacyDbfs) SetDisableLegacyDbfs(ctx context.Context, v BooleanMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_dbfs"] - o.DisableLegacyDbfs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DisableLegacyDbfs = vs } type DisableLegacyFeatures struct { - DisableLegacyFeatures types.List `tfsdk:"disable_legacy_features" tf:"object"` + DisableLegacyFeatures types.Object `tfsdk:"disable_legacy_features" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -3389,11 +3389,9 @@ func (o DisableLegacyFeatures) ToObjectValue(ctx context.Context) basetypes.Obje func (o DisableLegacyFeatures) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "disable_legacy_features": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "disable_legacy_features": BooleanMessage{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -3407,7 +3405,10 @@ func (o *DisableLegacyFeatures) GetDisableLegacyFeatures(ctx context.Context) (B return e, false } var v []BooleanMessage - d := o.DisableLegacyFeatures.ElementsAs(ctx, &v, true) + d := o.DisableLegacyFeatures.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3419,9 +3420,8 @@ func (o *DisableLegacyFeatures) GetDisableLegacyFeatures(ctx context.Context) (B // SetDisableLegacyFeatures sets the value of the DisableLegacyFeatures field in DisableLegacyFeatures. func (o *DisableLegacyFeatures) SetDisableLegacyFeatures(ctx context.Context, v BooleanMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["disable_legacy_features"] - o.DisableLegacyFeatures = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DisableLegacyFeatures = vs } // The network policies applying for egress traffic. This message is used by the @@ -3430,7 +3430,7 @@ func (o *DisableLegacyFeatures) SetDisableLegacyFeatures(ctx context.Context, v // dataplane, see networkconfig.textproto). type EgressNetworkPolicy struct { // The access policy enforced for egress traffic to the internet. - InternetAccess types.List `tfsdk:"internet_access" tf:"optional,object"` + InternetAccess types.Object `tfsdk:"internet_access" tf:"optional,object"` } func (newState *EgressNetworkPolicy) SyncEffectiveFieldsDuringCreateOrUpdate(plan EgressNetworkPolicy) { @@ -3467,9 +3467,7 @@ func (o EgressNetworkPolicy) ToObjectValue(ctx context.Context) basetypes.Object func (o EgressNetworkPolicy) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "internet_access": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicy{}.Type(ctx), - }, + "internet_access": EgressNetworkPolicyInternetAccessPolicy{}.Type(ctx), }, } } @@ -3483,7 +3481,10 @@ func (o *EgressNetworkPolicy) GetInternetAccess(ctx context.Context) (EgressNetw return e, false } var v []EgressNetworkPolicyInternetAccessPolicy - d := o.InternetAccess.ElementsAs(ctx, &v, true) + d := o.InternetAccess.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3495,9 +3496,8 @@ func (o *EgressNetworkPolicy) GetInternetAccess(ctx context.Context) (EgressNetw // SetInternetAccess sets the value of the InternetAccess field in EgressNetworkPolicy. func (o *EgressNetworkPolicy) SetInternetAccess(ctx context.Context, v EgressNetworkPolicyInternetAccessPolicy) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["internet_access"] - o.InternetAccess = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.InternetAccess = vs } type EgressNetworkPolicyInternetAccessPolicy struct { @@ -3506,7 +3506,7 @@ type EgressNetworkPolicyInternetAccessPolicy struct { AllowedStorageDestinations types.List `tfsdk:"allowed_storage_destinations" tf:"optional"` // Optional. If not specified, assume the policy is enforced for all // workloads. - LogOnlyMode types.List `tfsdk:"log_only_mode" tf:"optional,object"` + LogOnlyMode types.Object `tfsdk:"log_only_mode" tf:"optional,object"` // At which level can Databricks and Databricks managed compute access // Internet. FULL_ACCESS: Databricks can access Internet. No blocking rules // will apply. RESTRICTED_ACCESS: Databricks can only access explicitly @@ -3561,9 +3561,7 @@ func (o EgressNetworkPolicyInternetAccessPolicy) Type(ctx context.Context) attr. "allowed_storage_destinations": basetypes.ListType{ ElemType: EgressNetworkPolicyInternetAccessPolicyStorageDestination{}.Type(ctx), }, - "log_only_mode": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicyLogOnlyMode{}.Type(ctx), - }, + "log_only_mode": EgressNetworkPolicyInternetAccessPolicyLogOnlyMode{}.Type(ctx), "restriction_mode": types.StringType, }, } @@ -3630,7 +3628,10 @@ func (o *EgressNetworkPolicyInternetAccessPolicy) GetLogOnlyMode(ctx context.Con return e, false } var v []EgressNetworkPolicyInternetAccessPolicyLogOnlyMode - d := o.LogOnlyMode.ElementsAs(ctx, &v, true) + d := o.LogOnlyMode.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3642,9 +3643,8 @@ func (o *EgressNetworkPolicyInternetAccessPolicy) GetLogOnlyMode(ctx context.Con // SetLogOnlyMode sets the value of the LogOnlyMode field in EgressNetworkPolicyInternetAccessPolicy. func (o *EgressNetworkPolicyInternetAccessPolicy) SetLogOnlyMode(ctx context.Context, v EgressNetworkPolicyInternetAccessPolicyLogOnlyMode) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["log_only_mode"] - o.LogOnlyMode = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LogOnlyMode = vs } // Users can specify accessible internet destinations when outbound access is @@ -4030,7 +4030,7 @@ func (o EnhancedSecurityMonitoring) Type(ctx context.Context) attr.Type { type EnhancedSecurityMonitoringSetting struct { // SHIELD feature: ESM - EnhancedSecurityMonitoringWorkspace types.List `tfsdk:"enhanced_security_monitoring_workspace" tf:"object"` + EnhancedSecurityMonitoringWorkspace types.Object `tfsdk:"enhanced_security_monitoring_workspace" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -4083,11 +4083,9 @@ func (o EnhancedSecurityMonitoringSetting) ToObjectValue(ctx context.Context) ba func (o EnhancedSecurityMonitoringSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "enhanced_security_monitoring_workspace": basetypes.ListType{ - ElemType: EnhancedSecurityMonitoring{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "enhanced_security_monitoring_workspace": EnhancedSecurityMonitoring{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -4101,7 +4099,10 @@ func (o *EnhancedSecurityMonitoringSetting) GetEnhancedSecurityMonitoringWorkspa return e, false } var v []EnhancedSecurityMonitoring - d := o.EnhancedSecurityMonitoringWorkspace.ElementsAs(ctx, &v, true) + d := o.EnhancedSecurityMonitoringWorkspace.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4113,9 +4114,8 @@ func (o *EnhancedSecurityMonitoringSetting) GetEnhancedSecurityMonitoringWorkspa // SetEnhancedSecurityMonitoringWorkspace sets the value of the EnhancedSecurityMonitoringWorkspace field in EnhancedSecurityMonitoringSetting. func (o *EnhancedSecurityMonitoringSetting) SetEnhancedSecurityMonitoringWorkspace(ctx context.Context, v EnhancedSecurityMonitoring) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enhanced_security_monitoring_workspace"] - o.EnhancedSecurityMonitoringWorkspace = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EnhancedSecurityMonitoringWorkspace = vs } // Account level policy for ESM @@ -4162,7 +4162,7 @@ func (o EsmEnablementAccount) Type(ctx context.Context) attr.Type { type EsmEnablementAccountSetting struct { // Account level policy for ESM - EsmEnablementAccount types.List `tfsdk:"esm_enablement_account" tf:"object"` + EsmEnablementAccount types.Object `tfsdk:"esm_enablement_account" tf:"object"` // 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 // help prevent simultaneous writes of a setting overwriting each other. It @@ -4215,11 +4215,9 @@ func (o EsmEnablementAccountSetting) ToObjectValue(ctx context.Context) basetype func (o EsmEnablementAccountSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "esm_enablement_account": basetypes.ListType{ - ElemType: EsmEnablementAccount{}.Type(ctx), - }, - "etag": types.StringType, - "setting_name": types.StringType, + "esm_enablement_account": EsmEnablementAccount{}.Type(ctx), + "etag": types.StringType, + "setting_name": types.StringType, }, } } @@ -4233,7 +4231,10 @@ func (o *EsmEnablementAccountSetting) GetEsmEnablementAccount(ctx context.Contex return e, false } var v []EsmEnablementAccount - d := o.EsmEnablementAccount.ElementsAs(ctx, &v, true) + d := o.EsmEnablementAccount.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4245,9 +4246,8 @@ func (o *EsmEnablementAccountSetting) GetEsmEnablementAccount(ctx context.Contex // SetEsmEnablementAccount sets the value of the EsmEnablementAccount field in EsmEnablementAccountSetting. func (o *EsmEnablementAccountSetting) SetEsmEnablementAccount(ctx context.Context, v EsmEnablementAccount) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["esm_enablement_account"] - o.EsmEnablementAccount = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EsmEnablementAccount = vs } // The exchange token is the result of the token exchange with the IdP @@ -4343,7 +4343,7 @@ func (o *ExchangeToken) SetScopes(ctx context.Context, v []types.String) { // Exchange a token with the IdP type ExchangeTokenRequest struct { // The partition of Credentials store - PartitionId types.List `tfsdk:"partitionId" tf:"object"` + PartitionId types.Object `tfsdk:"partitionId" tf:"object"` // Array of scopes for the token request. Scopes types.List `tfsdk:"scopes" tf:""` // A list of token types being requested @@ -4388,9 +4388,7 @@ func (o ExchangeTokenRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o ExchangeTokenRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "partitionId": basetypes.ListType{ - ElemType: PartitionId{}.Type(ctx), - }, + "partitionId": PartitionId{}.Type(ctx), "scopes": basetypes.ListType{ ElemType: types.StringType, }, @@ -4410,7 +4408,10 @@ func (o *ExchangeTokenRequest) GetPartitionId(ctx context.Context) (PartitionId, return e, false } var v []PartitionId - d := o.PartitionId.ElementsAs(ctx, &v, true) + d := o.PartitionId.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4422,9 +4423,8 @@ func (o *ExchangeTokenRequest) GetPartitionId(ctx context.Context) (PartitionId, // SetPartitionId sets the value of the PartitionId field in ExchangeTokenRequest. func (o *ExchangeTokenRequest) SetPartitionId(ctx context.Context, v PartitionId) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["partitionId"] - o.PartitionId = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PartitionId = vs } // GetScopes returns the value of the Scopes field in ExchangeTokenRequest as @@ -4554,7 +4554,7 @@ func (o *ExchangeTokenResponse) SetValues(ctx context.Context, v []ExchangeToken // An IP access list was successfully returned. type FetchIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` } func (newState *FetchIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan FetchIpAccessListResponse) { @@ -4591,9 +4591,7 @@ func (o FetchIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes. func (o FetchIpAccessListResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), - }, + "ip_access_list": IpAccessListInfo{}.Type(ctx), }, } } @@ -4607,7 +4605,10 @@ func (o *FetchIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAcce return e, false } var v []IpAccessListInfo - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4619,9 +4620,8 @@ func (o *FetchIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAcce // SetIpAccessList sets the value of the IpAccessList field in FetchIpAccessListResponse. func (o *FetchIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAccessListInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } type GenericWebhookConfig struct { @@ -5313,7 +5313,7 @@ func (o GetIpAccessListRequest) Type(ctx context.Context) attr.Type { type GetIpAccessListResponse struct { // Definition of an IP Access list - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` } func (newState *GetIpAccessListResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIpAccessListResponse) { @@ -5350,9 +5350,7 @@ func (o GetIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes.Ob func (o GetIpAccessListResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), - }, + "ip_access_list": IpAccessListInfo{}.Type(ctx), }, } } @@ -5366,7 +5364,10 @@ func (o *GetIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAccess return e, false } var v []IpAccessListInfo - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5378,9 +5379,8 @@ func (o *GetIpAccessListResponse) GetIpAccessList(ctx context.Context) (IpAccess // SetIpAccessList sets the value of the IpAccessList field in GetIpAccessListResponse. func (o *GetIpAccessListResponse) SetIpAccessList(ctx context.Context, v IpAccessListInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } // IP access lists were successfully returned. @@ -5844,7 +5844,7 @@ func (o *GetTokenPermissionLevelsResponse) SetPermissionLevels(ctx context.Conte // Token with specified Token ID was successfully returned. type GetTokenResponse struct { - TokenInfo types.List `tfsdk:"token_info" tf:"optional,object"` + TokenInfo types.Object `tfsdk:"token_info" tf:"optional,object"` } func (newState *GetTokenResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetTokenResponse) { @@ -5881,9 +5881,7 @@ func (o GetTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o GetTokenResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "token_info": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), - }, + "token_info": TokenInfo{}.Type(ctx), }, } } @@ -5897,7 +5895,10 @@ func (o *GetTokenResponse) GetTokenInfo(ctx context.Context) (TokenInfo, bool) { return e, false } var v []TokenInfo - d := o.TokenInfo.ElementsAs(ctx, &v, true) + d := o.TokenInfo.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5909,9 +5910,8 @@ func (o *GetTokenResponse) GetTokenInfo(ctx context.Context) (TokenInfo, bool) { // SetTokenInfo sets the value of the TokenInfo field in GetTokenResponse. func (o *GetTokenResponse) SetTokenInfo(ctx context.Context, v TokenInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["token_info"] - o.TokenInfo = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TokenInfo = vs } // Definition of an IP Access list @@ -7040,10 +7040,10 @@ type NccEgressConfig struct { // The network connectivity rules that are applied by default without // resource specific configurations. You can find the stable network // information of your serverless compute resources here. - DefaultRules types.List `tfsdk:"default_rules" tf:"computed,object"` + DefaultRules types.Object `tfsdk:"default_rules" tf:"computed,object"` // The network connectivity rules that configured for each destinations. // These rules override default rules. - TargetRules types.List `tfsdk:"target_rules" tf:"optional,object"` + TargetRules types.Object `tfsdk:"target_rules" tf:"optional,object"` } func (newState *NccEgressConfig) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressConfig) { @@ -7082,12 +7082,8 @@ func (o NccEgressConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o NccEgressConfig) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "default_rules": basetypes.ListType{ - ElemType: NccEgressDefaultRules{}.Type(ctx), - }, - "target_rules": basetypes.ListType{ - ElemType: NccEgressTargetRules{}.Type(ctx), - }, + "default_rules": NccEgressDefaultRules{}.Type(ctx), + "target_rules": NccEgressTargetRules{}.Type(ctx), }, } } @@ -7101,7 +7097,10 @@ func (o *NccEgressConfig) GetDefaultRules(ctx context.Context) (NccEgressDefault return e, false } var v []NccEgressDefaultRules - d := o.DefaultRules.ElementsAs(ctx, &v, true) + d := o.DefaultRules.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7113,9 +7112,8 @@ func (o *NccEgressConfig) GetDefaultRules(ctx context.Context) (NccEgressDefault // SetDefaultRules sets the value of the DefaultRules field in NccEgressConfig. func (o *NccEgressConfig) SetDefaultRules(ctx context.Context, v NccEgressDefaultRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["default_rules"] - o.DefaultRules = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DefaultRules = vs } // GetTargetRules returns the value of the TargetRules field in NccEgressConfig as @@ -7127,7 +7125,10 @@ func (o *NccEgressConfig) GetTargetRules(ctx context.Context) (NccEgressTargetRu return e, false } var v []NccEgressTargetRules - d := o.TargetRules.ElementsAs(ctx, &v, true) + d := o.TargetRules.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7139,9 +7140,8 @@ func (o *NccEgressConfig) GetTargetRules(ctx context.Context) (NccEgressTargetRu // SetTargetRules sets the value of the TargetRules field in NccEgressConfig. func (o *NccEgressConfig) SetTargetRules(ctx context.Context, v NccEgressTargetRules) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["target_rules"] - o.TargetRules = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TargetRules = vs } // The network connectivity rules that are applied by default without resource @@ -7151,11 +7151,11 @@ type NccEgressDefaultRules struct { // The stable AWS IP CIDR blocks. You can use these to configure the // firewall of your resources to allow traffic from your Databricks // workspace. - AwsStableIpRule types.List `tfsdk:"aws_stable_ip_rule" tf:"optional,object"` + AwsStableIpRule types.Object `tfsdk:"aws_stable_ip_rule" tf:"optional,object"` // The stable Azure service endpoints. You can configure the firewall of // your Azure resources to allow traffic from your Databricks serverless // compute resources. - AzureServiceEndpointRule types.List `tfsdk:"azure_service_endpoint_rule" tf:"optional,object"` + AzureServiceEndpointRule types.Object `tfsdk:"azure_service_endpoint_rule" tf:"optional,object"` } func (newState *NccEgressDefaultRules) SyncEffectiveFieldsDuringCreateOrUpdate(plan NccEgressDefaultRules) { @@ -7194,12 +7194,8 @@ func (o NccEgressDefaultRules) ToObjectValue(ctx context.Context) basetypes.Obje func (o NccEgressDefaultRules) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "aws_stable_ip_rule": basetypes.ListType{ - ElemType: NccAwsStableIpRule{}.Type(ctx), - }, - "azure_service_endpoint_rule": basetypes.ListType{ - ElemType: NccAzureServiceEndpointRule{}.Type(ctx), - }, + "aws_stable_ip_rule": NccAwsStableIpRule{}.Type(ctx), + "azure_service_endpoint_rule": NccAzureServiceEndpointRule{}.Type(ctx), }, } } @@ -7213,7 +7209,10 @@ func (o *NccEgressDefaultRules) GetAwsStableIpRule(ctx context.Context) (NccAwsS return e, false } var v []NccAwsStableIpRule - d := o.AwsStableIpRule.ElementsAs(ctx, &v, true) + d := o.AwsStableIpRule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7225,9 +7224,8 @@ func (o *NccEgressDefaultRules) GetAwsStableIpRule(ctx context.Context) (NccAwsS // SetAwsStableIpRule sets the value of the AwsStableIpRule field in NccEgressDefaultRules. func (o *NccEgressDefaultRules) SetAwsStableIpRule(ctx context.Context, v NccAwsStableIpRule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["aws_stable_ip_rule"] - o.AwsStableIpRule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AwsStableIpRule = vs } // GetAzureServiceEndpointRule returns the value of the AzureServiceEndpointRule field in NccEgressDefaultRules as @@ -7239,7 +7237,10 @@ func (o *NccEgressDefaultRules) GetAzureServiceEndpointRule(ctx context.Context) return e, false } var v []NccAzureServiceEndpointRule - d := o.AzureServiceEndpointRule.ElementsAs(ctx, &v, true) + d := o.AzureServiceEndpointRule.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7251,9 +7252,8 @@ func (o *NccEgressDefaultRules) GetAzureServiceEndpointRule(ctx context.Context) // SetAzureServiceEndpointRule sets the value of the AzureServiceEndpointRule field in NccEgressDefaultRules. func (o *NccEgressDefaultRules) SetAzureServiceEndpointRule(ctx context.Context, v NccAzureServiceEndpointRule) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["azure_service_endpoint_rule"] - o.AzureServiceEndpointRule = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.AzureServiceEndpointRule = vs } // The network connectivity rules that configured for each destinations. These @@ -7336,7 +7336,7 @@ type NetworkConnectivityConfiguration struct { CreationTime types.Int64 `tfsdk:"creation_time" tf:"computed"` // The network connectivity rules that apply to network traffic from your // serverless compute resources. - EgressConfig types.List `tfsdk:"egress_config" tf:"optional,object"` + EgressConfig types.Object `tfsdk:"egress_config" tf:"optional,object"` // The name of the network connectivity configuration. The name can contain // alphanumeric characters, hyphens, and underscores. The length must be // between 3 and 30 characters. The name must match the regular expression @@ -7392,11 +7392,9 @@ func (o NetworkConnectivityConfiguration) ToObjectValue(ctx context.Context) bas func (o NetworkConnectivityConfiguration) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "account_id": types.StringType, - "creation_time": types.Int64Type, - "egress_config": basetypes.ListType{ - ElemType: NccEgressConfig{}.Type(ctx), - }, + "account_id": types.StringType, + "creation_time": types.Int64Type, + "egress_config": NccEgressConfig{}.Type(ctx), "name": types.StringType, "network_connectivity_config_id": types.StringType, "region": types.StringType, @@ -7414,7 +7412,10 @@ func (o *NetworkConnectivityConfiguration) GetEgressConfig(ctx context.Context) return e, false } var v []NccEgressConfig - d := o.EgressConfig.ElementsAs(ctx, &v, true) + d := o.EgressConfig.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7426,16 +7427,15 @@ func (o *NetworkConnectivityConfiguration) GetEgressConfig(ctx context.Context) // SetEgressConfig sets the value of the EgressConfig field in NetworkConnectivityConfiguration. func (o *NetworkConnectivityConfiguration) SetEgressConfig(ctx context.Context, v NccEgressConfig) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["egress_config"] - o.EgressConfig = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EgressConfig = vs } type NotificationDestination struct { // The configuration for the notification destination. Will be exactly one // of the nested configs. Only returns for users with workspace admin // permissions. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // [Output-only] The type of the notification destination. The type can not // be changed once set. DestinationType types.String `tfsdk:"destination_type" tf:"optional"` @@ -7482,9 +7482,7 @@ func (o NotificationDestination) ToObjectValue(ctx context.Context) basetypes.Ob func (o NotificationDestination) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), - }, + "config": Config{}.Type(ctx), "destination_type": types.StringType, "display_name": types.StringType, "id": types.StringType, @@ -7501,7 +7499,10 @@ func (o *NotificationDestination) GetConfig(ctx context.Context) (Config, bool) return e, false } var v []Config - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7513,9 +7514,8 @@ func (o *NotificationDestination) GetConfig(ctx context.Context) (Config, bool) // SetConfig sets the value of the Config field in NotificationDestination. func (o *NotificationDestination) SetConfig(ctx context.Context, v Config) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } type PagerdutyConfig struct { @@ -7665,7 +7665,7 @@ type PersonalComputeSetting struct { // PATCH request to identify the setting version you are updating. Etag types.String `tfsdk:"etag" tf:"optional"` - PersonalCompute types.List `tfsdk:"personal_compute" tf:"object"` + PersonalCompute types.Object `tfsdk:"personal_compute" tf:"object"` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. @@ -7710,11 +7710,9 @@ func (o PersonalComputeSetting) ToObjectValue(ctx context.Context) basetypes.Obj func (o PersonalComputeSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "etag": types.StringType, - "personal_compute": basetypes.ListType{ - ElemType: PersonalComputeMessage{}.Type(ctx), - }, - "setting_name": types.StringType, + "etag": types.StringType, + "personal_compute": PersonalComputeMessage{}.Type(ctx), + "setting_name": types.StringType, }, } } @@ -7728,7 +7726,10 @@ func (o *PersonalComputeSetting) GetPersonalCompute(ctx context.Context) (Person return e, false } var v []PersonalComputeMessage - d := o.PersonalCompute.ElementsAs(ctx, &v, true) + d := o.PersonalCompute.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7740,9 +7741,8 @@ func (o *PersonalComputeSetting) GetPersonalCompute(ctx context.Context) (Person // SetPersonalCompute sets the value of the PersonalCompute field in PersonalComputeSetting. func (o *PersonalComputeSetting) SetPersonalCompute(ctx context.Context, v PersonalComputeMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["personal_compute"] - o.PersonalCompute = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PersonalCompute = vs } type PublicTokenInfo struct { @@ -7981,7 +7981,7 @@ type RestrictWorkspaceAdminsSetting struct { // PATCH request to identify the setting version you are updating. Etag types.String `tfsdk:"etag" tf:"optional"` - RestrictWorkspaceAdmins types.List `tfsdk:"restrict_workspace_admins" tf:"object"` + RestrictWorkspaceAdmins types.Object `tfsdk:"restrict_workspace_admins" tf:"object"` // Name of the corresponding setting. This field is populated in the // response, but it will not be respected even if it's set in the request // body. The setting name in the path parameter will be respected instead. @@ -8026,11 +8026,9 @@ func (o RestrictWorkspaceAdminsSetting) ToObjectValue(ctx context.Context) baset func (o RestrictWorkspaceAdminsSetting) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "etag": types.StringType, - "restrict_workspace_admins": basetypes.ListType{ - ElemType: RestrictWorkspaceAdminsMessage{}.Type(ctx), - }, - "setting_name": types.StringType, + "etag": types.StringType, + "restrict_workspace_admins": RestrictWorkspaceAdminsMessage{}.Type(ctx), + "setting_name": types.StringType, }, } } @@ -8044,7 +8042,10 @@ func (o *RestrictWorkspaceAdminsSetting) GetRestrictWorkspaceAdmins(ctx context. return e, false } var v []RestrictWorkspaceAdminsMessage - d := o.RestrictWorkspaceAdmins.ElementsAs(ctx, &v, true) + d := o.RestrictWorkspaceAdmins.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8056,9 +8057,8 @@ func (o *RestrictWorkspaceAdminsSetting) GetRestrictWorkspaceAdmins(ctx context. // SetRestrictWorkspaceAdmins sets the value of the RestrictWorkspaceAdmins field in RestrictWorkspaceAdminsSetting. func (o *RestrictWorkspaceAdminsSetting) SetRestrictWorkspaceAdmins(ctx context.Context, v RestrictWorkspaceAdminsMessage) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["restrict_workspace_admins"] - o.RestrictWorkspaceAdmins = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RestrictWorkspaceAdmins = vs } type RevokeTokenRequest struct { @@ -8766,7 +8766,7 @@ type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) { @@ -8807,9 +8807,7 @@ func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) Type(ctx context AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingAccessPolicySetting{}.Type(ctx), - }, + "setting": AibiDashboardEmbeddingAccessPolicySetting{}.Type(ctx), }, } } @@ -8823,7 +8821,10 @@ func (o *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) GetSetting(ctx return e, false } var v []AibiDashboardEmbeddingAccessPolicySetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8835,9 +8836,8 @@ func (o *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) GetSetting(ctx // SetSetting sets the value of the Setting field in UpdateAibiDashboardEmbeddingAccessPolicySettingRequest. func (o *UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) SetSetting(ctx context.Context, v AibiDashboardEmbeddingAccessPolicySetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -8851,7 +8851,7 @@ type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) { @@ -8892,9 +8892,7 @@ func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) Type(ctx cont AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingApprovedDomainsSetting{}.Type(ctx), - }, + "setting": AibiDashboardEmbeddingApprovedDomainsSetting{}.Type(ctx), }, } } @@ -8908,7 +8906,10 @@ func (o *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) GetSetting(c return e, false } var v []AibiDashboardEmbeddingApprovedDomainsSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8920,9 +8921,8 @@ func (o *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) GetSetting(c // SetSetting sets the value of the Setting field in UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest. func (o *UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) SetSetting(ctx context.Context, v AibiDashboardEmbeddingApprovedDomainsSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -8936,7 +8936,7 @@ type UpdateAutomaticClusterUpdateSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateAutomaticClusterUpdateSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAutomaticClusterUpdateSettingRequest) { @@ -8977,9 +8977,7 @@ func (o UpdateAutomaticClusterUpdateSettingRequest) Type(ctx context.Context) at AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: AutomaticClusterUpdateSetting{}.Type(ctx), - }, + "setting": AutomaticClusterUpdateSetting{}.Type(ctx), }, } } @@ -8993,7 +8991,10 @@ func (o *UpdateAutomaticClusterUpdateSettingRequest) GetSetting(ctx context.Cont return e, false } var v []AutomaticClusterUpdateSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9005,9 +9006,8 @@ func (o *UpdateAutomaticClusterUpdateSettingRequest) GetSetting(ctx context.Cont // SetSetting sets the value of the Setting field in UpdateAutomaticClusterUpdateSettingRequest. func (o *UpdateAutomaticClusterUpdateSettingRequest) SetSetting(ctx context.Context, v AutomaticClusterUpdateSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9021,7 +9021,7 @@ type UpdateComplianceSecurityProfileSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateComplianceSecurityProfileSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateComplianceSecurityProfileSettingRequest) { @@ -9062,9 +9062,7 @@ func (o UpdateComplianceSecurityProfileSettingRequest) Type(ctx context.Context) AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: ComplianceSecurityProfileSetting{}.Type(ctx), - }, + "setting": ComplianceSecurityProfileSetting{}.Type(ctx), }, } } @@ -9078,7 +9076,10 @@ func (o *UpdateComplianceSecurityProfileSettingRequest) GetSetting(ctx context.C return e, false } var v []ComplianceSecurityProfileSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9090,9 +9091,8 @@ func (o *UpdateComplianceSecurityProfileSettingRequest) GetSetting(ctx context.C // SetSetting sets the value of the Setting field in UpdateComplianceSecurityProfileSettingRequest. func (o *UpdateComplianceSecurityProfileSettingRequest) SetSetting(ctx context.Context, v ComplianceSecurityProfileSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9106,7 +9106,7 @@ type UpdateCspEnablementAccountSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateCspEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCspEnablementAccountSettingRequest) { @@ -9147,9 +9147,7 @@ func (o UpdateCspEnablementAccountSettingRequest) Type(ctx context.Context) attr AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: CspEnablementAccountSetting{}.Type(ctx), - }, + "setting": CspEnablementAccountSetting{}.Type(ctx), }, } } @@ -9163,7 +9161,10 @@ func (o *UpdateCspEnablementAccountSettingRequest) GetSetting(ctx context.Contex return e, false } var v []CspEnablementAccountSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9175,9 +9176,8 @@ func (o *UpdateCspEnablementAccountSettingRequest) GetSetting(ctx context.Contex // SetSetting sets the value of the Setting field in UpdateCspEnablementAccountSettingRequest. func (o *UpdateCspEnablementAccountSettingRequest) SetSetting(ctx context.Context, v CspEnablementAccountSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9199,7 +9199,7 @@ type UpdateDefaultNamespaceSettingRequest struct { // 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" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateDefaultNamespaceSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDefaultNamespaceSettingRequest) { @@ -9240,9 +9240,7 @@ func (o UpdateDefaultNamespaceSettingRequest) Type(ctx context.Context) attr.Typ AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: DefaultNamespaceSetting{}.Type(ctx), - }, + "setting": DefaultNamespaceSetting{}.Type(ctx), }, } } @@ -9256,7 +9254,10 @@ func (o *UpdateDefaultNamespaceSettingRequest) GetSetting(ctx context.Context) ( return e, false } var v []DefaultNamespaceSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9268,9 +9269,8 @@ func (o *UpdateDefaultNamespaceSettingRequest) GetSetting(ctx context.Context) ( // SetSetting sets the value of the Setting field in UpdateDefaultNamespaceSettingRequest. func (o *UpdateDefaultNamespaceSettingRequest) SetSetting(ctx context.Context, v DefaultNamespaceSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9284,7 +9284,7 @@ type UpdateDisableLegacyAccessRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateDisableLegacyAccessRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyAccessRequest) { @@ -9325,9 +9325,7 @@ func (o UpdateDisableLegacyAccessRequest) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: DisableLegacyAccess{}.Type(ctx), - }, + "setting": DisableLegacyAccess{}.Type(ctx), }, } } @@ -9341,7 +9339,10 @@ func (o *UpdateDisableLegacyAccessRequest) GetSetting(ctx context.Context) (Disa return e, false } var v []DisableLegacyAccess - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9353,9 +9354,8 @@ func (o *UpdateDisableLegacyAccessRequest) GetSetting(ctx context.Context) (Disa // SetSetting sets the value of the Setting field in UpdateDisableLegacyAccessRequest. func (o *UpdateDisableLegacyAccessRequest) SetSetting(ctx context.Context, v DisableLegacyAccess) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9369,7 +9369,7 @@ type UpdateDisableLegacyDbfsRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateDisableLegacyDbfsRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyDbfsRequest) { @@ -9410,9 +9410,7 @@ func (o UpdateDisableLegacyDbfsRequest) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: DisableLegacyDbfs{}.Type(ctx), - }, + "setting": DisableLegacyDbfs{}.Type(ctx), }, } } @@ -9426,7 +9424,10 @@ func (o *UpdateDisableLegacyDbfsRequest) GetSetting(ctx context.Context) (Disabl return e, false } var v []DisableLegacyDbfs - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9438,9 +9439,8 @@ func (o *UpdateDisableLegacyDbfsRequest) GetSetting(ctx context.Context) (Disabl // SetSetting sets the value of the Setting field in UpdateDisableLegacyDbfsRequest. func (o *UpdateDisableLegacyDbfsRequest) SetSetting(ctx context.Context, v DisableLegacyDbfs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9454,7 +9454,7 @@ type UpdateDisableLegacyFeaturesRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateDisableLegacyFeaturesRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateDisableLegacyFeaturesRequest) { @@ -9495,9 +9495,7 @@ func (o UpdateDisableLegacyFeaturesRequest) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: DisableLegacyFeatures{}.Type(ctx), - }, + "setting": DisableLegacyFeatures{}.Type(ctx), }, } } @@ -9511,7 +9509,10 @@ func (o *UpdateDisableLegacyFeaturesRequest) GetSetting(ctx context.Context) (Di return e, false } var v []DisableLegacyFeatures - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9523,9 +9524,8 @@ func (o *UpdateDisableLegacyFeaturesRequest) GetSetting(ctx context.Context) (Di // SetSetting sets the value of the Setting field in UpdateDisableLegacyFeaturesRequest. func (o *UpdateDisableLegacyFeaturesRequest) SetSetting(ctx context.Context, v DisableLegacyFeatures) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9539,7 +9539,7 @@ type UpdateEnhancedSecurityMonitoringSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateEnhancedSecurityMonitoringSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEnhancedSecurityMonitoringSettingRequest) { @@ -9580,9 +9580,7 @@ func (o UpdateEnhancedSecurityMonitoringSettingRequest) Type(ctx context.Context AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: EnhancedSecurityMonitoringSetting{}.Type(ctx), - }, + "setting": EnhancedSecurityMonitoringSetting{}.Type(ctx), }, } } @@ -9596,7 +9594,10 @@ func (o *UpdateEnhancedSecurityMonitoringSettingRequest) GetSetting(ctx context. return e, false } var v []EnhancedSecurityMonitoringSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9608,9 +9609,8 @@ func (o *UpdateEnhancedSecurityMonitoringSettingRequest) GetSetting(ctx context. // SetSetting sets the value of the Setting field in UpdateEnhancedSecurityMonitoringSettingRequest. func (o *UpdateEnhancedSecurityMonitoringSettingRequest) SetSetting(ctx context.Context, v EnhancedSecurityMonitoringSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update a setting. @@ -9624,7 +9624,7 @@ type UpdateEsmEnablementAccountSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateEsmEnablementAccountSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateEsmEnablementAccountSettingRequest) { @@ -9665,9 +9665,7 @@ func (o UpdateEsmEnablementAccountSettingRequest) Type(ctx context.Context) attr AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: EsmEnablementAccountSetting{}.Type(ctx), - }, + "setting": EsmEnablementAccountSetting{}.Type(ctx), }, } } @@ -9681,7 +9679,10 @@ func (o *UpdateEsmEnablementAccountSettingRequest) GetSetting(ctx context.Contex return e, false } var v []EsmEnablementAccountSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9693,9 +9694,8 @@ func (o *UpdateEsmEnablementAccountSettingRequest) GetSetting(ctx context.Contex // SetSetting sets the value of the Setting field in UpdateEsmEnablementAccountSettingRequest. func (o *UpdateEsmEnablementAccountSettingRequest) SetSetting(ctx context.Context, v EsmEnablementAccountSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } // Details required to update an IP access list. @@ -9795,7 +9795,7 @@ func (o *UpdateIpAccessList) SetIpAddresses(ctx context.Context, v []types.Strin type UpdateNotificationDestinationRequest struct { // The configuration for the notification destination. Must wrap EXACTLY one // of the nested configs. - Config types.List `tfsdk:"config" tf:"optional,object"` + Config types.Object `tfsdk:"config" tf:"optional,object"` // The display name for the notification destination. DisplayName types.String `tfsdk:"display_name" tf:"optional"` // UUID identifying notification destination. @@ -9838,9 +9838,7 @@ func (o UpdateNotificationDestinationRequest) ToObjectValue(ctx context.Context) func (o UpdateNotificationDestinationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), - }, + "config": Config{}.Type(ctx), "display_name": types.StringType, "id": types.StringType, }, @@ -9856,7 +9854,10 @@ func (o *UpdateNotificationDestinationRequest) GetConfig(ctx context.Context) (C return e, false } var v []Config - d := o.Config.ElementsAs(ctx, &v, true) + d := o.Config.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9868,9 +9869,8 @@ func (o *UpdateNotificationDestinationRequest) GetConfig(ctx context.Context) (C // SetConfig sets the value of the Config field in UpdateNotificationDestinationRequest. func (o *UpdateNotificationDestinationRequest) SetConfig(ctx context.Context, v Config) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config"] - o.Config = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Config = vs } // Details required to update a setting. @@ -9884,7 +9884,7 @@ type UpdatePersonalComputeSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdatePersonalComputeSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePersonalComputeSettingRequest) { @@ -9925,9 +9925,7 @@ func (o UpdatePersonalComputeSettingRequest) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: PersonalComputeSetting{}.Type(ctx), - }, + "setting": PersonalComputeSetting{}.Type(ctx), }, } } @@ -9941,7 +9939,10 @@ func (o *UpdatePersonalComputeSettingRequest) GetSetting(ctx context.Context) (P return e, false } var v []PersonalComputeSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9953,9 +9954,8 @@ func (o *UpdatePersonalComputeSettingRequest) GetSetting(ctx context.Context) (P // SetSetting sets the value of the Setting field in UpdatePersonalComputeSettingRequest. func (o *UpdatePersonalComputeSettingRequest) SetSetting(ctx context.Context, v PersonalComputeSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } type UpdateResponse struct { @@ -10005,7 +10005,7 @@ type UpdateRestrictWorkspaceAdminsSettingRequest struct { // the field mask, use comma as the separator (no space). FieldMask types.String `tfsdk:"field_mask" tf:""` - Setting types.List `tfsdk:"setting" tf:"object"` + Setting types.Object `tfsdk:"setting" tf:"object"` } func (newState *UpdateRestrictWorkspaceAdminsSettingRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRestrictWorkspaceAdminsSettingRequest) { @@ -10046,9 +10046,7 @@ func (o UpdateRestrictWorkspaceAdminsSettingRequest) Type(ctx context.Context) a AttrTypes: map[string]attr.Type{ "allow_missing": types.BoolType, "field_mask": types.StringType, - "setting": basetypes.ListType{ - ElemType: RestrictWorkspaceAdminsSetting{}.Type(ctx), - }, + "setting": RestrictWorkspaceAdminsSetting{}.Type(ctx), }, } } @@ -10062,7 +10060,10 @@ func (o *UpdateRestrictWorkspaceAdminsSettingRequest) GetSetting(ctx context.Con return e, false } var v []RestrictWorkspaceAdminsSetting - d := o.Setting.ElementsAs(ctx, &v, true) + d := o.Setting.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10074,7 +10075,6 @@ func (o *UpdateRestrictWorkspaceAdminsSettingRequest) GetSetting(ctx context.Con // SetSetting sets the value of the Setting field in UpdateRestrictWorkspaceAdminsSettingRequest. func (o *UpdateRestrictWorkspaceAdminsSettingRequest) SetSetting(ctx context.Context, v RestrictWorkspaceAdminsSetting) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["setting"] - o.Setting = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Setting = vs } diff --git a/internal/service/sharing_tf/legacy_model.go b/internal/service/sharing_tf/legacy_model.go new file mode 100755 index 000000000..42b91b4b0 --- /dev/null +++ b/internal/service/sharing_tf/legacy_model.go @@ -0,0 +1,3217 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package sharing_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/databricks/terraform-provider-databricks/internal/service/catalog_tf" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type CreateProvider_SdkV2 struct { + // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` + // Description about the provider. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the Provider. + Name types.String `tfsdk:"name" tf:""` + // This field is required when the __authentication_type__ is **TOKEN** or + // not provided. + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` +} + +func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateProvider_SdkV2) { +} + +func (newState *CreateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateProvider_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateProvider_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, CreateProvider_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateProvider_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authentication_type": o.AuthenticationType, + "comment": o.Comment, + "name": o.Name, + "recipient_profile_str": o.RecipientProfileStr, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateProvider_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authentication_type": types.StringType, + "comment": types.StringType, + "name": types.StringType, + "recipient_profile_str": types.StringType, + }, + } +} + +type CreateRecipient_SdkV2 struct { + // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type" tf:""` + // Description about the recipient. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The global Unity Catalog metastore id provided by the data recipient. + // This field is required when the __authentication_type__ is + // **DATABRICKS**. The identifier is of format + // __cloud__:__region__:__metastore-uuid__. + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + // Expiration timestamp of the token, in epoch milliseconds. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + // IP Access List + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + // Name of Recipient. + Name types.String `tfsdk:"name" tf:""` + // Username of the recipient owner. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Recipient properties as map of string key-value pairs. + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + // The one-time sharing code provided by the data recipient. This field is + // required when the __authentication_type__ is **DATABRICKS**. + SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` +} + +func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRecipient_SdkV2) { +} + +func (newState *CreateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRecipient_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRecipient_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessList_SdkV2{}), + "properties_kvpairs": reflect.TypeOf(SecurablePropertiesKvPairs_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, CreateRecipient_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRecipient_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authentication_type": o.AuthenticationType, + "comment": o.Comment, + "data_recipient_global_metastore_id": o.DataRecipientGlobalMetastoreId, + "expiration_time": o.ExpirationTime, + "ip_access_list": o.IpAccessList, + "name": o.Name, + "owner": o.Owner, + "properties_kvpairs": o.PropertiesKvpairs, + "sharing_code": o.SharingCode, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRecipient_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authentication_type": types.StringType, + "comment": types.StringType, + "data_recipient_global_metastore_id": types.StringType, + "expiration_time": types.Int64Type, + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessList{}.Type(ctx), + }, + "name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": basetypes.ListType{ + ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + }, + "sharing_code": types.StringType, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in CreateRecipient_SdkV2 as +// a IpAccessList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRecipient_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessList_SdkV2, bool) { + var e IpAccessList_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessList_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in CreateRecipient_SdkV2. +func (o *CreateRecipient_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +// GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in CreateRecipient_SdkV2 as +// a SecurablePropertiesKvPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRecipient_SdkV2) GetPropertiesKvpairs(ctx context.Context) (SecurablePropertiesKvPairs_SdkV2, bool) { + var e SecurablePropertiesKvPairs_SdkV2 + if o.PropertiesKvpairs.IsNull() || o.PropertiesKvpairs.IsUnknown() { + return e, false + } + var v []SecurablePropertiesKvPairs_SdkV2 + d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in CreateRecipient_SdkV2. +func (o *CreateRecipient_SdkV2) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] + o.PropertiesKvpairs = types.ListValueMust(t, vs) +} + +type CreateShare_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the share. + Name types.String `tfsdk:"name" tf:""` + // Storage root URL for the share. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` +} + +func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateShare_SdkV2) { +} + +func (newState *CreateShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateShare_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateShare_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, CreateShare_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateShare_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "storage_root": o.StorageRoot, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateShare_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "storage_root": types.StringType, + }, + } +} + +// Delete a provider +type DeleteProviderRequest_SdkV2 struct { + // Name of the provider. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteProviderRequest_SdkV2) { +} + +func (newState *DeleteProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteProviderRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteProviderRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteProviderRequest_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, DeleteProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderRequest_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 DeleteProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Delete a share recipient +type DeleteRecipientRequest_SdkV2 struct { + // Name of the recipient. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteRecipientRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRecipientRequest_SdkV2) { +} + +func (newState *DeleteRecipientRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRecipientRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRecipientRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRecipientRequest_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, DeleteRecipientRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRecipientRequest_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 DeleteRecipientRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Delete a share +type DeleteShareRequest_SdkV2 struct { + // The name of the share. + Name types.String `tfsdk:"-"` +} + +func (newState *DeleteShareRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteShareRequest_SdkV2) { +} + +func (newState *DeleteShareRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteShareRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteShareRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteShareRequest_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, DeleteShareRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteShareRequest_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 DeleteShareRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get a share activation URL +type GetActivationUrlInfoRequest_SdkV2 struct { + // The one time activation url. It also accepts activation token. + ActivationUrl types.String `tfsdk:"-"` +} + +func (newState *GetActivationUrlInfoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetActivationUrlInfoRequest_SdkV2) { +} + +func (newState *GetActivationUrlInfoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetActivationUrlInfoRequest_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, GetActivationUrlInfoRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetActivationUrlInfoRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetActivationUrlInfoRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activation_url": types.StringType, + }, + } +} + +type GetActivationUrlInfoResponse_SdkV2 struct { +} + +func (newState *GetActivationUrlInfoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetActivationUrlInfoResponse_SdkV2) { +} + +func (newState *GetActivationUrlInfoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetActivationUrlInfoResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetActivationUrlInfoResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetActivationUrlInfoResponse_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, GetActivationUrlInfoResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetActivationUrlInfoResponse_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 GetActivationUrlInfoResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Get a provider +type GetProviderRequest_SdkV2 struct { + // Name of the provider. + Name types.String `tfsdk:"-"` +} + +func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetProviderRequest_SdkV2) { +} + +func (newState *GetProviderRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetProviderRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetProviderRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetProviderRequest_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, GetProviderRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetProviderRequest_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 GetProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +// Get a share recipient +type GetRecipientRequest_SdkV2 struct { + // Name of the recipient. + Name types.String `tfsdk:"-"` +} + +func (newState *GetRecipientRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientRequest_SdkV2) { +} + +func (newState *GetRecipientRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRecipientRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRecipientRequest_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, GetRecipientRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRecipientRequest_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 GetRecipientRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type GetRecipientSharePermissionsResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of data share permissions for a recipient. + PermissionsOut types.List `tfsdk:"permissions_out" tf:"optional"` +} + +func (newState *GetRecipientSharePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRecipientSharePermissionsResponse_SdkV2) { +} + +func (newState *GetRecipientSharePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRecipientSharePermissionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRecipientSharePermissionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRecipientSharePermissionsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permissions_out": reflect.TypeOf(ShareToPrivilegeAssignment_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, GetRecipientSharePermissionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRecipientSharePermissionsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "permissions_out": o.PermissionsOut, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRecipientSharePermissionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "permissions_out": basetypes.ListType{ + ElemType: ShareToPrivilegeAssignment{}.Type(ctx), + }, + }, + } +} + +// GetPermissionsOut returns the value of the PermissionsOut field in GetRecipientSharePermissionsResponse_SdkV2 as +// a slice of ShareToPrivilegeAssignment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetRecipientSharePermissionsResponse_SdkV2) GetPermissionsOut(ctx context.Context) ([]ShareToPrivilegeAssignment_SdkV2, bool) { + if o.PermissionsOut.IsNull() || o.PermissionsOut.IsUnknown() { + return nil, false + } + var v []ShareToPrivilegeAssignment_SdkV2 + d := o.PermissionsOut.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionsOut sets the value of the PermissionsOut field in GetRecipientSharePermissionsResponse_SdkV2. +func (o *GetRecipientSharePermissionsResponse_SdkV2) SetPermissionsOut(ctx context.Context, v []ShareToPrivilegeAssignment_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["permissions_out"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionsOut = types.ListValueMust(t, vs) +} + +// Get a share +type GetShareRequest_SdkV2 struct { + // Query for data to include in the share. + IncludeSharedData types.Bool `tfsdk:"-"` + // The name of the share. + Name types.String `tfsdk:"-"` +} + +func (newState *GetShareRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetShareRequest_SdkV2) { +} + +func (newState *GetShareRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetShareRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetShareRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetShareRequest_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, GetShareRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetShareRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "include_shared_data": o.IncludeSharedData, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetShareRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "include_shared_data": types.BoolType, + "name": types.StringType, + }, + } +} + +type IpAccessList_SdkV2 struct { + // Allowed IP Addresses in CIDR notation. Limit of 100. + AllowedIpAddresses types.List `tfsdk:"allowed_ip_addresses" tf:"optional"` +} + +func (newState *IpAccessList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan IpAccessList_SdkV2) { +} + +func (newState *IpAccessList_SdkV2) SyncEffectiveFieldsDuringRead(existingState IpAccessList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in IpAccessList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a IpAccessList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "allowed_ip_addresses": 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, IpAccessList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o IpAccessList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "allowed_ip_addresses": o.AllowedIpAddresses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o IpAccessList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "allowed_ip_addresses": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetAllowedIpAddresses returns the value of the AllowedIpAddresses field in IpAccessList_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *IpAccessList_SdkV2) GetAllowedIpAddresses(ctx context.Context) ([]types.String, bool) { + if o.AllowedIpAddresses.IsNull() || o.AllowedIpAddresses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.AllowedIpAddresses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllowedIpAddresses sets the value of the AllowedIpAddresses field in IpAccessList_SdkV2. +func (o *IpAccessList_SdkV2) SetAllowedIpAddresses(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_ip_addresses"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllowedIpAddresses = types.ListValueMust(t, vs) +} + +type ListProviderSharesResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of provider shares. + Shares types.List `tfsdk:"shares" tf:"optional"` +} + +func (newState *ListProviderSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProviderSharesResponse_SdkV2) { +} + +func (newState *ListProviderSharesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProviderSharesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProviderSharesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProviderSharesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "shares": reflect.TypeOf(ProviderShare_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, ListProviderSharesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProviderSharesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shares": o.Shares, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProviderSharesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "shares": basetypes.ListType{ + ElemType: ProviderShare{}.Type(ctx), + }, + }, + } +} + +// GetShares returns the value of the Shares field in ListProviderSharesResponse_SdkV2 as +// a slice of ProviderShare_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListProviderSharesResponse_SdkV2) GetShares(ctx context.Context) ([]ProviderShare_SdkV2, bool) { + if o.Shares.IsNull() || o.Shares.IsUnknown() { + return nil, false + } + var v []ProviderShare_SdkV2 + d := o.Shares.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetShares sets the value of the Shares field in ListProviderSharesResponse_SdkV2. +func (o *ListProviderSharesResponse_SdkV2) SetShares(ctx context.Context, v []ProviderShare_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["shares"] + t = t.(attr.TypeWithElementType).ElementType() + o.Shares = types.ListValueMust(t, vs) +} + +// List providers +type ListProvidersRequest_SdkV2 struct { + // If not provided, all providers will be returned. If no providers exist + // with this ID, no results will be returned. + DataProviderGlobalMetastoreId types.String `tfsdk:"-"` + // Maximum number of providers to return. - when set to 0, the page length + // is set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid providers are returned (not + // recommended). - Note: The number of returned providers might be less than + // the specified max_results size, even zero. The only definitive indication + // that no further providers can be fetched is when the next_page_token is + // unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersRequest_SdkV2) { +} + +func (newState *ListProvidersRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProvidersRequest_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, ListProvidersRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProvidersRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_provider_global_metastore_id": o.DataProviderGlobalMetastoreId, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProvidersRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_provider_global_metastore_id": types.StringType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListProvidersResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of provider information objects. + Providers types.List `tfsdk:"providers" tf:"optional"` +} + +func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListProvidersResponse_SdkV2) { +} + +func (newState *ListProvidersResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListProvidersResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListProvidersResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListProvidersResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "providers": reflect.TypeOf(ProviderInfo_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, ListProvidersResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListProvidersResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "providers": o.Providers, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "providers": basetypes.ListType{ + ElemType: ProviderInfo{}.Type(ctx), + }, + }, + } +} + +// GetProviders returns the value of the Providers field in ListProvidersResponse_SdkV2 as +// a slice of ProviderInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListProvidersResponse_SdkV2) GetProviders(ctx context.Context) ([]ProviderInfo_SdkV2, bool) { + if o.Providers.IsNull() || o.Providers.IsUnknown() { + return nil, false + } + var v []ProviderInfo_SdkV2 + d := o.Providers.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetProviders sets the value of the Providers field in ListProvidersResponse_SdkV2. +func (o *ListProvidersResponse_SdkV2) SetProviders(ctx context.Context, v []ProviderInfo_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["providers"] + t = t.(attr.TypeWithElementType).ElementType() + o.Providers = types.ListValueMust(t, vs) +} + +// List share recipients +type ListRecipientsRequest_SdkV2 struct { + // If not provided, all recipients will be returned. If no recipients exist + // with this ID, no results will be returned. + DataRecipientGlobalMetastoreId types.String `tfsdk:"-"` + // Maximum number of recipients to return. - when set to 0, the page length + // is set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid recipients are returned (not + // recommended). - Note: The number of returned recipients might be less + // than the specified max_results size, even zero. The only definitive + // indication that no further recipients can be fetched is when the + // next_page_token is unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListRecipientsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsRequest_SdkV2) { +} + +func (newState *ListRecipientsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRecipientsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRecipientsRequest_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, ListRecipientsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRecipientsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_recipient_global_metastore_id": o.DataRecipientGlobalMetastoreId, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRecipientsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_recipient_global_metastore_id": types.StringType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListRecipientsResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of recipient information objects. + Recipients types.List `tfsdk:"recipients" tf:"optional"` +} + +func (newState *ListRecipientsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListRecipientsResponse_SdkV2) { +} + +func (newState *ListRecipientsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListRecipientsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListRecipientsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListRecipientsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "recipients": reflect.TypeOf(RecipientInfo_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, ListRecipientsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListRecipientsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "recipients": o.Recipients, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListRecipientsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "recipients": basetypes.ListType{ + ElemType: RecipientInfo{}.Type(ctx), + }, + }, + } +} + +// GetRecipients returns the value of the Recipients field in ListRecipientsResponse_SdkV2 as +// a slice of RecipientInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListRecipientsResponse_SdkV2) GetRecipients(ctx context.Context) ([]RecipientInfo_SdkV2, bool) { + if o.Recipients.IsNull() || o.Recipients.IsUnknown() { + return nil, false + } + var v []RecipientInfo_SdkV2 + d := o.Recipients.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRecipients sets the value of the Recipients field in ListRecipientsResponse_SdkV2. +func (o *ListRecipientsResponse_SdkV2) SetRecipients(ctx context.Context, v []RecipientInfo_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["recipients"] + t = t.(attr.TypeWithElementType).ElementType() + o.Recipients = types.ListValueMust(t, vs) +} + +// List shares by Provider +type ListSharesRequest_SdkV2 struct { + // Maximum number of shares to return. - when set to 0, the page length is + // set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid shares are returned (not + // recommended). - Note: The number of returned shares might be less than + // the specified max_results size, even zero. The only definitive indication + // that no further shares can be fetched is when the next_page_token is + // unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // Name of the provider in which to list shares. + Name types.String `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListSharesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesRequest_SdkV2) { +} + +func (newState *ListSharesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSharesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSharesRequest_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, ListSharesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSharesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSharesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "name": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ListSharesResponse_SdkV2 struct { + // Opaque token to retrieve the next page of results. Absent if there are no + // more pages. __page_token__ should be set to this value for the next + // request (for the next page of results). + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // An array of data share information objects. + Shares types.List `tfsdk:"shares" tf:"optional"` +} + +func (newState *ListSharesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSharesResponse_SdkV2) { +} + +func (newState *ListSharesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSharesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSharesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSharesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "shares": reflect.TypeOf(ShareInfo_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, ListSharesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSharesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shares": o.Shares, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSharesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "shares": basetypes.ListType{ + ElemType: ShareInfo{}.Type(ctx), + }, + }, + } +} + +// GetShares returns the value of the Shares field in ListSharesResponse_SdkV2 as +// a slice of ShareInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSharesResponse_SdkV2) GetShares(ctx context.Context) ([]ShareInfo_SdkV2, bool) { + if o.Shares.IsNull() || o.Shares.IsUnknown() { + return nil, false + } + var v []ShareInfo_SdkV2 + d := o.Shares.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetShares sets the value of the Shares field in ListSharesResponse_SdkV2. +func (o *ListSharesResponse_SdkV2) SetShares(ctx context.Context, v []ShareInfo_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["shares"] + t = t.(attr.TypeWithElementType).ElementType() + o.Shares = types.ListValueMust(t, vs) +} + +type Partition_SdkV2 struct { + // An array of partition values. + Values types.List `tfsdk:"value" tf:"optional"` +} + +func (newState *Partition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Partition_SdkV2) { +} + +func (newState *Partition_SdkV2) SyncEffectiveFieldsDuringRead(existingState Partition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Partition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Partition_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "value": reflect.TypeOf(PartitionValue_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, Partition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Partition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Partition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": basetypes.ListType{ + ElemType: PartitionValue{}.Type(ctx), + }, + }, + } +} + +// GetValues returns the value of the Values field in Partition_SdkV2 as +// a slice of PartitionValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Partition_SdkV2) GetValues(ctx context.Context) ([]PartitionValue_SdkV2, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []PartitionValue_SdkV2 + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in Partition_SdkV2. +func (o *Partition_SdkV2) SetValues(ctx context.Context, v []PartitionValue_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["value"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type PartitionSpecificationPartition_SdkV2 struct { + // An array of partition values. + Values types.List `tfsdk:"value" tf:"optional"` +} + +func (newState *PartitionSpecificationPartition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionSpecificationPartition_SdkV2) { +} + +func (newState *PartitionSpecificationPartition_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionSpecificationPartition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionSpecificationPartition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PartitionSpecificationPartition_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "value": reflect.TypeOf(PartitionValue_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, PartitionSpecificationPartition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PartitionSpecificationPartition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PartitionSpecificationPartition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": basetypes.ListType{ + ElemType: PartitionValue{}.Type(ctx), + }, + }, + } +} + +// GetValues returns the value of the Values field in PartitionSpecificationPartition_SdkV2 as +// a slice of PartitionValue_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *PartitionSpecificationPartition_SdkV2) GetValues(ctx context.Context) ([]PartitionValue_SdkV2, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []PartitionValue_SdkV2 + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in PartitionSpecificationPartition_SdkV2. +func (o *PartitionSpecificationPartition_SdkV2) SetValues(ctx context.Context, v []PartitionValue_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["value"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type PartitionValue_SdkV2 struct { + // The name of the partition column. + Name types.String `tfsdk:"name" tf:"optional"` + // The operator to apply for the value. + Op types.String `tfsdk:"op" tf:"optional"` + // The key of a Delta Sharing recipient's property. For example + // "databricks-account-id". When this field is set, field `value` can not be + // set. + RecipientPropertyKey types.String `tfsdk:"recipient_property_key" tf:"optional"` + // The value of the partition column. When this value is not set, it means + // `null` value. When this field is set, field `recipient_property_key` can + // not be set. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *PartitionValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PartitionValue_SdkV2) { +} + +func (newState *PartitionValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState PartitionValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PartitionValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PartitionValue_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, PartitionValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PartitionValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "op": o.Op, + "recipient_property_key": o.RecipientPropertyKey, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PartitionValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "op": types.StringType, + "recipient_property_key": types.StringType, + "value": types.StringType, + }, + } +} + +type PrivilegeAssignment_SdkV2 struct { + // The principal (user email address or group name). + Principal types.String `tfsdk:"principal" tf:"optional"` + // The privileges assigned to the principal. + Privileges types.List `tfsdk:"privileges" tf:"optional"` +} + +func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PrivilegeAssignment_SdkV2) { +} + +func (newState *PrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState PrivilegeAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PrivilegeAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PrivilegeAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privileges": 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, PrivilegeAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PrivilegeAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal": types.StringType, + "privileges": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPrivileges returns the value of the Privileges field in PrivilegeAssignment_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *PrivilegeAssignment_SdkV2) GetPrivileges(ctx context.Context) ([]types.String, bool) { + if o.Privileges.IsNull() || o.Privileges.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Privileges.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivileges sets the value of the Privileges field in PrivilegeAssignment_SdkV2. +func (o *PrivilegeAssignment_SdkV2) SetPrivileges(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["privileges"] + t = t.(attr.TypeWithElementType).ElementType() + o.Privileges = types.ListValueMust(t, vs) +} + +type ProviderInfo_SdkV2 struct { + // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + // Cloud vendor of the provider's UC metastore. This field is only present + // when the __authentication_type__ is **DATABRICKS**. + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // Description about the provider. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this Provider was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of Provider creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The global UC metastore id of the data provider. This field is only + // present when the __authentication_type__ is **DATABRICKS**. The + // identifier is of format ::. + DataProviderGlobalMetastoreId types.String `tfsdk:"data_provider_global_metastore_id" tf:"optional"` + // UUID of the provider's UC metastore. This field is only present when the + // __authentication_type__ is **DATABRICKS**. + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // The name of the Provider. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of Provider owner. + Owner types.String `tfsdk:"owner" tf:"optional"` + // The recipient profile. This field is only present when the + // authentication_type is `TOKEN`. + RecipientProfile types.List `tfsdk:"recipient_profile" tf:"optional,object"` + // This field is only present when the authentication_type is `TOKEN` or not + // provided. + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` + // Cloud region of the provider's UC metastore. This field is only present + // when the __authentication_type__ is **DATABRICKS**. + Region types.String `tfsdk:"region" tf:"optional"` + // Time at which this Provider was created, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of user who last modified Share. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderInfo_SdkV2) { +} + +func (newState *ProviderInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProviderInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "recipient_profile": reflect.TypeOf(RecipientProfile_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, ProviderInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProviderInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "authentication_type": o.AuthenticationType, + "cloud": o.Cloud, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "data_provider_global_metastore_id": o.DataProviderGlobalMetastoreId, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "recipient_profile": o.RecipientProfile, + "recipient_profile_str": o.RecipientProfileStr, + "region": o.Region, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ProviderInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "authentication_type": types.StringType, + "cloud": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_provider_global_metastore_id": types.StringType, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "recipient_profile": basetypes.ListType{ + ElemType: RecipientProfile{}.Type(ctx), + }, + "recipient_profile_str": types.StringType, + "region": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetRecipientProfile returns the value of the RecipientProfile field in ProviderInfo_SdkV2 as +// a RecipientProfile_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ProviderInfo_SdkV2) GetRecipientProfile(ctx context.Context) (RecipientProfile_SdkV2, bool) { + var e RecipientProfile_SdkV2 + if o.RecipientProfile.IsNull() || o.RecipientProfile.IsUnknown() { + return e, false + } + var v []RecipientProfile_SdkV2 + d := o.RecipientProfile.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetRecipientProfile sets the value of the RecipientProfile field in ProviderInfo_SdkV2. +func (o *ProviderInfo_SdkV2) SetRecipientProfile(ctx context.Context, v RecipientProfile_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["recipient_profile"] + o.RecipientProfile = types.ListValueMust(t, vs) +} + +type ProviderShare_SdkV2 struct { + // The name of the Provider Share. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *ProviderShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ProviderShare_SdkV2) { +} + +func (newState *ProviderShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState ProviderShare_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ProviderShare. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ProviderShare_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, ProviderShare_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ProviderShare_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 ProviderShare_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type RecipientInfo_SdkV2 struct { + // A boolean status field showing whether the Recipient's activation URL has + // been exercised or not. + Activated types.Bool `tfsdk:"activated" tf:"optional"` + // Full activation url to retrieve the access token. It will be empty if the + // token is already retrieved. + ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + // The delta sharing authentication type. + AuthenticationType types.String `tfsdk:"authentication_type" tf:"optional"` + // Cloud vendor of the recipient's Unity Catalog Metstore. This field is + // only present when the __authentication_type__ is **DATABRICKS**`. + Cloud types.String `tfsdk:"cloud" tf:"optional"` + // Description about the recipient. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this recipient was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of recipient creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // The global Unity Catalog metastore id provided by the data recipient. + // This field is only present when the __authentication_type__ is + // **DATABRICKS**. The identifier is of format + // __cloud__:__region__:__metastore-uuid__. + DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` + // IP Access List + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + // Unique identifier of recipient's Unity Catalog metastore. This field is + // only present when the __authentication_type__ is **DATABRICKS** + MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` + // Name of Recipient. + Name types.String `tfsdk:"name" tf:"optional"` + // Username of the recipient owner. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Recipient properties as map of string key-value pairs. + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + // Cloud region of the recipient's Unity Catalog Metstore. This field is + // only present when the __authentication_type__ is **DATABRICKS**. + Region types.String `tfsdk:"region" tf:"optional"` + // The one-time sharing code provided by the data recipient. This field is + // only present when the __authentication_type__ is **DATABRICKS**. + SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` + // This field is only present when the __authentication_type__ is **TOKEN**. + Tokens types.List `tfsdk:"tokens" tf:"optional"` + // Time at which the recipient was updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of recipient updater. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *RecipientInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientInfo_SdkV2) { +} + +func (newState *RecipientInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RecipientInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessList_SdkV2{}), + "properties_kvpairs": reflect.TypeOf(SecurablePropertiesKvPairs_SdkV2{}), + "tokens": reflect.TypeOf(RecipientTokenInfo_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, RecipientInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RecipientInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activated": o.Activated, + "activation_url": o.ActivationUrl, + "authentication_type": o.AuthenticationType, + "cloud": o.Cloud, + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "data_recipient_global_metastore_id": o.DataRecipientGlobalMetastoreId, + "ip_access_list": o.IpAccessList, + "metastore_id": o.MetastoreId, + "name": o.Name, + "owner": o.Owner, + "properties_kvpairs": o.PropertiesKvpairs, + "region": o.Region, + "sharing_code": o.SharingCode, + "tokens": o.Tokens, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RecipientInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activated": types.BoolType, + "activation_url": types.StringType, + "authentication_type": types.StringType, + "cloud": types.StringType, + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "data_recipient_global_metastore_id": types.StringType, + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessList{}.Type(ctx), + }, + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": basetypes.ListType{ + ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + }, + "region": types.StringType, + "sharing_code": types.StringType, + "tokens": basetypes.ListType{ + ElemType: RecipientTokenInfo{}.Type(ctx), + }, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in RecipientInfo_SdkV2 as +// a IpAccessList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RecipientInfo_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessList_SdkV2, bool) { + var e IpAccessList_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessList_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in RecipientInfo_SdkV2. +func (o *RecipientInfo_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +// GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in RecipientInfo_SdkV2 as +// a SecurablePropertiesKvPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RecipientInfo_SdkV2) GetPropertiesKvpairs(ctx context.Context) (SecurablePropertiesKvPairs_SdkV2, bool) { + var e SecurablePropertiesKvPairs_SdkV2 + if o.PropertiesKvpairs.IsNull() || o.PropertiesKvpairs.IsUnknown() { + return e, false + } + var v []SecurablePropertiesKvPairs_SdkV2 + d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in RecipientInfo_SdkV2. +func (o *RecipientInfo_SdkV2) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] + o.PropertiesKvpairs = types.ListValueMust(t, vs) +} + +// GetTokens returns the value of the Tokens field in RecipientInfo_SdkV2 as +// a slice of RecipientTokenInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RecipientInfo_SdkV2) GetTokens(ctx context.Context) ([]RecipientTokenInfo_SdkV2, bool) { + if o.Tokens.IsNull() || o.Tokens.IsUnknown() { + return nil, false + } + var v []RecipientTokenInfo_SdkV2 + d := o.Tokens.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTokens sets the value of the Tokens field in RecipientInfo_SdkV2. +func (o *RecipientInfo_SdkV2) SetTokens(ctx context.Context, v []RecipientTokenInfo_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["tokens"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tokens = types.ListValueMust(t, vs) +} + +type RecipientProfile_SdkV2 struct { + // The token used to authorize the recipient. + BearerToken types.String `tfsdk:"bearer_token" tf:"optional"` + // The endpoint for the share to be used by the recipient. + Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + // The version number of the recipient's credentials on a share. + ShareCredentialsVersion types.Int64 `tfsdk:"share_credentials_version" tf:"optional"` +} + +func (newState *RecipientProfile_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientProfile_SdkV2) { +} + +func (newState *RecipientProfile_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientProfile_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientProfile. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RecipientProfile_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, RecipientProfile_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RecipientProfile_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bearer_token": o.BearerToken, + "endpoint": o.Endpoint, + "share_credentials_version": o.ShareCredentialsVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RecipientProfile_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bearer_token": types.StringType, + "endpoint": types.StringType, + "share_credentials_version": types.Int64Type, + }, + } +} + +type RecipientTokenInfo_SdkV2 struct { + // Full activation URL to retrieve the access token. It will be empty if the + // token is already retrieved. + ActivationUrl types.String `tfsdk:"activation_url" tf:"optional"` + // Time at which this recipient Token was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // Username of recipient token creator. + CreatedBy types.String `tfsdk:"created_by" tf:"optional"` + // Expiration timestamp of the token in epoch milliseconds. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + // Unique ID of the recipient token. + Id types.String `tfsdk:"id" tf:"optional"` + // Time at which this recipient Token was updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"optional"` + // Username of recipient Token updater. + UpdatedBy types.String `tfsdk:"updated_by" tf:"optional"` +} + +func (newState *RecipientTokenInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RecipientTokenInfo_SdkV2) { +} + +func (newState *RecipientTokenInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RecipientTokenInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RecipientTokenInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RecipientTokenInfo_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, RecipientTokenInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RecipientTokenInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "expiration_time": o.ExpirationTime, + "id": o.Id, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RecipientTokenInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activation_url": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "expiration_time": types.Int64Type, + "id": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// Get an access token +type RetrieveTokenRequest_SdkV2 struct { + // The one time activation url. It also accepts activation token. + ActivationUrl types.String `tfsdk:"-"` +} + +func (newState *RetrieveTokenRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenRequest_SdkV2) { +} + +func (newState *RetrieveTokenRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RetrieveTokenRequest_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, RetrieveTokenRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RetrieveTokenRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RetrieveTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "activation_url": types.StringType, + }, + } +} + +type RetrieveTokenResponse_SdkV2 struct { + // The token used to authorize the recipient. + BearerToken types.String `tfsdk:"bearerToken" tf:"optional"` + // The endpoint for the share to be used by the recipient. + Endpoint types.String `tfsdk:"endpoint" tf:"optional"` + // Expiration timestamp of the token in epoch milliseconds. + ExpirationTime types.String `tfsdk:"expirationTime" tf:"optional"` + // These field names must follow the delta sharing protocol. + ShareCredentialsVersion types.Int64 `tfsdk:"shareCredentialsVersion" tf:"optional"` +} + +func (newState *RetrieveTokenResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RetrieveTokenResponse_SdkV2) { +} + +func (newState *RetrieveTokenResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RetrieveTokenResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RetrieveTokenResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RetrieveTokenResponse_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, RetrieveTokenResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RetrieveTokenResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bearerToken": o.BearerToken, + "endpoint": o.Endpoint, + "expirationTime": o.ExpirationTime, + "shareCredentialsVersion": o.ShareCredentialsVersion, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RetrieveTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bearerToken": types.StringType, + "endpoint": types.StringType, + "expirationTime": types.StringType, + "shareCredentialsVersion": types.Int64Type, + }, + } +} + +type RotateRecipientToken_SdkV2 struct { + // The expiration time of the bearer token in ISO 8601 format. This will set + // the expiration_time of existing token only to a smaller timestamp, it + // cannot extend the expiration_time. Use 0 to expire the existing token + // immediately, negative number will return an error. + ExistingTokenExpireInSeconds types.Int64 `tfsdk:"existing_token_expire_in_seconds" tf:""` + // The name of the recipient. + Name types.String `tfsdk:"-"` +} + +func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RotateRecipientToken_SdkV2) { +} + +func (newState *RotateRecipientToken_SdkV2) SyncEffectiveFieldsDuringRead(existingState RotateRecipientToken_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RotateRecipientToken_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, RotateRecipientToken_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RotateRecipientToken_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "existing_token_expire_in_seconds": o.ExistingTokenExpireInSeconds, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RotateRecipientToken_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "existing_token_expire_in_seconds": types.Int64Type, + "name": types.StringType, + }, + } +} + +// An object with __properties__ containing map of key-value properties attached +// to the securable. +type SecurablePropertiesKvPairs_SdkV2 struct { + // A map of key-value properties attached to the securable. + Properties types.Map `tfsdk:"properties" tf:""` +} + +func (newState *SecurablePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecurablePropertiesKvPairs_SdkV2) { +} + +func (newState *SecurablePropertiesKvPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecurablePropertiesKvPairs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecurablePropertiesKvPairs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SecurablePropertiesKvPairs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "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, SecurablePropertiesKvPairs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SecurablePropertiesKvPairs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "properties": o.Properties, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecurablePropertiesKvPairs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "properties": basetypes.MapType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetProperties returns the value of the Properties field in SecurablePropertiesKvPairs_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 *SecurablePropertiesKvPairs_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 SecurablePropertiesKvPairs_SdkV2. +func (o *SecurablePropertiesKvPairs_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) +} + +type ShareInfo_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Time at which this share was created, in epoch milliseconds. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"computed"` + // Username of share creator. + CreatedBy types.String `tfsdk:"created_by" tf:"computed"` + // Name of the share. + Name types.String `tfsdk:"name" tf:"optional"` + // A list of shared data objects within the share. + Objects types.List `tfsdk:"object" tf:"optional"` + // Username of current owner of share. + Owner types.String `tfsdk:"owner" tf:"computed"` + // Storage Location URL (full path) for the share. + StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` + // Storage root URL for the share. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // Time at which this share was updated, in epoch milliseconds. + UpdatedAt types.Int64 `tfsdk:"updated_at" tf:"computed"` + // Username of share updater. + UpdatedBy types.String `tfsdk:"updated_by" tf:"computed"` +} + +func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareInfo_SdkV2) { +} + +func (newState *ShareInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ShareInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "object": reflect.TypeOf(SharedDataObject_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, ShareInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ShareInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "name": o.Name, + "object": o.Objects, + "owner": o.Owner, + "storage_location": o.StorageLocation, + "storage_root": o.StorageRoot, + "updated_at": o.UpdatedAt, + "updated_by": o.UpdatedBy, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ShareInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "created_at": types.Int64Type, + "created_by": types.StringType, + "name": types.StringType, + "object": basetypes.ListType{ + ElemType: SharedDataObject{}.Type(ctx), + }, + "owner": types.StringType, + "storage_location": types.StringType, + "storage_root": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, + }, + } +} + +// GetObjects returns the value of the Objects field in ShareInfo_SdkV2 as +// a slice of SharedDataObject_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ShareInfo_SdkV2) GetObjects(ctx context.Context) ([]SharedDataObject_SdkV2, bool) { + if o.Objects.IsNull() || o.Objects.IsUnknown() { + return nil, false + } + var v []SharedDataObject_SdkV2 + d := o.Objects.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetObjects sets the value of the Objects field in ShareInfo_SdkV2. +func (o *ShareInfo_SdkV2) SetObjects(ctx context.Context, v []SharedDataObject_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["object"] + t = t.(attr.TypeWithElementType).ElementType() + o.Objects = types.ListValueMust(t, vs) +} + +// Get recipient share permissions +type SharePermissionsRequest_SdkV2 struct { + // Maximum number of permissions to return. - when set to 0, the page length + // is set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid permissions are returned (not + // recommended). - Note: The number of returned permissions might be less + // than the specified max_results size, even zero. The only definitive + // indication that no further permissions can be fetched is when the + // next_page_token is unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // The name of the Recipient. + Name types.String `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *SharePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharePermissionsRequest_SdkV2) { +} + +func (newState *SharePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharePermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SharePermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SharePermissionsRequest_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, SharePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SharePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SharePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "max_results": types.Int64Type, + "name": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ShareToPrivilegeAssignment_SdkV2 struct { + // The privileges assigned to the principal. + PrivilegeAssignments types.List `tfsdk:"privilege_assignments" tf:"optional"` + // The share name. + ShareName types.String `tfsdk:"share_name" tf:"optional"` +} + +func (newState *ShareToPrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ShareToPrivilegeAssignment_SdkV2) { +} + +func (newState *ShareToPrivilegeAssignment_SdkV2) SyncEffectiveFieldsDuringRead(existingState ShareToPrivilegeAssignment_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ShareToPrivilegeAssignment. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ShareToPrivilegeAssignment_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "privilege_assignments": reflect.TypeOf(PrivilegeAssignment_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, ShareToPrivilegeAssignment_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ShareToPrivilegeAssignment_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + "share_name": o.ShareName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ShareToPrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "privilege_assignments": basetypes.ListType{ + ElemType: PrivilegeAssignment{}.Type(ctx), + }, + "share_name": types.StringType, + }, + } +} + +// GetPrivilegeAssignments returns the value of the PrivilegeAssignments field in ShareToPrivilegeAssignment_SdkV2 as +// a slice of PrivilegeAssignment_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ShareToPrivilegeAssignment_SdkV2) GetPrivilegeAssignments(ctx context.Context) ([]PrivilegeAssignment_SdkV2, bool) { + if o.PrivilegeAssignments.IsNull() || o.PrivilegeAssignments.IsUnknown() { + return nil, false + } + var v []PrivilegeAssignment_SdkV2 + d := o.PrivilegeAssignments.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrivilegeAssignments sets the value of the PrivilegeAssignments field in ShareToPrivilegeAssignment_SdkV2. +func (o *ShareToPrivilegeAssignment_SdkV2) SetPrivilegeAssignments(ctx context.Context, v []PrivilegeAssignment_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["privilege_assignments"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrivilegeAssignments = types.ListValueMust(t, vs) +} + +type SharedDataObject_SdkV2 struct { + // The time when this data object is added to the share, in epoch + // milliseconds. + AddedAt types.Int64 `tfsdk:"added_at" tf:"computed"` + // Username of the sharer. + AddedBy types.String `tfsdk:"added_by" tf:"computed"` + // Whether to enable cdf or indicate if cdf is enabled on the shared object. + CdfEnabled types.Bool `tfsdk:"cdf_enabled" tf:"optional"` + EffectiveCdfEnabled types.Bool `tfsdk:"effective_cdf_enabled" tf:"computed"` + // A user-provided comment when adding the data object to the share. + // [Update:OPT] + Comment types.String `tfsdk:"comment" tf:"optional"` + // The content of the notebook file when the data object type is + // NOTEBOOK_FILE. This should be base64 encoded. Required for adding a + // NOTEBOOK_FILE, optional for updating, ignored for other types. + Content types.String `tfsdk:"content" tf:"optional"` + // The type of the data object. + DataObjectType types.String `tfsdk:"data_object_type" tf:"optional"` + // Whether to enable or disable sharing of data history. If not specified, + // the default is **DISABLED**. + HistoryDataSharingStatus types.String `tfsdk:"history_data_sharing_status" tf:"optional"` + EffectiveHistoryDataSharingStatus types.String `tfsdk:"effective_history_data_sharing_status" tf:"computed"` + // A fully qualified name that uniquely identifies a data object. + // + // For example, a table's fully qualified name is in the format of + // `..`. + Name types.String `tfsdk:"name" tf:""` + // Array of partitions for the shared data. + Partitions types.List `tfsdk:"partition" tf:"optional"` + // A user-provided new name for the data object within the share. If this + // new name is not provided, the object's original name will be used as the + // `shared_as` name. The `shared_as` name must be unique within a share. For + // tables, the new name must follow the format of `.
`. + SharedAs types.String `tfsdk:"shared_as" tf:"optional"` + EffectiveSharedAs types.String `tfsdk:"effective_shared_as" tf:"computed"` + // The start version associated with the object. This allows data providers + // to control the lowest object version that is accessible by clients. If + // specified, clients can query snapshots or changes for versions >= + // start_version. If not specified, clients can only query starting from the + // version of the object at the time it was added to the share. + // + // NOTE: The start_version should be <= the `current` version of the object. + StartVersion types.Int64 `tfsdk:"start_version" tf:"optional"` + EffectiveStartVersion types.Int64 `tfsdk:"effective_start_version" tf:"computed"` + // One of: **ACTIVE**, **PERMISSION_DENIED**. + Status types.String `tfsdk:"status" tf:"computed"` + // A user-provided new name for the data object within the share. If this + // new name is not provided, the object's original name will be used as the + // `string_shared_as` name. The `string_shared_as` name must be unique + // within a share. For notebooks, the new name should be the new notebook + // file name. + StringSharedAs types.String `tfsdk:"string_shared_as" tf:"optional"` +} + +func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObject_SdkV2) { + newState.EffectiveCdfEnabled = newState.CdfEnabled + newState.CdfEnabled = plan.CdfEnabled + newState.EffectiveHistoryDataSharingStatus = newState.HistoryDataSharingStatus + newState.HistoryDataSharingStatus = plan.HistoryDataSharingStatus + newState.EffectiveSharedAs = newState.SharedAs + newState.SharedAs = plan.SharedAs + newState.EffectiveStartVersion = newState.StartVersion + newState.StartVersion = plan.StartVersion +} + +func (newState *SharedDataObject_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharedDataObject_SdkV2) { + newState.EffectiveCdfEnabled = existingState.EffectiveCdfEnabled + if existingState.EffectiveCdfEnabled.ValueBool() == newState.CdfEnabled.ValueBool() { + newState.CdfEnabled = existingState.CdfEnabled + } + newState.EffectiveHistoryDataSharingStatus = existingState.EffectiveHistoryDataSharingStatus + if existingState.EffectiveHistoryDataSharingStatus.ValueString() == newState.HistoryDataSharingStatus.ValueString() { + newState.HistoryDataSharingStatus = existingState.HistoryDataSharingStatus + } + newState.EffectiveSharedAs = existingState.EffectiveSharedAs + if existingState.EffectiveSharedAs.ValueString() == newState.SharedAs.ValueString() { + newState.SharedAs = existingState.SharedAs + } + newState.EffectiveStartVersion = existingState.EffectiveStartVersion + if existingState.EffectiveStartVersion.ValueInt64() == newState.StartVersion.ValueInt64() { + newState.StartVersion = existingState.StartVersion + } +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObject. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SharedDataObject_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "partition": reflect.TypeOf(Partition_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, SharedDataObject_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SharedDataObject_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "added_at": o.AddedAt, + "added_by": o.AddedBy, + "cdf_enabled": o.CdfEnabled, + "effective_cdf_enabled": o.EffectiveCdfEnabled, + "comment": o.Comment, + "content": o.Content, + "data_object_type": o.DataObjectType, + "history_data_sharing_status": o.HistoryDataSharingStatus, + "effective_history_data_sharing_status": o.EffectiveHistoryDataSharingStatus, + "name": o.Name, + "partition": o.Partitions, + "shared_as": o.SharedAs, + "effective_shared_as": o.EffectiveSharedAs, + "start_version": o.StartVersion, + "effective_start_version": o.EffectiveStartVersion, + "status": o.Status, + "string_shared_as": o.StringSharedAs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SharedDataObject_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "added_at": types.Int64Type, + "added_by": types.StringType, + "cdf_enabled": types.BoolType, + "effective_cdf_enabled": types.BoolType, + "comment": types.StringType, + "content": types.StringType, + "data_object_type": types.StringType, + "history_data_sharing_status": types.StringType, + "effective_history_data_sharing_status": types.StringType, + "name": types.StringType, + "partition": basetypes.ListType{ + ElemType: Partition{}.Type(ctx), + }, + "shared_as": types.StringType, + "effective_shared_as": types.StringType, + "start_version": types.Int64Type, + "effective_start_version": types.Int64Type, + "status": types.StringType, + "string_shared_as": types.StringType, + }, + } +} + +// GetPartitions returns the value of the Partitions field in SharedDataObject_SdkV2 as +// a slice of Partition_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SharedDataObject_SdkV2) GetPartitions(ctx context.Context) ([]Partition_SdkV2, bool) { + if o.Partitions.IsNull() || o.Partitions.IsUnknown() { + return nil, false + } + var v []Partition_SdkV2 + d := o.Partitions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPartitions sets the value of the Partitions field in SharedDataObject_SdkV2. +func (o *SharedDataObject_SdkV2) SetPartitions(ctx context.Context, v []Partition_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["partition"] + t = t.(attr.TypeWithElementType).ElementType() + o.Partitions = types.ListValueMust(t, vs) +} + +type SharedDataObjectUpdate_SdkV2 struct { + // One of: **ADD**, **REMOVE**, **UPDATE**. + Action types.String `tfsdk:"action" tf:"optional"` + // The data object that is being added, removed, or updated. + DataObject types.List `tfsdk:"data_object" tf:"optional,object"` +} + +func (newState *SharedDataObjectUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObjectUpdate_SdkV2) { +} + +func (newState *SharedDataObjectUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState SharedDataObjectUpdate_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SharedDataObjectUpdate. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SharedDataObjectUpdate_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data_object": reflect.TypeOf(SharedDataObject_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, SharedDataObjectUpdate_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SharedDataObjectUpdate_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "action": o.Action, + "data_object": o.DataObject, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SharedDataObjectUpdate_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "action": types.StringType, + "data_object": basetypes.ListType{ + ElemType: SharedDataObject{}.Type(ctx), + }, + }, + } +} + +// GetDataObject returns the value of the DataObject field in SharedDataObjectUpdate_SdkV2 as +// a SharedDataObject_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SharedDataObjectUpdate_SdkV2) GetDataObject(ctx context.Context) (SharedDataObject_SdkV2, bool) { + var e SharedDataObject_SdkV2 + if o.DataObject.IsNull() || o.DataObject.IsUnknown() { + return e, false + } + var v []SharedDataObject_SdkV2 + d := o.DataObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDataObject sets the value of the DataObject field in SharedDataObjectUpdate_SdkV2. +func (o *SharedDataObjectUpdate_SdkV2) SetDataObject(ctx context.Context, v SharedDataObject_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_object"] + o.DataObject = types.ListValueMust(t, vs) +} + +type UpdatePermissionsResponse_SdkV2 struct { +} + +func (newState *UpdatePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdatePermissionsResponse_SdkV2) { +} + +func (newState *UpdatePermissionsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdatePermissionsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdatePermissionsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdatePermissionsResponse_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, UpdatePermissionsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdatePermissionsResponse_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 UpdatePermissionsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateProvider_SdkV2 struct { + // Description about the provider. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Name of the provider. + Name types.String `tfsdk:"-"` + // New name for the provider. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of Provider owner. + Owner types.String `tfsdk:"owner" tf:"optional"` + // This field is required when the __authentication_type__ is **TOKEN** or + // not provided. + RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` +} + +func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateProvider_SdkV2) { +} + +func (newState *UpdateProvider_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateProvider_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateProvider_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, UpdateProvider_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateProvider_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "recipient_profile_str": o.RecipientProfileStr, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateProvider_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "recipient_profile_str": types.StringType, + }, + } +} + +type UpdateRecipient_SdkV2 struct { + // Description about the recipient. + Comment types.String `tfsdk:"comment" tf:"optional"` + // Expiration timestamp of the token, in epoch milliseconds. + ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` + // IP Access List + IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + // Name of the recipient. + Name types.String `tfsdk:"-"` + // New name for the recipient. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of the recipient owner. + Owner types.String `tfsdk:"owner" tf:"optional"` + // Recipient properties as map of string key-value pairs. When provided in + // update request, the specified properties will override the existing + // properties. To add and remove properties, one would need to perform a + // read-modify-write. + PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` +} + +func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient_SdkV2) { +} + +func (newState *UpdateRecipient_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRecipient_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRecipient_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "ip_access_list": reflect.TypeOf(IpAccessList_SdkV2{}), + "properties_kvpairs": reflect.TypeOf(SecurablePropertiesKvPairs_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, UpdateRecipient_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRecipient_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "expiration_time": o.ExpirationTime, + "ip_access_list": o.IpAccessList, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "properties_kvpairs": o.PropertiesKvpairs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRecipient_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "expiration_time": types.Int64Type, + "ip_access_list": basetypes.ListType{ + ElemType: IpAccessList{}.Type(ctx), + }, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": basetypes.ListType{ + ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + }, + }, + } +} + +// GetIpAccessList returns the value of the IpAccessList field in UpdateRecipient_SdkV2 as +// a IpAccessList_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRecipient_SdkV2) GetIpAccessList(ctx context.Context) (IpAccessList_SdkV2, bool) { + var e IpAccessList_SdkV2 + if o.IpAccessList.IsNull() || o.IpAccessList.IsUnknown() { + return e, false + } + var v []IpAccessList_SdkV2 + d := o.IpAccessList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetIpAccessList sets the value of the IpAccessList field in UpdateRecipient_SdkV2. +func (o *UpdateRecipient_SdkV2) SetIpAccessList(ctx context.Context, v IpAccessList_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] + o.IpAccessList = types.ListValueMust(t, vs) +} + +// GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in UpdateRecipient_SdkV2 as +// a SecurablePropertiesKvPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRecipient_SdkV2) GetPropertiesKvpairs(ctx context.Context) (SecurablePropertiesKvPairs_SdkV2, bool) { + var e SecurablePropertiesKvPairs_SdkV2 + if o.PropertiesKvpairs.IsNull() || o.PropertiesKvpairs.IsUnknown() { + return e, false + } + var v []SecurablePropertiesKvPairs_SdkV2 + d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in UpdateRecipient_SdkV2. +func (o *UpdateRecipient_SdkV2) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] + o.PropertiesKvpairs = types.ListValueMust(t, vs) +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateShare_SdkV2 struct { + // User-provided free-form text description. + Comment types.String `tfsdk:"comment" tf:"optional"` + // The name of the share. + Name types.String `tfsdk:"-"` + // New name for the share. + NewName types.String `tfsdk:"new_name" tf:"optional"` + // Username of current owner of share. + Owner types.String `tfsdk:"owner" tf:"computed"` + // Storage root URL for the share. + StorageRoot types.String `tfsdk:"storage_root" tf:"optional"` + // Array of shared data object updates. + Updates types.List `tfsdk:"updates" tf:"optional"` +} + +func (newState *UpdateShare_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateShare_SdkV2) { +} + +func (newState *UpdateShare_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateShare_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateShare_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "updates": reflect.TypeOf(SharedDataObjectUpdate_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, UpdateShare_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateShare_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + "storage_root": o.StorageRoot, + "updates": o.Updates, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateShare_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "comment": types.StringType, + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "storage_root": types.StringType, + "updates": basetypes.ListType{ + ElemType: SharedDataObjectUpdate{}.Type(ctx), + }, + }, + } +} + +// GetUpdates returns the value of the Updates field in UpdateShare_SdkV2 as +// a slice of SharedDataObjectUpdate_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateShare_SdkV2) GetUpdates(ctx context.Context) ([]SharedDataObjectUpdate_SdkV2, bool) { + if o.Updates.IsNull() || o.Updates.IsUnknown() { + return nil, false + } + var v []SharedDataObjectUpdate_SdkV2 + d := o.Updates.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUpdates sets the value of the Updates field in UpdateShare_SdkV2. +func (o *UpdateShare_SdkV2) SetUpdates(ctx context.Context, v []SharedDataObjectUpdate_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["updates"] + t = t.(attr.TypeWithElementType).ElementType() + o.Updates = types.ListValueMust(t, vs) +} + +type UpdateSharePermissions_SdkV2 struct { + // Array of permission changes. + Changes types.List `tfsdk:"changes" tf:"optional"` + // Maximum number of permissions to return. - when set to 0, the page length + // is set to a server configured value (recommended); - when set to a value + // greater than 0, the page length is the minimum of this value and a server + // configured value; - when set to a value less than 0, an invalid parameter + // error is returned; - If not set, all valid permissions are returned (not + // recommended). - Note: The number of returned permissions might be less + // than the specified max_results size, even zero. The only definitive + // indication that no further permissions can be fetched is when the + // next_page_token is unset from the response. + MaxResults types.Int64 `tfsdk:"-"` + // The name of the share. + Name types.String `tfsdk:"-"` + // Opaque pagination token to go to next page based on previous query. + PageToken types.String `tfsdk:"-"` +} + +func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateSharePermissions_SdkV2) { +} + +func (newState *UpdateSharePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateSharePermissions_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateSharePermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "changes": reflect.TypeOf(catalog_tf.PermissionsChange_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, UpdateSharePermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateSharePermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "changes": o.Changes, + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateSharePermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "changes": basetypes.ListType{ + ElemType: catalog_tf.PermissionsChange{}.Type(ctx), + }, + "max_results": types.Int64Type, + "name": types.StringType, + "page_token": types.StringType, + }, + } +} + +// GetChanges returns the value of the Changes field in UpdateSharePermissions_SdkV2 as +// a slice of catalog_tf.PermissionsChange_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateSharePermissions_SdkV2) GetChanges(ctx context.Context) ([]catalog_tf.PermissionsChange_SdkV2, bool) { + if o.Changes.IsNull() || o.Changes.IsUnknown() { + return nil, false + } + var v []catalog_tf.PermissionsChange_SdkV2 + d := o.Changes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChanges sets the value of the Changes field in UpdateSharePermissions_SdkV2. +func (o *UpdateSharePermissions_SdkV2) SetChanges(ctx context.Context, v []catalog_tf.PermissionsChange_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["changes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Changes = types.ListValueMust(t, vs) +} diff --git a/internal/service/sharing_tf/model.go b/internal/service/sharing_tf/model.go index b50f924d9..d1918325e 100755 --- a/internal/service/sharing_tf/model.go +++ b/internal/service/sharing_tf/model.go @@ -90,13 +90,13 @@ type CreateRecipient struct { // Expiration timestamp of the token, in epoch milliseconds. ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` // Name of Recipient. Name types.String `tfsdk:"name" tf:""` // Username of the recipient owner. Owner types.String `tfsdk:"owner" tf:"optional"` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` // The one-time sharing code provided by the data recipient. This field is // required when the __authentication_type__ is **DATABRICKS**. SharingCode types.String `tfsdk:"sharing_code" tf:"optional"` @@ -149,15 +149,11 @@ func (o CreateRecipient) Type(ctx context.Context) attr.Type { "comment": types.StringType, "data_recipient_global_metastore_id": types.StringType, "expiration_time": types.Int64Type, - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), - }, - "name": types.StringType, - "owner": types.StringType, - "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), - }, - "sharing_code": types.StringType, + "ip_access_list": IpAccessList{}.Type(ctx), + "name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": SecurablePropertiesKvPairs{}.Type(ctx), + "sharing_code": types.StringType, }, } } @@ -171,7 +167,10 @@ func (o *CreateRecipient) GetIpAccessList(ctx context.Context) (IpAccessList, bo return e, false } var v []IpAccessList - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -183,9 +182,8 @@ func (o *CreateRecipient) GetIpAccessList(ctx context.Context) (IpAccessList, bo // SetIpAccessList sets the value of the IpAccessList field in CreateRecipient. func (o *CreateRecipient) SetIpAccessList(ctx context.Context, v IpAccessList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } // GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in CreateRecipient as @@ -197,7 +195,10 @@ func (o *CreateRecipient) GetPropertiesKvpairs(ctx context.Context) (SecurablePr return e, false } var v []SecurablePropertiesKvPairs - d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + d := o.PropertiesKvpairs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -209,9 +210,8 @@ func (o *CreateRecipient) GetPropertiesKvpairs(ctx context.Context) (SecurablePr // SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in CreateRecipient. func (o *CreateRecipient) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] - o.PropertiesKvpairs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PropertiesKvpairs = vs } type CreateShare struct { @@ -1585,7 +1585,7 @@ type ProviderInfo struct { Owner types.String `tfsdk:"owner" tf:"optional"` // The recipient profile. This field is only present when the // authentication_type is `TOKEN`. - RecipientProfile types.List `tfsdk:"recipient_profile" tf:"optional,object"` + RecipientProfile types.Object `tfsdk:"recipient_profile" tf:"optional,object"` // This field is only present when the authentication_type is `TOKEN` or not // provided. RecipientProfileStr types.String `tfsdk:"recipient_profile_str" tf:"optional"` @@ -1654,13 +1654,11 @@ func (o ProviderInfo) Type(ctx context.Context) attr.Type { "metastore_id": types.StringType, "name": types.StringType, "owner": types.StringType, - "recipient_profile": basetypes.ListType{ - ElemType: RecipientProfile{}.Type(ctx), - }, - "recipient_profile_str": types.StringType, - "region": types.StringType, - "updated_at": types.Int64Type, - "updated_by": types.StringType, + "recipient_profile": RecipientProfile{}.Type(ctx), + "recipient_profile_str": types.StringType, + "region": types.StringType, + "updated_at": types.Int64Type, + "updated_by": types.StringType, }, } } @@ -1674,7 +1672,10 @@ func (o *ProviderInfo) GetRecipientProfile(ctx context.Context) (RecipientProfil return e, false } var v []RecipientProfile - d := o.RecipientProfile.ElementsAs(ctx, &v, true) + d := o.RecipientProfile.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1686,9 +1687,8 @@ func (o *ProviderInfo) GetRecipientProfile(ctx context.Context) (RecipientProfil // SetRecipientProfile sets the value of the RecipientProfile field in ProviderInfo. func (o *ProviderInfo) SetRecipientProfile(ctx context.Context, v RecipientProfile) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["recipient_profile"] - o.RecipientProfile = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.RecipientProfile = vs } type ProviderShare struct { @@ -1757,7 +1757,7 @@ type RecipientInfo struct { // __cloud__:__region__:__metastore-uuid__. DataRecipientGlobalMetastoreId types.String `tfsdk:"data_recipient_global_metastore_id" tf:"optional"` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` // Unique identifier of recipient's Unity Catalog metastore. This field is // only present when the __authentication_type__ is **DATABRICKS** MetastoreId types.String `tfsdk:"metastore_id" tf:"optional"` @@ -1766,7 +1766,7 @@ type RecipientInfo struct { // Username of the recipient owner. Owner types.String `tfsdk:"owner" tf:"optional"` // Recipient properties as map of string key-value pairs. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` // Cloud region of the recipient's Unity Catalog Metstore. This field is // only present when the __authentication_type__ is **DATABRICKS**. Region types.String `tfsdk:"region" tf:"optional"` @@ -1842,17 +1842,13 @@ func (o RecipientInfo) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "created_by": types.StringType, "data_recipient_global_metastore_id": types.StringType, - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), - }, - "metastore_id": types.StringType, - "name": types.StringType, - "owner": types.StringType, - "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), - }, - "region": types.StringType, - "sharing_code": types.StringType, + "ip_access_list": IpAccessList{}.Type(ctx), + "metastore_id": types.StringType, + "name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": SecurablePropertiesKvPairs{}.Type(ctx), + "region": types.StringType, + "sharing_code": types.StringType, "tokens": basetypes.ListType{ ElemType: RecipientTokenInfo{}.Type(ctx), }, @@ -1871,7 +1867,10 @@ func (o *RecipientInfo) GetIpAccessList(ctx context.Context) (IpAccessList, bool return e, false } var v []IpAccessList - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1883,9 +1882,8 @@ func (o *RecipientInfo) GetIpAccessList(ctx context.Context) (IpAccessList, bool // SetIpAccessList sets the value of the IpAccessList field in RecipientInfo. func (o *RecipientInfo) SetIpAccessList(ctx context.Context, v IpAccessList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } // GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in RecipientInfo as @@ -1897,7 +1895,10 @@ func (o *RecipientInfo) GetPropertiesKvpairs(ctx context.Context) (SecurableProp return e, false } var v []SecurablePropertiesKvPairs - d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + d := o.PropertiesKvpairs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1909,9 +1910,8 @@ func (o *RecipientInfo) GetPropertiesKvpairs(ctx context.Context) (SecurableProp // SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in RecipientInfo. func (o *RecipientInfo) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] - o.PropertiesKvpairs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PropertiesKvpairs = vs } // GetTokens returns the value of the Tokens field in RecipientInfo as @@ -2289,7 +2289,7 @@ type ShareInfo struct { // A list of shared data objects within the share. Objects types.List `tfsdk:"object" tf:"optional"` // Username of current owner of share. - Owner types.String `tfsdk:"owner" tf:"computed,optional"` + Owner types.String `tfsdk:"owner" tf:"computed"` // Storage Location URL (full path) for the share. StorageLocation types.String `tfsdk:"storage_location" tf:"optional"` // Storage root URL for the share. @@ -2701,7 +2701,7 @@ type SharedDataObjectUpdate struct { // One of: **ADD**, **REMOVE**, **UPDATE**. Action types.String `tfsdk:"action" tf:"optional"` // The data object that is being added, removed, or updated. - DataObject types.List `tfsdk:"data_object" tf:"optional,object"` + DataObject types.Object `tfsdk:"data_object" tf:"optional,object"` } func (newState *SharedDataObjectUpdate) SyncEffectiveFieldsDuringCreateOrUpdate(plan SharedDataObjectUpdate) { @@ -2739,10 +2739,8 @@ func (o SharedDataObjectUpdate) ToObjectValue(ctx context.Context) basetypes.Obj func (o SharedDataObjectUpdate) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "action": types.StringType, - "data_object": basetypes.ListType{ - ElemType: SharedDataObject{}.Type(ctx), - }, + "action": types.StringType, + "data_object": SharedDataObject{}.Type(ctx), }, } } @@ -2756,7 +2754,10 @@ func (o *SharedDataObjectUpdate) GetDataObject(ctx context.Context) (SharedDataO return e, false } var v []SharedDataObject - d := o.DataObject.ElementsAs(ctx, &v, true) + d := o.DataObject.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2768,9 +2769,8 @@ func (o *SharedDataObjectUpdate) GetDataObject(ctx context.Context) (SharedDataO // SetDataObject sets the value of the DataObject field in SharedDataObjectUpdate. func (o *SharedDataObjectUpdate) SetDataObject(ctx context.Context, v SharedDataObject) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["data_object"] - o.DataObject = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DataObject = vs } type UpdatePermissionsResponse struct { @@ -2874,7 +2874,7 @@ type UpdateRecipient struct { // Expiration timestamp of the token, in epoch milliseconds. ExpirationTime types.Int64 `tfsdk:"expiration_time" tf:"optional"` // IP Access List - IpAccessList types.List `tfsdk:"ip_access_list" tf:"optional,object"` + IpAccessList types.Object `tfsdk:"ip_access_list" tf:"optional,object"` // Name of the recipient. Name types.String `tfsdk:"-"` // New name for the recipient. @@ -2885,7 +2885,7 @@ type UpdateRecipient struct { // update request, the specified properties will override the existing // properties. To add and remove properties, one would need to perform a // read-modify-write. - PropertiesKvpairs types.List `tfsdk:"properties_kvpairs" tf:"optional,object"` + PropertiesKvpairs types.Object `tfsdk:"properties_kvpairs" tf:"optional,object"` } func (newState *UpdateRecipient) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRecipient) { @@ -2929,17 +2929,13 @@ func (o UpdateRecipient) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o UpdateRecipient) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "comment": types.StringType, - "expiration_time": types.Int64Type, - "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), - }, - "name": types.StringType, - "new_name": types.StringType, - "owner": types.StringType, - "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), - }, + "comment": types.StringType, + "expiration_time": types.Int64Type, + "ip_access_list": IpAccessList{}.Type(ctx), + "name": types.StringType, + "new_name": types.StringType, + "owner": types.StringType, + "properties_kvpairs": SecurablePropertiesKvPairs{}.Type(ctx), }, } } @@ -2953,7 +2949,10 @@ func (o *UpdateRecipient) GetIpAccessList(ctx context.Context) (IpAccessList, bo return e, false } var v []IpAccessList - d := o.IpAccessList.ElementsAs(ctx, &v, true) + d := o.IpAccessList.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2965,9 +2964,8 @@ func (o *UpdateRecipient) GetIpAccessList(ctx context.Context) (IpAccessList, bo // SetIpAccessList sets the value of the IpAccessList field in UpdateRecipient. func (o *UpdateRecipient) SetIpAccessList(ctx context.Context, v IpAccessList) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["ip_access_list"] - o.IpAccessList = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.IpAccessList = vs } // GetPropertiesKvpairs returns the value of the PropertiesKvpairs field in UpdateRecipient as @@ -2979,7 +2977,10 @@ func (o *UpdateRecipient) GetPropertiesKvpairs(ctx context.Context) (SecurablePr return e, false } var v []SecurablePropertiesKvPairs - d := o.PropertiesKvpairs.ElementsAs(ctx, &v, true) + d := o.PropertiesKvpairs.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2991,9 +2992,8 @@ func (o *UpdateRecipient) GetPropertiesKvpairs(ctx context.Context) (SecurablePr // SetPropertiesKvpairs sets the value of the PropertiesKvpairs field in UpdateRecipient. func (o *UpdateRecipient) SetPropertiesKvpairs(ctx context.Context, v SecurablePropertiesKvPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["properties_kvpairs"] - o.PropertiesKvpairs = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.PropertiesKvpairs = vs } type UpdateResponse struct { diff --git a/internal/service/sql_tf/legacy_model.go b/internal/service/sql_tf/legacy_model.go new file mode 100755 index 000000000..5931259c4 --- /dev/null +++ b/internal/service/sql_tf/legacy_model.go @@ -0,0 +1,12467 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package sql_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AccessControl_SdkV2 struct { + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * + // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *AccessControl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AccessControl_SdkV2) { +} + +func (newState *AccessControl_SdkV2) SyncEffectiveFieldsDuringRead(existingState AccessControl_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AccessControl. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AccessControl_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, AccessControl_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AccessControl_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AccessControl_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "user_name": types.StringType, + }, + } +} + +type Alert_SdkV2 struct { + // Trigger conditions of the alert. + Condition types.List `tfsdk:"condition" tf:"optional,object"` + // The timestamp indicating when the alert was created. + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // Custom body of alert notification, if it exists. See [here] for custom + // templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + // Custom subject of alert notification, if it exists. This can include + // email subject entries and Slack notification headers, for example. See + // [here] for custom templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // The display name of the alert. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying the alert. + Id types.String `tfsdk:"id" tf:"optional"` + // The workspace state of the alert. Used for tracking trashed status. + LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + // Whether to notify alert subscribers when alert returns back to normal. + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + // The owner's username. This field is set to "Unavailable" if the user has + // been deleted. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // The workspace path of the folder containing the alert. + ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + // UUID of the query attached to the alert. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // Number of seconds an alert must wait after being triggered to rearm + // itself. After rearming, it can be triggered again. If 0 or not specified, + // the alert will not be triggered again. + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + // Current state of the alert's trigger status. This field is set to UNKNOWN + // if the alert has not yet been evaluated or ran into an error during the + // last evaluation. + State types.String `tfsdk:"state" tf:"optional"` + // Timestamp when the alert was last triggered, if the alert has been + // triggered before. + TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + // The timestamp indicating when the alert was updated. + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` +} + +func (newState *Alert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Alert_SdkV2) { +} + +func (newState *Alert_SdkV2) SyncEffectiveFieldsDuringRead(existingState Alert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Alert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Alert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition": reflect.TypeOf(AlertCondition_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, Alert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Alert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition": o.Condition, + "create_time": o.CreateTime, + "custom_body": o.CustomBody, + "custom_subject": o.CustomSubject, + "display_name": o.DisplayName, + "id": o.Id, + "lifecycle_state": o.LifecycleState, + "notify_on_ok": o.NotifyOnOk, + "owner_user_name": o.OwnerUserName, + "parent_path": o.ParentPath, + "query_id": o.QueryId, + "seconds_to_retrigger": o.SecondsToRetrigger, + "state": o.State, + "trigger_time": o.TriggerTime, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Alert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition": basetypes.ListType{ + ElemType: AlertCondition{}.Type(ctx), + }, + "create_time": types.StringType, + "custom_body": types.StringType, + "custom_subject": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + "lifecycle_state": types.StringType, + "notify_on_ok": types.BoolType, + "owner_user_name": types.StringType, + "parent_path": types.StringType, + "query_id": types.StringType, + "seconds_to_retrigger": types.Int64Type, + "state": types.StringType, + "trigger_time": types.StringType, + "update_time": types.StringType, + }, + } +} + +// GetCondition returns the value of the Condition field in Alert_SdkV2 as +// a AlertCondition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Alert_SdkV2) GetCondition(ctx context.Context) (AlertCondition_SdkV2, bool) { + var e AlertCondition_SdkV2 + if o.Condition.IsNull() || o.Condition.IsUnknown() { + return e, false + } + var v []AlertCondition_SdkV2 + d := o.Condition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCondition sets the value of the Condition field in Alert_SdkV2. +func (o *Alert_SdkV2) SetCondition(ctx context.Context, v AlertCondition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] + o.Condition = types.ListValueMust(t, vs) +} + +type AlertCondition_SdkV2 struct { + // Alert state if result is empty. + EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + // Operator used for comparison in alert evaluation. + Op types.String `tfsdk:"op" tf:"optional"` + // Name of the column from the query result to use for comparison in alert + // evaluation. + Operand types.List `tfsdk:"operand" tf:"optional,object"` + // Threshold value used for comparison in alert evaluation. + Threshold types.List `tfsdk:"threshold" tf:"optional,object"` +} + +func (newState *AlertCondition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertCondition_SdkV2) { +} + +func (newState *AlertCondition_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertCondition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertCondition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertCondition_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "operand": reflect.TypeOf(AlertConditionOperand_SdkV2{}), + "threshold": reflect.TypeOf(AlertConditionThreshold_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, AlertCondition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertCondition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "empty_result_state": o.EmptyResultState, + "op": o.Op, + "operand": o.Operand, + "threshold": o.Threshold, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertCondition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "empty_result_state": types.StringType, + "op": types.StringType, + "operand": basetypes.ListType{ + ElemType: AlertConditionOperand{}.Type(ctx), + }, + "threshold": basetypes.ListType{ + ElemType: AlertConditionThreshold{}.Type(ctx), + }, + }, + } +} + +// GetOperand returns the value of the Operand field in AlertCondition_SdkV2 as +// a AlertConditionOperand_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertCondition_SdkV2) GetOperand(ctx context.Context) (AlertConditionOperand_SdkV2, bool) { + var e AlertConditionOperand_SdkV2 + if o.Operand.IsNull() || o.Operand.IsUnknown() { + return e, false + } + var v []AlertConditionOperand_SdkV2 + d := o.Operand.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOperand sets the value of the Operand field in AlertCondition_SdkV2. +func (o *AlertCondition_SdkV2) SetOperand(ctx context.Context, v AlertConditionOperand_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["operand"] + o.Operand = types.ListValueMust(t, vs) +} + +// GetThreshold returns the value of the Threshold field in AlertCondition_SdkV2 as +// a AlertConditionThreshold_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertCondition_SdkV2) GetThreshold(ctx context.Context) (AlertConditionThreshold_SdkV2, bool) { + var e AlertConditionThreshold_SdkV2 + if o.Threshold.IsNull() || o.Threshold.IsUnknown() { + return e, false + } + var v []AlertConditionThreshold_SdkV2 + d := o.Threshold.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetThreshold sets the value of the Threshold field in AlertCondition_SdkV2. +func (o *AlertCondition_SdkV2) SetThreshold(ctx context.Context, v AlertConditionThreshold_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["threshold"] + o.Threshold = types.ListValueMust(t, vs) +} + +type AlertConditionOperand_SdkV2 struct { + Column types.List `tfsdk:"column" tf:"optional,object"` +} + +func (newState *AlertConditionOperand_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionOperand_SdkV2) { +} + +func (newState *AlertConditionOperand_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConditionOperand_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionOperand. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertConditionOperand_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "column": reflect.TypeOf(AlertOperandColumn_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, AlertConditionOperand_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertConditionOperand_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "column": o.Column, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertConditionOperand_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "column": basetypes.ListType{ + ElemType: AlertOperandColumn{}.Type(ctx), + }, + }, + } +} + +// GetColumn returns the value of the Column field in AlertConditionOperand_SdkV2 as +// a AlertOperandColumn_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertConditionOperand_SdkV2) GetColumn(ctx context.Context) (AlertOperandColumn_SdkV2, bool) { + var e AlertOperandColumn_SdkV2 + if o.Column.IsNull() || o.Column.IsUnknown() { + return e, false + } + var v []AlertOperandColumn_SdkV2 + d := o.Column.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetColumn sets the value of the Column field in AlertConditionOperand_SdkV2. +func (o *AlertConditionOperand_SdkV2) SetColumn(ctx context.Context, v AlertOperandColumn_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["column"] + o.Column = types.ListValueMust(t, vs) +} + +type AlertConditionThreshold_SdkV2 struct { + Value types.List `tfsdk:"value" tf:"optional,object"` +} + +func (newState *AlertConditionThreshold_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionThreshold_SdkV2) { +} + +func (newState *AlertConditionThreshold_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertConditionThreshold_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertConditionThreshold. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertConditionThreshold_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "value": reflect.TypeOf(AlertOperandValue_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, AlertConditionThreshold_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertConditionThreshold_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertConditionThreshold_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": basetypes.ListType{ + ElemType: AlertOperandValue{}.Type(ctx), + }, + }, + } +} + +// GetValue returns the value of the Value field in AlertConditionThreshold_SdkV2 as +// a AlertOperandValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertConditionThreshold_SdkV2) GetValue(ctx context.Context) (AlertOperandValue_SdkV2, bool) { + var e AlertOperandValue_SdkV2 + if o.Value.IsNull() || o.Value.IsUnknown() { + return e, false + } + var v []AlertOperandValue_SdkV2 + d := o.Value.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetValue sets the value of the Value field in AlertConditionThreshold_SdkV2. +func (o *AlertConditionThreshold_SdkV2) SetValue(ctx context.Context, v AlertOperandValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] + o.Value = types.ListValueMust(t, vs) +} + +type AlertOperandColumn_SdkV2 struct { + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *AlertOperandColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandColumn_SdkV2) { +} + +func (newState *AlertOperandColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOperandColumn_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandColumn. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertOperandColumn_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, AlertOperandColumn_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertOperandColumn_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 AlertOperandColumn_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type AlertOperandValue_SdkV2 struct { + BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + + DoubleValue types.Float64 `tfsdk:"double_value" tf:"optional"` + + StringValue types.String `tfsdk:"string_value" tf:"optional"` +} + +func (newState *AlertOperandValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOperandValue_SdkV2) { +} + +func (newState *AlertOperandValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOperandValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOperandValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertOperandValue_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, AlertOperandValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertOperandValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bool_value": o.BoolValue, + "double_value": o.DoubleValue, + "string_value": o.StringValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertOperandValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bool_value": types.BoolType, + "double_value": types.Float64Type, + "string_value": types.StringType, + }, + } +} + +// Alert configuration options. +type AlertOptions_SdkV2 struct { + // Name of column in the query result to compare in alert evaluation. + Column types.String `tfsdk:"column" tf:""` + // Custom body of alert notification, if it exists. See [here] for custom + // templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + // Custom subject of alert notification, if it exists. This includes email + // subject, Slack notification header, etc. See [here] for custom templating + // instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // State that alert evaluates to when query result is empty. + EmptyResultState types.String `tfsdk:"empty_result_state" tf:"optional"` + // Whether or not the alert is muted. If an alert is muted, it will not + // notify users and notification destinations when triggered. + Muted types.Bool `tfsdk:"muted" tf:"optional"` + // Operator used to compare in alert evaluation: `>`, `>=`, `<`, `<=`, `==`, + // `!=` + Op types.String `tfsdk:"op" tf:""` + // Value used to compare in alert evaluation. Supported types include + // strings (eg. 'foobar'), floats (eg. 123.4), and booleans (true). + Value types.Object `tfsdk:"value" tf:""` +} + +func (newState *AlertOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOptions_SdkV2) { +} + +func (newState *AlertOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertOptions_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, AlertOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "column": o.Column, + "custom_body": o.CustomBody, + "custom_subject": o.CustomSubject, + "empty_result_state": o.EmptyResultState, + "muted": o.Muted, + "op": o.Op, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "column": types.StringType, + "custom_body": types.StringType, + "custom_subject": types.StringType, + "empty_result_state": types.StringType, + "muted": types.BoolType, + "op": types.StringType, + "value": types.ObjectType{}, + }, + } +} + +type AlertQuery_SdkV2 struct { + // The timestamp when this query was created. + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // Data source ID maps to the ID of the data source used by the resource and + // is distinct from the warehouse ID. [Learn more] + // + // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list + DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Query ID. + Id types.String `tfsdk:"id" tf:"optional"` + // Indicates whether the query is trashed. Trashed queries can't be used in + // dashboards, or appear in search results. If this boolean is `true`, the + // `options` property for this query includes a `moved_to_trash_at` + // timestamp. Trashed queries are permanently deleted after 30 days. + IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + // Whether the query is a draft. Draft queries only appear in list views for + // their owners. Visualizations from draft queries cannot appear on + // dashboards. + IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + // Text parameter types are not safe from SQL injection for all types of + // data source. Set this Boolean parameter to `true` if a query either does + // not use any text type parameters or uses a data source type where text + // type parameters are handled safely. + IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + // The title of this query that appears in list views, widget headings, and + // on the query page. + Name types.String `tfsdk:"name" tf:"optional"` + + Options types.List `tfsdk:"options" tf:"optional,object"` + // The text of the query to be run. + Query types.String `tfsdk:"query" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // The timestamp at which this query was last updated. + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + // The ID of the user who owns the query. + UserId types.Int64 `tfsdk:"user_id" tf:"optional"` +} + +func (newState *AlertQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertQuery_SdkV2) { +} + +func (newState *AlertQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState AlertQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AlertQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AlertQuery_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(QueryOptions_SdkV2{}), + "tags": 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, AlertQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AlertQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "data_source_id": o.DataSourceId, + "description": o.Description, + "id": o.Id, + "is_archived": o.IsArchived, + "is_draft": o.IsDraft, + "is_safe": o.IsSafe, + "name": o.Name, + "options": o.Options, + "query": o.Query, + "tags": o.Tags, + "updated_at": o.UpdatedAt, + "user_id": o.UserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AlertQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.StringType, + "data_source_id": types.StringType, + "description": types.StringType, + "id": types.StringType, + "is_archived": types.BoolType, + "is_draft": types.BoolType, + "is_safe": types.BoolType, + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: QueryOptions{}.Type(ctx), + }, + "query": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "updated_at": types.StringType, + "user_id": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in AlertQuery_SdkV2 as +// a QueryOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertQuery_SdkV2) GetOptions(ctx context.Context) (QueryOptions_SdkV2, bool) { + var e QueryOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []QueryOptions_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 AlertQuery_SdkV2. +func (o *AlertQuery_SdkV2) SetOptions(ctx context.Context, v QueryOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in AlertQuery_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *AlertQuery_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in AlertQuery_SdkV2. +func (o *AlertQuery_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// Describes metadata for a particular chunk, within a result set; this +// structure is used both within a manifest, and when fetching individual chunk +// data or links. +type BaseChunkInfo_SdkV2 struct { + // The number of bytes in the result chunk. This field is not available when + // using `INLINE` disposition. + ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + // The position within the sequence of result set chunks. + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + // The number of rows within the result chunk. + RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + // The starting row offset within the result set. + RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` +} + +func (newState *BaseChunkInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan BaseChunkInfo_SdkV2) { +} + +func (newState *BaseChunkInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState BaseChunkInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in BaseChunkInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a BaseChunkInfo_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, BaseChunkInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o BaseChunkInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "byte_count": o.ByteCount, + "chunk_index": o.ChunkIndex, + "row_count": o.RowCount, + "row_offset": o.RowOffset, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o BaseChunkInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "byte_count": types.Int64Type, + "chunk_index": types.Int64Type, + "row_count": types.Int64Type, + "row_offset": types.Int64Type, + }, + } +} + +// Cancel statement execution +type CancelExecutionRequest_SdkV2 struct { + // The statement ID is returned upon successfully submitting a SQL + // statement, and is a required reference for all subsequent calls. + StatementId types.String `tfsdk:"-"` +} + +func (newState *CancelExecutionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionRequest_SdkV2) { +} + +func (newState *CancelExecutionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelExecutionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelExecutionRequest_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, CancelExecutionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelExecutionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "statement_id": o.StatementId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CancelExecutionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "statement_id": types.StringType, + }, + } +} + +type CancelExecutionResponse_SdkV2 struct { +} + +func (newState *CancelExecutionResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CancelExecutionResponse_SdkV2) { +} + +func (newState *CancelExecutionResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CancelExecutionResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CancelExecutionResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CancelExecutionResponse_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, CancelExecutionResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CancelExecutionResponse_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 CancelExecutionResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Configures the channel name and DBSQL version of the warehouse. +// CHANNEL_NAME_CUSTOM should be chosen only when `dbsql_version` is specified. +type Channel_SdkV2 struct { + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *Channel_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Channel_SdkV2) { +} + +func (newState *Channel_SdkV2) SyncEffectiveFieldsDuringRead(existingState Channel_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Channel. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Channel_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, Channel_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Channel_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbsql_version": o.DbsqlVersion, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Channel_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbsql_version": types.StringType, + "name": types.StringType, + }, + } +} + +// Details about a Channel. +type ChannelInfo_SdkV2 struct { + // DB SQL Version the Channel is mapped to. + DbsqlVersion types.String `tfsdk:"dbsql_version" tf:"optional"` + // Name of the channel + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *ChannelInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ChannelInfo_SdkV2) { +} + +func (newState *ChannelInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ChannelInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ChannelInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ChannelInfo_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, ChannelInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ChannelInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dbsql_version": o.DbsqlVersion, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ChannelInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dbsql_version": types.StringType, + "name": types.StringType, + }, + } +} + +type ColumnInfo_SdkV2 struct { + // The name of the column. + Name types.String `tfsdk:"name" tf:"optional"` + // The ordinal position of the column (starting at position 0). + Position types.Int64 `tfsdk:"position" tf:"optional"` + // The format of the interval type. + TypeIntervalType types.String `tfsdk:"type_interval_type" tf:"optional"` + // The name of the base data type. This doesn't include details for complex + // types such as STRUCT, MAP or ARRAY. + TypeName types.String `tfsdk:"type_name" tf:"optional"` + // Specifies the number of digits in a number. This applies to the DECIMAL + // type. + TypePrecision types.Int64 `tfsdk:"type_precision" tf:"optional"` + // Specifies the number of digits to the right of the decimal point in a + // number. This applies to the DECIMAL type. + TypeScale types.Int64 `tfsdk:"type_scale" tf:"optional"` + // The full SQL type specification. + TypeText types.String `tfsdk:"type_text" tf:"optional"` +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ColumnInfo_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, ColumnInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "position": o.Position, + "type_interval_type": o.TypeIntervalType, + "type_name": o.TypeName, + "type_precision": o.TypePrecision, + "type_scale": o.TypeScale, + "type_text": o.TypeText, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ColumnInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "position": types.Int64Type, + "type_interval_type": types.StringType, + "type_name": types.StringType, + "type_precision": types.Int64Type, + "type_scale": types.Int64Type, + "type_text": types.StringType, + }, + } +} + +type CreateAlert_SdkV2 struct { + // Name of the alert. + Name types.String `tfsdk:"name" tf:""` + // Alert configuration options. + Options types.List `tfsdk:"options" tf:"object"` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + // Query ID. + QueryId types.String `tfsdk:"query_id" tf:""` + // Number of seconds after being triggered before the alert rearms itself + // and can be triggered again. If `null`, alert will never be triggered + // again. + Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` +} + +func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlert_SdkV2) { +} + +func (newState *CreateAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlert_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(AlertOptions_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, CreateAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "query_id": o.QueryId, + "rearm": o.Rearm, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: AlertOptions{}.Type(ctx), + }, + "parent": types.StringType, + "query_id": types.StringType, + "rearm": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in CreateAlert_SdkV2 as +// a AlertOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAlert_SdkV2) GetOptions(ctx context.Context) (AlertOptions_SdkV2, bool) { + var e AlertOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []AlertOptions_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 CreateAlert_SdkV2. +func (o *CreateAlert_SdkV2) SetOptions(ctx context.Context, v AlertOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +type CreateAlertRequest_SdkV2 struct { + Alert types.List `tfsdk:"alert" tf:"optional,object"` +} + +func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest_SdkV2) { +} + +func (newState *CreateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAlertRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert": reflect.TypeOf(CreateAlertRequestAlert_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, CreateAlertRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAlertRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert": o.Alert, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert": basetypes.ListType{ + ElemType: CreateAlertRequestAlert{}.Type(ctx), + }, + }, + } +} + +// GetAlert returns the value of the Alert field in CreateAlertRequest_SdkV2 as +// a CreateAlertRequestAlert_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAlertRequest_SdkV2) GetAlert(ctx context.Context) (CreateAlertRequestAlert_SdkV2, bool) { + var e CreateAlertRequestAlert_SdkV2 + if o.Alert.IsNull() || o.Alert.IsUnknown() { + return e, false + } + var v []CreateAlertRequestAlert_SdkV2 + d := o.Alert.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAlert sets the value of the Alert field in CreateAlertRequest_SdkV2. +func (o *CreateAlertRequest_SdkV2) SetAlert(ctx context.Context, v CreateAlertRequestAlert_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] + o.Alert = types.ListValueMust(t, vs) +} + +type CreateAlertRequestAlert_SdkV2 struct { + // Trigger conditions of the alert. + Condition types.List `tfsdk:"condition" tf:"optional,object"` + // Custom body of alert notification, if it exists. See [here] for custom + // templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + // Custom subject of alert notification, if it exists. This can include + // email subject entries and Slack notification headers, for example. See + // [here] for custom templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // The display name of the alert. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Whether to notify alert subscribers when alert returns back to normal. + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + // The workspace path of the folder containing the alert. + ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + // UUID of the query attached to the alert. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // Number of seconds an alert must wait after being triggered to rearm + // itself. After rearming, it can be triggered again. If 0 or not specified, + // the alert will not be triggered again. + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` +} + +func (newState *CreateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequestAlert_SdkV2) { +} + +func (newState *CreateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAlertRequestAlert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAlertRequestAlert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAlertRequestAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition": reflect.TypeOf(AlertCondition_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, CreateAlertRequestAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAlertRequestAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition": o.Condition, + "custom_body": o.CustomBody, + "custom_subject": o.CustomSubject, + "display_name": o.DisplayName, + "notify_on_ok": o.NotifyOnOk, + "parent_path": o.ParentPath, + "query_id": o.QueryId, + "seconds_to_retrigger": o.SecondsToRetrigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAlertRequestAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition": basetypes.ListType{ + ElemType: AlertCondition{}.Type(ctx), + }, + "custom_body": types.StringType, + "custom_subject": types.StringType, + "display_name": types.StringType, + "notify_on_ok": types.BoolType, + "parent_path": types.StringType, + "query_id": types.StringType, + "seconds_to_retrigger": types.Int64Type, + }, + } +} + +// GetCondition returns the value of the Condition field in CreateAlertRequestAlert_SdkV2 as +// a AlertCondition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAlertRequestAlert_SdkV2) GetCondition(ctx context.Context) (AlertCondition_SdkV2, bool) { + var e AlertCondition_SdkV2 + if o.Condition.IsNull() || o.Condition.IsUnknown() { + return e, false + } + var v []AlertCondition_SdkV2 + d := o.Condition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCondition sets the value of the Condition field in CreateAlertRequestAlert_SdkV2. +func (o *CreateAlertRequestAlert_SdkV2) SetCondition(ctx context.Context, v AlertCondition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] + o.Condition = types.ListValueMust(t, vs) +} + +type CreateQueryRequest_SdkV2 struct { + Query types.List `tfsdk:"query" tf:"optional,object"` +} + +func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest_SdkV2) { +} + +func (newState *CreateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateQueryRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query": reflect.TypeOf(CreateQueryRequestQuery_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, CreateQueryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query": o.Query, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query": basetypes.ListType{ + ElemType: CreateQueryRequestQuery{}.Type(ctx), + }, + }, + } +} + +// GetQuery returns the value of the Query field in CreateQueryRequest_SdkV2 as +// a CreateQueryRequestQuery_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateQueryRequest_SdkV2) GetQuery(ctx context.Context) (CreateQueryRequestQuery_SdkV2, bool) { + var e CreateQueryRequestQuery_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []CreateQueryRequestQuery_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in CreateQueryRequest_SdkV2. +func (o *CreateQueryRequest_SdkV2) SetQuery(ctx context.Context, v CreateQueryRequestQuery_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +type CreateQueryRequestQuery_SdkV2 struct { + // Whether to apply a 1000 row limit to the query result. + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + // Name of the catalog where this query will be executed. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Display name of the query that appears in list views, widget headings, + // and on the query page. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // List of query parameter definitions. + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // Workspace path of the workspace folder containing the object. + ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + // Text of the query to be run. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Sets the "Run as" role for the object. + RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + // Name of the schema where this query will be executed. + Schema types.String `tfsdk:"schema" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // ID of the SQL warehouse attached to the query. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *CreateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequestQuery_SdkV2) { +} + +func (newState *CreateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryRequestQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryRequestQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateQueryRequestQuery_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(QueryParameter_SdkV2{}), + "tags": 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, CreateQueryRequestQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateQueryRequestQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_auto_limit": o.ApplyAutoLimit, + "catalog": o.Catalog, + "description": o.Description, + "display_name": o.DisplayName, + "parameters": o.Parameters, + "parent_path": o.ParentPath, + "query_text": o.QueryText, + "run_as_mode": o.RunAsMode, + "schema": o.Schema, + "tags": o.Tags, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateQueryRequestQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_auto_limit": types.BoolType, + "catalog": types.StringType, + "description": types.StringType, + "display_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: QueryParameter{}.Type(ctx), + }, + "parent_path": types.StringType, + "query_text": types.StringType, + "run_as_mode": types.StringType, + "schema": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in CreateQueryRequestQuery_SdkV2 as +// a slice of QueryParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateQueryRequestQuery_SdkV2) GetParameters(ctx context.Context) ([]QueryParameter_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []QueryParameter_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in CreateQueryRequestQuery_SdkV2. +func (o *CreateQueryRequestQuery_SdkV2) SetParameters(ctx context.Context, v []QueryParameter_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in CreateQueryRequestQuery_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateQueryRequestQuery_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in CreateQueryRequestQuery_SdkV2. +func (o *CreateQueryRequestQuery_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// Add visualization to a query +type CreateQueryVisualizationsLegacyRequest_SdkV2 struct { + // A short description of this visualization. This is not displayed in the + // UI. + Description types.String `tfsdk:"description" tf:"optional"` + // The name of the visualization that appears on dashboards and the query + // screen. + Name types.String `tfsdk:"name" tf:"optional"` + // The options object varies widely from one visualization type to the next + // and is unsupported. Databricks does not recommend modifying visualization + // settings in JSON. + Options types.Object `tfsdk:"options" tf:""` + // The identifier returned by :method:queries/create + QueryId types.String `tfsdk:"query_id" tf:""` + // The type of visualization: chart, table, pivot table, and so on. + Type_ types.String `tfsdk:"type" tf:""` +} + +func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryVisualizationsLegacyRequest_SdkV2) { +} + +func (newState *CreateQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateQueryVisualizationsLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateQueryVisualizationsLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateQueryVisualizationsLegacyRequest_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, CreateQueryVisualizationsLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateQueryVisualizationsLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "options": o.Options, + "query_id": o.QueryId, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateQueryVisualizationsLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "name": types.StringType, + "options": types.ObjectType{}, + "query_id": types.StringType, + "type": types.StringType, + }, + } +} + +type CreateVisualizationRequest_SdkV2 struct { + Visualization types.List `tfsdk:"visualization" tf:"optional,object"` +} + +func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest_SdkV2) { +} + +func (newState *CreateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVisualizationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "visualization": reflect.TypeOf(CreateVisualizationRequestVisualization_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, CreateVisualizationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVisualizationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "visualization": o.Visualization, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVisualizationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "visualization": basetypes.ListType{ + ElemType: CreateVisualizationRequestVisualization{}.Type(ctx), + }, + }, + } +} + +// GetVisualization returns the value of the Visualization field in CreateVisualizationRequest_SdkV2 as +// a CreateVisualizationRequestVisualization_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateVisualizationRequest_SdkV2) GetVisualization(ctx context.Context) (CreateVisualizationRequestVisualization_SdkV2, bool) { + var e CreateVisualizationRequestVisualization_SdkV2 + if o.Visualization.IsNull() || o.Visualization.IsUnknown() { + return e, false + } + var v []CreateVisualizationRequestVisualization_SdkV2 + d := o.Visualization.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVisualization sets the value of the Visualization field in CreateVisualizationRequest_SdkV2. +func (o *CreateVisualizationRequest_SdkV2) SetVisualization(ctx context.Context, v CreateVisualizationRequestVisualization_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] + o.Visualization = types.ListValueMust(t, vs) +} + +type CreateVisualizationRequestVisualization_SdkV2 struct { + // The display name of the visualization. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID of the query that the visualization is attached to. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // The visualization options varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying + // visualization options directly. + SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + // The visualization query plan varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying the + // visualization query plan directly. + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + // The type of visualization: counter, table, funnel, and so on. + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *CreateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequestVisualization_SdkV2) { +} + +func (newState *CreateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVisualizationRequestVisualization_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVisualizationRequestVisualization. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVisualizationRequestVisualization_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, CreateVisualizationRequestVisualization_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVisualizationRequestVisualization_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "query_id": o.QueryId, + "serialized_options": o.SerializedOptions, + "serialized_query_plan": o.SerializedQueryPlan, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVisualizationRequestVisualization_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "query_id": types.StringType, + "serialized_options": types.StringType, + "serialized_query_plan": types.StringType, + "type": types.StringType, + }, + } +} + +type CreateWarehouseRequest_SdkV2 struct { + // The amount of time in minutes that a SQL warehouse must be idle (i.e., no + // RUNNING queries) before it is automatically stopped. + // + // Supported values: - Must be >= 0 mins for serverless warehouses - Must be + // == 0 or >= 10 mins for non-serverless warehouses - 0 indicates no + // autostop. + // + // Defaults to 120 mins + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + // Channel Details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Size of the clusters allocated for this warehouse. Increasing the size of + // a spark cluster allows you to run larger queries on it. If you want to + // increase the number of concurrent queries, please tune max_num_clusters. + // + // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large + // - 2X-Large - 3X-Large - 4X-Large + ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + // warehouse creator name + CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + // Configures whether the warehouse should use Photon optimized clusters. + // + // Defaults to false. + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + // Configures whether the warehouse should use serverless compute + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + // Deprecated. Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // Maximum number of clusters that the autoscaler will create to handle + // concurrent queries. + // + // Supported values: - Must be >= min_num_clusters - Must be <= 30. + // + // Defaults to min_clusters if unset. + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + // Minimum number of available clusters that will be maintained for this SQL + // warehouse. Increasing this will ensure that a larger number of clusters + // are always running and therefore may reduce the cold start time for new + // queries. This is similar to reserved vs. revocable cores in a resource + // manager. + // + // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) + // + // Defaults to 1 + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + // Logical name for the cluster. + // + // Supported values: - Must be unique within an org. - Must be less than 100 + // characters. + Name types.String `tfsdk:"name" tf:"optional"` + // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + // A set of key-value pairs that will be tagged on all resources (e.g., AWS + // instances and EBS volumes) associated with this SQL warehouse. + // + // Supported values: - Number of tags < 45. + Tags types.List `tfsdk:"tags" tf:"optional,object"` + // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless + // compute, you must set to `PRO` and also set the field + // `enable_serverless_compute` to `true`. + WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` +} + +func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseRequest_SdkV2) { +} + +func (newState *CreateWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateWarehouseRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "tags": reflect.TypeOf(EndpointTags_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, CreateWarehouseRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateWarehouseRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_stop_mins": o.AutoStopMins, + "channel": o.Channel, + "cluster_size": o.ClusterSize, + "creator_name": o.CreatorName, + "enable_photon": o.EnablePhoton, + "enable_serverless_compute": o.EnableServerlessCompute, + "instance_profile_arn": o.InstanceProfileArn, + "max_num_clusters": o.MaxNumClusters, + "min_num_clusters": o.MinNumClusters, + "name": o.Name, + "spot_instance_policy": o.SpotInstancePolicy, + "tags": o.Tags, + "warehouse_type": o.WarehouseType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_stop_mins": types.Int64Type, + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "cluster_size": types.StringType, + "creator_name": types.StringType, + "enable_photon": types.BoolType, + "enable_serverless_compute": types.BoolType, + "instance_profile_arn": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "spot_instance_policy": types.StringType, + "tags": basetypes.ListType{ + ElemType: EndpointTags{}.Type(ctx), + }, + "warehouse_type": types.StringType, + }, + } +} + +// GetChannel returns the value of the Channel field in CreateWarehouseRequest_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWarehouseRequest_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in CreateWarehouseRequest_SdkV2. +func (o *CreateWarehouseRequest_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in CreateWarehouseRequest_SdkV2 as +// a EndpointTags_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWarehouseRequest_SdkV2) GetTags(ctx context.Context) (EndpointTags_SdkV2, bool) { + var e EndpointTags_SdkV2 + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return e, false + } + var v []EndpointTags_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTags sets the value of the Tags field in CreateWarehouseRequest_SdkV2. +func (o *CreateWarehouseRequest_SdkV2) SetTags(ctx context.Context, v EndpointTags_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] + o.Tags = types.ListValueMust(t, vs) +} + +type CreateWarehouseResponse_SdkV2 struct { + // Id for the SQL warehouse. This value is unique across all SQL warehouses. + Id types.String `tfsdk:"id" tf:"optional"` +} + +func (newState *CreateWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWarehouseResponse_SdkV2) { +} + +func (newState *CreateWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateWarehouseResponse_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, CreateWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateWarehouseResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type CreateWidget_SdkV2 struct { + // Dashboard ID returned by :method:dashboards/create. + DashboardId types.String `tfsdk:"dashboard_id" tf:""` + // Widget ID returned by :method:dashboardwidgets/create + Id types.String `tfsdk:"-"` + + Options types.List `tfsdk:"options" tf:"object"` + // If this is a textbox widget, the application displays this text. This + // field is ignored if the widget contains a visualization in the + // `visualization` field. + Text types.String `tfsdk:"text" tf:"optional"` + // Query Vizualization ID returned by :method:queryvisualizations/create. + VisualizationId types.String `tfsdk:"visualization_id" tf:"optional"` + // Width of a widget + Width types.Int64 `tfsdk:"width" tf:""` +} + +func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateWidget_SdkV2) { +} + +func (newState *CreateWidget_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateWidget_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateWidget_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, CreateWidget_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateWidget_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 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{}.Type(ctx), + }, + "text": types.StringType, + "visualization_id": types.StringType, + "width": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in CreateWidget_SdkV2 as +// a WidgetOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateWidget_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 CreateWidget_SdkV2. +func (o *CreateWidget_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) +} + +// A JSON representing a dashboard containing widgets of visualizations and text +// boxes. +type Dashboard_SdkV2 struct { + // Whether the authenticated user can edit the query definition. + CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + // Timestamp when this dashboard was created. + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // In the web application, query filters that share a name are coupled to a + // single selection box if this value is `true`. + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + // The ID for this dashboard. + Id types.String `tfsdk:"id" tf:"optional"` + // Indicates whether a dashboard is trashed. Trashed dashboards won't appear + // in list views. If this boolean is `true`, the `options` property for this + // dashboard includes a `moved_to_trash_at` timestamp. Items in trash are + // permanently deleted after 30 days. + IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + // Whether a dashboard is a draft. Draft dashboards only appear in list + // views for their owners. + IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + // Indicates whether this query object appears in the current user's + // favorites list. This flag determines whether the star icon for favorites + // is selected. + IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + // The title of the dashboard that appears in list views and at the top of + // the dashboard page. + Name types.String `tfsdk:"name" tf:"optional"` + + Options types.List `tfsdk:"options" tf:"optional,object"` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * + // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query + PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + // URL slug. Usually mirrors the query name with dashes (`-`) instead of + // spaces. Appears in the URL for this query. + Slug types.String `tfsdk:"slug" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // Timestamp when this dashboard was last updated. + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + + User types.List `tfsdk:"user" tf:"optional,object"` + // The ID of the user who owns the dashboard. + UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + + Widgets types.List `tfsdk:"widgets" tf:"optional"` +} + +func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Dashboard_SdkV2) { +} + +func (newState *Dashboard_SdkV2) SyncEffectiveFieldsDuringRead(existingState Dashboard_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Dashboard. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Dashboard_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(DashboardOptions_SdkV2{}), + "tags": reflect.TypeOf(types.String{}), + "user": reflect.TypeOf(User_SdkV2{}), + "widgets": reflect.TypeOf(Widget_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, Dashboard_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Dashboard_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "can_edit": o.CanEdit, + "created_at": o.CreatedAt, + "dashboard_filters_enabled": o.DashboardFiltersEnabled, + "id": o.Id, + "is_archived": o.IsArchived, + "is_draft": o.IsDraft, + "is_favorite": o.IsFavorite, + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "permission_tier": o.PermissionTier, + "slug": o.Slug, + "tags": o.Tags, + "updated_at": o.UpdatedAt, + "user": o.User, + "user_id": o.UserId, + "widgets": o.Widgets, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Dashboard_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "can_edit": types.BoolType, + "created_at": types.StringType, + "dashboard_filters_enabled": types.BoolType, + "id": types.StringType, + "is_archived": types.BoolType, + "is_draft": types.BoolType, + "is_favorite": types.BoolType, + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: DashboardOptions{}.Type(ctx), + }, + "parent": types.StringType, + "permission_tier": types.StringType, + "slug": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "updated_at": types.StringType, + "user": basetypes.ListType{ + ElemType: User{}.Type(ctx), + }, + "user_id": types.Int64Type, + "widgets": basetypes.ListType{ + ElemType: Widget{}.Type(ctx), + }, + }, + } +} + +// GetOptions returns the value of the Options field in Dashboard_SdkV2 as +// a DashboardOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dashboard_SdkV2) GetOptions(ctx context.Context) (DashboardOptions_SdkV2, bool) { + var e DashboardOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []DashboardOptions_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 Dashboard_SdkV2. +func (o *Dashboard_SdkV2) SetOptions(ctx context.Context, v DashboardOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in Dashboard_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Dashboard_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in Dashboard_SdkV2. +func (o *Dashboard_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// GetUser returns the value of the User field in Dashboard_SdkV2 as +// a User_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Dashboard_SdkV2) GetUser(ctx context.Context) (User_SdkV2, bool) { + var e User_SdkV2 + if o.User.IsNull() || o.User.IsUnknown() { + return e, false + } + var v []User_SdkV2 + d := o.User.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUser sets the value of the User field in Dashboard_SdkV2. +func (o *Dashboard_SdkV2) SetUser(ctx context.Context, v User_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] + o.User = types.ListValueMust(t, vs) +} + +// GetWidgets returns the value of the Widgets field in Dashboard_SdkV2 as +// a slice of Widget_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Dashboard_SdkV2) GetWidgets(ctx context.Context) ([]Widget_SdkV2, bool) { + if o.Widgets.IsNull() || o.Widgets.IsUnknown() { + return nil, false + } + var v []Widget_SdkV2 + d := o.Widgets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWidgets sets the value of the Widgets field in Dashboard_SdkV2. +func (o *Dashboard_SdkV2) SetWidgets(ctx context.Context, v []Widget_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["widgets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Widgets = types.ListValueMust(t, vs) +} + +type DashboardEditContent_SdkV2 struct { + DashboardId types.String `tfsdk:"-"` + // The title of this dashboard that appears in list views and at the top of + // the dashboard page. + Name types.String `tfsdk:"name" tf:"optional"` + // Sets the **Run as** role for the object. Must be set to one of `"viewer"` + // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as + // owner" behavior) + RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardEditContent_SdkV2) { +} + +func (newState *DashboardEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardEditContent_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DashboardEditContent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": 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, DashboardEditContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DashboardEditContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "name": o.Name, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DashboardEditContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + "name": types.StringType, + "run_as_role": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetTags returns the value of the Tags field in DashboardEditContent_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DashboardEditContent_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in DashboardEditContent_SdkV2. +func (o *DashboardEditContent_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type DashboardOptions_SdkV2 struct { + // The timestamp when this dashboard was moved to trash. Only present when + // the `is_archived` property is `true`. Trashed items are deleted after + // thirty days. + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` +} + +func (newState *DashboardOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardOptions_SdkV2) { +} + +func (newState *DashboardOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DashboardOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DashboardOptions_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, DashboardOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DashboardOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "moved_to_trash_at": o.MovedToTrashAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DashboardOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "moved_to_trash_at": types.StringType, + }, + } +} + +type DashboardPostContent_SdkV2 struct { + // Indicates whether the dashboard filters are enabled + DashboardFiltersEnabled types.Bool `tfsdk:"dashboard_filters_enabled" tf:"optional"` + // Indicates whether this dashboard object should appear in the current + // user's favorites list. + IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + // The title of this dashboard that appears in list views and at the top of + // the dashboard page. + Name types.String `tfsdk:"name" tf:""` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + // Sets the **Run as** role for the object. Must be set to one of `"viewer"` + // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as + // owner" behavior) + RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DashboardPostContent_SdkV2) { +} + +func (newState *DashboardPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState DashboardPostContent_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DashboardPostContent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": 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, DashboardPostContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DashboardPostContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_filters_enabled": o.DashboardFiltersEnabled, + "is_favorite": o.IsFavorite, + "name": o.Name, + "parent": o.Parent, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DashboardPostContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_filters_enabled": types.BoolType, + "is_favorite": types.BoolType, + "name": types.StringType, + "parent": types.StringType, + "run_as_role": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetTags returns the value of the Tags field in DashboardPostContent_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DashboardPostContent_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in DashboardPostContent_SdkV2. +func (o *DashboardPostContent_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// A JSON object representing a DBSQL data source / SQL warehouse. +type DataSource_SdkV2 struct { + // Data source ID maps to the ID of the data source used by the resource and + // is distinct from the warehouse ID. [Learn more] + // + // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list + Id types.String `tfsdk:"id" tf:"optional"` + // The string name of this data source / SQL warehouse as it appears in the + // Databricks SQL web application. + Name types.String `tfsdk:"name" tf:"optional"` + // Reserved for internal use. + PauseReason types.String `tfsdk:"pause_reason" tf:"optional"` + // Reserved for internal use. + Paused types.Int64 `tfsdk:"paused" tf:"optional"` + // Reserved for internal use. + SupportsAutoLimit types.Bool `tfsdk:"supports_auto_limit" tf:"optional"` + // Reserved for internal use. + Syntax types.String `tfsdk:"syntax" tf:"optional"` + // The type of data source. For SQL warehouses, this will be + // `databricks_internal`. + Type_ types.String `tfsdk:"type" tf:"optional"` + // Reserved for internal use. + ViewOnly types.Bool `tfsdk:"view_only" tf:"optional"` + // The ID of the associated SQL warehouse, if this data source is backed by + // a SQL warehouse. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *DataSource_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DataSource_SdkV2) { +} + +func (newState *DataSource_SdkV2) SyncEffectiveFieldsDuringRead(existingState DataSource_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DataSource. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DataSource_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, DataSource_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DataSource_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "name": o.Name, + "pause_reason": o.PauseReason, + "paused": o.Paused, + "supports_auto_limit": o.SupportsAutoLimit, + "syntax": o.Syntax, + "type": o.Type_, + "view_only": o.ViewOnly, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DataSource_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "name": types.StringType, + "pause_reason": types.StringType, + "paused": types.Int64Type, + "supports_auto_limit": types.BoolType, + "syntax": types.StringType, + "type": types.StringType, + "view_only": types.BoolType, + "warehouse_id": types.StringType, + }, + } +} + +type DateRange_SdkV2 struct { + End types.String `tfsdk:"end" tf:""` + + Start types.String `tfsdk:"start" tf:""` +} + +func (newState *DateRange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateRange_SdkV2) { +} + +func (newState *DateRange_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateRange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DateRange_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, DateRange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DateRange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end": o.End, + "start": o.Start, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DateRange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end": types.StringType, + "start": types.StringType, + }, + } +} + +type DateRangeValue_SdkV2 struct { + // Manually specified date-time range value. + DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + // Dynamic date-time range value based on current date-time. + DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:"optional"` + // Date-time precision to format the value into when the query is run. + // Defaults to DAY_PRECISION (YYYY-MM-DD). + Precision types.String `tfsdk:"precision" tf:"optional"` + + StartDayOfWeek types.Int64 `tfsdk:"start_day_of_week" tf:"optional"` +} + +func (newState *DateRangeValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateRangeValue_SdkV2) { +} + +func (newState *DateRangeValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateRangeValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DateRangeValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DateRangeValue_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "date_range_value": reflect.TypeOf(DateRange_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, DateRangeValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DateRangeValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "date_range_value": o.DateRangeValue, + "dynamic_date_range_value": o.DynamicDateRangeValue, + "precision": o.Precision, + "start_day_of_week": o.StartDayOfWeek, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DateRangeValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "date_range_value": basetypes.ListType{ + ElemType: DateRange{}.Type(ctx), + }, + "dynamic_date_range_value": types.StringType, + "precision": types.StringType, + "start_day_of_week": types.Int64Type, + }, + } +} + +// GetDateRangeValue returns the value of the DateRangeValue field in DateRangeValue_SdkV2 as +// a DateRange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DateRangeValue_SdkV2) GetDateRangeValue(ctx context.Context) (DateRange_SdkV2, bool) { + var e DateRange_SdkV2 + if o.DateRangeValue.IsNull() || o.DateRangeValue.IsUnknown() { + return e, false + } + var v []DateRange_SdkV2 + d := o.DateRangeValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDateRangeValue sets the value of the DateRangeValue field in DateRangeValue_SdkV2. +func (o *DateRangeValue_SdkV2) SetDateRangeValue(ctx context.Context, v DateRange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_range_value"] + o.DateRangeValue = types.ListValueMust(t, vs) +} + +type DateValue_SdkV2 struct { + // Manually specified date-time value. + DateValue types.String `tfsdk:"date_value" tf:"optional"` + // Dynamic date-time value based on current date-time. + DynamicDateValue types.String `tfsdk:"dynamic_date_value" tf:"optional"` + // Date-time precision to format the value into when the query is run. + // Defaults to DAY_PRECISION (YYYY-MM-DD). + Precision types.String `tfsdk:"precision" tf:"optional"` +} + +func (newState *DateValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DateValue_SdkV2) { +} + +func (newState *DateValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState DateValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DateValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DateValue_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, DateValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DateValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "date_value": o.DateValue, + "dynamic_date_value": o.DynamicDateValue, + "precision": o.Precision, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DateValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "date_value": types.StringType, + "dynamic_date_value": types.StringType, + "precision": types.StringType, + }, + } +} + +// Delete an alert +type DeleteAlertsLegacyRequest_SdkV2 struct { + AlertId types.String `tfsdk:"-"` +} + +func (newState *DeleteAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAlertsLegacyRequest_SdkV2) { +} + +func (newState *DeleteAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAlertsLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAlertsLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAlertsLegacyRequest_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, DeleteAlertsLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAlertsLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_id": o.AlertId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAlertsLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_id": types.StringType, + }, + } +} + +// Remove a dashboard +type DeleteDashboardRequest_SdkV2 struct { + DashboardId types.String `tfsdk:"-"` +} + +func (newState *DeleteDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardRequest_SdkV2) { +} + +func (newState *DeleteDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDashboardRequest_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, DeleteDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +// Remove widget +type DeleteDashboardWidgetRequest_SdkV2 struct { + // Widget ID returned by :method:dashboardwidgets/create + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteDashboardWidgetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDashboardWidgetRequest_SdkV2) { +} + +func (newState *DeleteDashboardWidgetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDashboardWidgetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDashboardWidgetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDashboardWidgetRequest_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, DeleteDashboardWidgetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDashboardWidgetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDashboardWidgetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a query +type DeleteQueriesLegacyRequest_SdkV2 struct { + QueryId types.String `tfsdk:"-"` +} + +func (newState *DeleteQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueriesLegacyRequest_SdkV2) { +} + +func (newState *DeleteQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQueriesLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueriesLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteQueriesLegacyRequest_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, DeleteQueriesLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteQueriesLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_id": o.QueryId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_id": types.StringType, + }, + } +} + +// Remove visualization +type DeleteQueryVisualizationsLegacyRequest_SdkV2 struct { + // Widget ID returned by :method:queryvizualisations/create + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteQueryVisualizationsLegacyRequest_SdkV2) { +} + +func (newState *DeleteQueryVisualizationsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteQueryVisualizationsLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteQueryVisualizationsLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteQueryVisualizationsLegacyRequest_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, DeleteQueryVisualizationsLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteQueryVisualizationsLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteQueryVisualizationsLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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{}, + } +} + +// Remove a visualization +type DeleteVisualizationRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteVisualizationRequest_SdkV2) { +} + +func (newState *DeleteVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteVisualizationRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteVisualizationRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteVisualizationRequest_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, DeleteVisualizationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteVisualizationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteVisualizationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a warehouse +type DeleteWarehouseRequest_SdkV2 struct { + // Required. Id of the SQL warehouse. + Id types.String `tfsdk:"-"` +} + +func (newState *DeleteWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWarehouseRequest_SdkV2) { +} + +func (newState *DeleteWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWarehouseRequest_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, DeleteWarehouseRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWarehouseRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type DeleteWarehouseResponse_SdkV2 struct { +} + +func (newState *DeleteWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteWarehouseResponse_SdkV2) { +} + +func (newState *DeleteWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteWarehouseResponse_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, DeleteWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteWarehouseResponse_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 DeleteWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EditAlert_SdkV2 struct { + AlertId types.String `tfsdk:"-"` + // Name of the alert. + Name types.String `tfsdk:"name" tf:""` + // Alert configuration options. + Options types.List `tfsdk:"options" tf:"object"` + // Query ID. + QueryId types.String `tfsdk:"query_id" tf:""` + // Number of seconds after being triggered before the alert rearms itself + // and can be triggered again. If `null`, alert will never be triggered + // again. + Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` +} + +func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditAlert_SdkV2) { +} + +func (newState *EditAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditAlert_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(AlertOptions_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, EditAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_id": o.AlertId, + "name": o.Name, + "options": o.Options, + "query_id": o.QueryId, + "rearm": o.Rearm, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_id": types.StringType, + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: AlertOptions{}.Type(ctx), + }, + "query_id": types.StringType, + "rearm": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in EditAlert_SdkV2 as +// a AlertOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditAlert_SdkV2) GetOptions(ctx context.Context) (AlertOptions_SdkV2, bool) { + var e AlertOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []AlertOptions_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 EditAlert_SdkV2. +func (o *EditAlert_SdkV2) SetOptions(ctx context.Context, v AlertOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +type EditWarehouseRequest_SdkV2 struct { + // The amount of time in minutes that a SQL warehouse must be idle (i.e., no + // RUNNING queries) before it is automatically stopped. + // + // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. + // + // Defaults to 120 mins + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + // Channel Details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Size of the clusters allocated for this warehouse. Increasing the size of + // a spark cluster allows you to run larger queries on it. If you want to + // increase the number of concurrent queries, please tune max_num_clusters. + // + // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large + // - 2X-Large - 3X-Large - 4X-Large + ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + // warehouse creator name + CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + // Configures whether the warehouse should use Photon optimized clusters. + // + // Defaults to false. + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + // Configures whether the warehouse should use serverless compute. + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + // Required. Id of the warehouse to configure. + Id types.String `tfsdk:"-"` + // Deprecated. Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // Maximum number of clusters that the autoscaler will create to handle + // concurrent queries. + // + // Supported values: - Must be >= min_num_clusters - Must be <= 30. + // + // Defaults to min_clusters if unset. + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + // Minimum number of available clusters that will be maintained for this SQL + // warehouse. Increasing this will ensure that a larger number of clusters + // are always running and therefore may reduce the cold start time for new + // queries. This is similar to reserved vs. revocable cores in a resource + // manager. + // + // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) + // + // Defaults to 1 + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + // Logical name for the cluster. + // + // Supported values: - Must be unique within an org. - Must be less than 100 + // characters. + Name types.String `tfsdk:"name" tf:"optional"` + // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + // A set of key-value pairs that will be tagged on all resources (e.g., AWS + // instances and EBS volumes) associated with this SQL warehouse. + // + // Supported values: - Number of tags < 45. + Tags types.List `tfsdk:"tags" tf:"optional,object"` + // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless + // compute, you must set to `PRO` and also set the field + // `enable_serverless_compute` to `true`. + WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` +} + +func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseRequest_SdkV2) { +} + +func (newState *EditWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditWarehouseRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditWarehouseRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "tags": reflect.TypeOf(EndpointTags_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, EditWarehouseRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditWarehouseRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_stop_mins": o.AutoStopMins, + "channel": o.Channel, + "cluster_size": o.ClusterSize, + "creator_name": o.CreatorName, + "enable_photon": o.EnablePhoton, + "enable_serverless_compute": o.EnableServerlessCompute, + "id": o.Id, + "instance_profile_arn": o.InstanceProfileArn, + "max_num_clusters": o.MaxNumClusters, + "min_num_clusters": o.MinNumClusters, + "name": o.Name, + "spot_instance_policy": o.SpotInstancePolicy, + "tags": o.Tags, + "warehouse_type": o.WarehouseType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EditWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_stop_mins": types.Int64Type, + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "cluster_size": types.StringType, + "creator_name": types.StringType, + "enable_photon": types.BoolType, + "enable_serverless_compute": types.BoolType, + "id": types.StringType, + "instance_profile_arn": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "spot_instance_policy": types.StringType, + "tags": basetypes.ListType{ + ElemType: EndpointTags{}.Type(ctx), + }, + "warehouse_type": types.StringType, + }, + } +} + +// GetChannel returns the value of the Channel field in EditWarehouseRequest_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditWarehouseRequest_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in EditWarehouseRequest_SdkV2. +func (o *EditWarehouseRequest_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in EditWarehouseRequest_SdkV2 as +// a EndpointTags_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EditWarehouseRequest_SdkV2) GetTags(ctx context.Context) (EndpointTags_SdkV2, bool) { + var e EndpointTags_SdkV2 + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return e, false + } + var v []EndpointTags_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTags sets the value of the Tags field in EditWarehouseRequest_SdkV2. +func (o *EditWarehouseRequest_SdkV2) SetTags(ctx context.Context, v EndpointTags_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] + o.Tags = types.ListValueMust(t, vs) +} + +type EditWarehouseResponse_SdkV2 struct { +} + +func (newState *EditWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EditWarehouseResponse_SdkV2) { +} + +func (newState *EditWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState EditWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EditWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EditWarehouseResponse_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, EditWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EditWarehouseResponse_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 EditWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Represents an empty message, similar to google.protobuf.Empty, which is not +// available in the firm right now. +type Empty_SdkV2 struct { +} + +func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Empty_SdkV2) { +} + +func (newState *Empty_SdkV2) SyncEffectiveFieldsDuringRead(existingState Empty_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Empty. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Empty_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, Empty_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Empty_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 Empty_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type EndpointConfPair_SdkV2 struct { + Key types.String `tfsdk:"key" tf:"optional"` + + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *EndpointConfPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointConfPair_SdkV2) { +} + +func (newState *EndpointConfPair_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointConfPair_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointConfPair. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointConfPair_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, EndpointConfPair_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointConfPair_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 EndpointConfPair_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type EndpointHealth_SdkV2 struct { + // Details about errors that are causing current degraded/failed status. + Details types.String `tfsdk:"details" tf:"optional"` + // The reason for failure to bring up clusters for this warehouse. This is + // available when status is 'FAILED' and sometimes when it is DEGRADED. + FailureReason types.List `tfsdk:"failure_reason" tf:"optional,object"` + // Deprecated. split into summary and details for security + Message types.String `tfsdk:"message" tf:"optional"` + // Health status of the warehouse. + Status types.String `tfsdk:"status" tf:"optional"` + // A short summary of the health status in case of degraded/failed + // warehouses. + Summary types.String `tfsdk:"summary" tf:"optional"` +} + +func (newState *EndpointHealth_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointHealth_SdkV2) { +} + +func (newState *EndpointHealth_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointHealth_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointHealth. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointHealth_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "failure_reason": reflect.TypeOf(TerminationReason_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, EndpointHealth_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointHealth_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "details": o.Details, + "failure_reason": o.FailureReason, + "message": o.Message, + "status": o.Status, + "summary": o.Summary, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointHealth_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "details": types.StringType, + "failure_reason": basetypes.ListType{ + ElemType: TerminationReason{}.Type(ctx), + }, + "message": types.StringType, + "status": types.StringType, + "summary": types.StringType, + }, + } +} + +// GetFailureReason returns the value of the FailureReason field in EndpointHealth_SdkV2 as +// a TerminationReason_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointHealth_SdkV2) GetFailureReason(ctx context.Context) (TerminationReason_SdkV2, bool) { + var e TerminationReason_SdkV2 + if o.FailureReason.IsNull() || o.FailureReason.IsUnknown() { + return e, false + } + var v []TerminationReason_SdkV2 + d := o.FailureReason.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFailureReason sets the value of the FailureReason field in EndpointHealth_SdkV2. +func (o *EndpointHealth_SdkV2) SetFailureReason(ctx context.Context, v TerminationReason_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["failure_reason"] + o.FailureReason = types.ListValueMust(t, vs) +} + +type EndpointInfo_SdkV2 struct { + // The amount of time in minutes that a SQL warehouse must be idle (i.e., no + // RUNNING queries) before it is automatically stopped. + // + // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. + // + // Defaults to 120 mins + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + // Channel Details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Size of the clusters allocated for this warehouse. Increasing the size of + // a spark cluster allows you to run larger queries on it. If you want to + // increase the number of concurrent queries, please tune max_num_clusters. + // + // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large + // - 2X-Large - 3X-Large - 4X-Large + ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + // warehouse creator name + CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + // Configures whether the warehouse should use Photon optimized clusters. + // + // Defaults to false. + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + // Configures whether the warehouse should use serverless compute + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + // Optional health status. Assume the warehouse is healthy if this field is + // not set. + Health types.List `tfsdk:"health" tf:"optional,object"` + // unique identifier for warehouse + Id types.String `tfsdk:"id" tf:"optional"` + // Deprecated. Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // the jdbc connection string for this warehouse + JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + // Maximum number of clusters that the autoscaler will create to handle + // concurrent queries. + // + // Supported values: - Must be >= min_num_clusters - Must be <= 30. + // + // Defaults to min_clusters if unset. + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + // Minimum number of available clusters that will be maintained for this SQL + // warehouse. Increasing this will ensure that a larger number of clusters + // are always running and therefore may reduce the cold start time for new + // queries. This is similar to reserved vs. revocable cores in a resource + // manager. + // + // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) + // + // Defaults to 1 + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + // Logical name for the cluster. + // + // Supported values: - Must be unique within an org. - Must be less than 100 + // characters. + Name types.String `tfsdk:"name" tf:"optional"` + // current number of active sessions for the warehouse + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + // current number of clusters running for the service + NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + // ODBC parameters for the SQL warehouse + OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + // State of the warehouse + State types.String `tfsdk:"state" tf:"optional"` + // A set of key-value pairs that will be tagged on all resources (e.g., AWS + // instances and EBS volumes) associated with this SQL warehouse. + // + // Supported values: - Number of tags < 45. + Tags types.List `tfsdk:"tags" tf:"optional,object"` + // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless + // compute, you must set to `PRO` and also set the field + // `enable_serverless_compute` to `true`. + WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` +} + +func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo_SdkV2) { +} + +func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "health": reflect.TypeOf(EndpointHealth_SdkV2{}), + "odbc_params": reflect.TypeOf(OdbcParams_SdkV2{}), + "tags": reflect.TypeOf(EndpointTags_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, EndpointInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_stop_mins": o.AutoStopMins, + "channel": o.Channel, + "cluster_size": o.ClusterSize, + "creator_name": o.CreatorName, + "enable_photon": o.EnablePhoton, + "enable_serverless_compute": o.EnableServerlessCompute, + "health": o.Health, + "id": o.Id, + "instance_profile_arn": o.InstanceProfileArn, + "jdbc_url": o.JdbcUrl, + "max_num_clusters": o.MaxNumClusters, + "min_num_clusters": o.MinNumClusters, + "name": o.Name, + "num_active_sessions": o.NumActiveSessions, + "num_clusters": o.NumClusters, + "odbc_params": o.OdbcParams, + "spot_instance_policy": o.SpotInstancePolicy, + "state": o.State, + "tags": o.Tags, + "warehouse_type": o.WarehouseType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_stop_mins": types.Int64Type, + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "cluster_size": types.StringType, + "creator_name": types.StringType, + "enable_photon": types.BoolType, + "enable_serverless_compute": types.BoolType, + "health": basetypes.ListType{ + ElemType: EndpointHealth{}.Type(ctx), + }, + "id": types.StringType, + "instance_profile_arn": types.StringType, + "jdbc_url": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "num_active_sessions": types.Int64Type, + "num_clusters": types.Int64Type, + "odbc_params": basetypes.ListType{ + ElemType: OdbcParams{}.Type(ctx), + }, + "spot_instance_policy": types.StringType, + "state": types.StringType, + "tags": basetypes.ListType{ + ElemType: EndpointTags{}.Type(ctx), + }, + "warehouse_type": types.StringType, + }, + } +} + +// GetChannel returns the value of the Channel field in EndpointInfo_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointInfo_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in EndpointInfo_SdkV2. +func (o *EndpointInfo_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in EndpointInfo_SdkV2 as +// a EndpointHealth_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointInfo_SdkV2) GetHealth(ctx context.Context) (EndpointHealth_SdkV2, bool) { + var e EndpointHealth_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []EndpointHealth_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in EndpointInfo_SdkV2. +func (o *EndpointInfo_SdkV2) SetHealth(ctx context.Context, v EndpointHealth_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetOdbcParams returns the value of the OdbcParams field in EndpointInfo_SdkV2 as +// a OdbcParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointInfo_SdkV2) GetOdbcParams(ctx context.Context) (OdbcParams_SdkV2, bool) { + var e OdbcParams_SdkV2 + if o.OdbcParams.IsNull() || o.OdbcParams.IsUnknown() { + return e, false + } + var v []OdbcParams_SdkV2 + d := o.OdbcParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOdbcParams sets the value of the OdbcParams field in EndpointInfo_SdkV2. +func (o *EndpointInfo_SdkV2) SetOdbcParams(ctx context.Context, v OdbcParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["odbc_params"] + o.OdbcParams = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in EndpointInfo_SdkV2 as +// a EndpointTags_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointInfo_SdkV2) GetTags(ctx context.Context) (EndpointTags_SdkV2, bool) { + var e EndpointTags_SdkV2 + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return e, false + } + var v []EndpointTags_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTags sets the value of the Tags field in EndpointInfo_SdkV2. +func (o *EndpointInfo_SdkV2) SetTags(ctx context.Context, v EndpointTags_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] + o.Tags = types.ListValueMust(t, vs) +} + +type EndpointTagPair_SdkV2 struct { + Key types.String `tfsdk:"key" tf:"optional"` + + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *EndpointTagPair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTagPair_SdkV2) { +} + +func (newState *EndpointTagPair_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTagPair_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTagPair. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointTagPair_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, EndpointTagPair_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointTagPair_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 EndpointTagPair_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +type EndpointTags_SdkV2 struct { + CustomTags types.List `tfsdk:"custom_tags" tf:"optional"` +} + +func (newState *EndpointTags_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointTags_SdkV2) { +} + +func (newState *EndpointTags_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointTags_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointTags. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointTags_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "custom_tags": reflect.TypeOf(EndpointTagPair_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, EndpointTags_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointTags_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "custom_tags": o.CustomTags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointTags_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "custom_tags": basetypes.ListType{ + ElemType: EndpointTagPair{}.Type(ctx), + }, + }, + } +} + +// GetCustomTags returns the value of the CustomTags field in EndpointTags_SdkV2 as +// a slice of EndpointTagPair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointTags_SdkV2) GetCustomTags(ctx context.Context) ([]EndpointTagPair_SdkV2, bool) { + if o.CustomTags.IsNull() || o.CustomTags.IsUnknown() { + return nil, false + } + var v []EndpointTagPair_SdkV2 + d := o.CustomTags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCustomTags sets the value of the CustomTags field in EndpointTags_SdkV2. +func (o *EndpointTags_SdkV2) SetCustomTags(ctx context.Context, v []EndpointTagPair_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["custom_tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.CustomTags = types.ListValueMust(t, vs) +} + +type EnumValue_SdkV2 struct { + // List of valid query parameter values, newline delimited. + EnumOptions types.String `tfsdk:"enum_options" tf:"optional"` + // If specified, allows multiple values to be selected for this parameter. + MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + // List of selected query parameter values. + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *EnumValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EnumValue_SdkV2) { +} + +func (newState *EnumValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState EnumValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EnumValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EnumValue_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "multi_values_options": reflect.TypeOf(MultiValuesOptions_SdkV2{}), + "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, EnumValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EnumValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enum_options": o.EnumOptions, + "multi_values_options": o.MultiValuesOptions, + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EnumValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enum_options": types.StringType, + "multi_values_options": basetypes.ListType{ + ElemType: MultiValuesOptions{}.Type(ctx), + }, + "values": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetMultiValuesOptions returns the value of the MultiValuesOptions field in EnumValue_SdkV2 as +// a MultiValuesOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EnumValue_SdkV2) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptions_SdkV2, bool) { + var e MultiValuesOptions_SdkV2 + if o.MultiValuesOptions.IsNull() || o.MultiValuesOptions.IsUnknown() { + return e, false + } + var v []MultiValuesOptions_SdkV2 + d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMultiValuesOptions sets the value of the MultiValuesOptions field in EnumValue_SdkV2. +func (o *EnumValue_SdkV2) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multi_values_options"] + o.MultiValuesOptions = types.ListValueMust(t, vs) +} + +// GetValues returns the value of the Values field in EnumValue_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *EnumValue_SdkV2) GetValues(ctx context.Context) ([]types.String, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in EnumValue_SdkV2. +func (o *EnumValue_SdkV2) SetValues(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["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type ExecuteStatementRequest_SdkV2 struct { + // Applies the given byte limit to the statement's result size. Byte counts + // are based on internal data representations and might not match the final + // size in the requested `format`. If the result was truncated due to the + // byte limit, then `truncated` in the response is set to `true`. When using + // `EXTERNAL_LINKS` disposition, a default `byte_limit` of 100 GiB is + // applied if `byte_limit` is not explcitly set. + ByteLimit types.Int64 `tfsdk:"byte_limit" tf:"optional"` + // Sets default catalog for statement execution, similar to [`USE CATALOG`] + // in SQL. + // + // [`USE CATALOG`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-catalog.html + Catalog types.String `tfsdk:"catalog" tf:"optional"` + + Disposition types.String `tfsdk:"disposition" tf:"optional"` + // Statement execution supports three result formats: `JSON_ARRAY` + // (default), `ARROW_STREAM`, and `CSV`. + // + // Important: The formats `ARROW_STREAM` and `CSV` are supported only with + // `EXTERNAL_LINKS` disposition. `JSON_ARRAY` is supported in `INLINE` and + // `EXTERNAL_LINKS` disposition. + // + // When specifying `format=JSON_ARRAY`, result data will be formatted as an + // array of arrays of values, where each value is either the *string + // representation* of a value, or `null`. For example, the output of `SELECT + // concat('id-', id) AS strCol, id AS intCol, null AS nullCol FROM range(3)` + // would look like this: + // + // ``` [ [ "id-1", "1", null ], [ "id-2", "2", null ], [ "id-3", "3", null + // ], ] ``` + // + // When specifying `format=JSON_ARRAY` and `disposition=EXTERNAL_LINKS`, + // each chunk in the result contains compact JSON with no indentation or + // extra whitespace. + // + // When specifying `format=ARROW_STREAM` and `disposition=EXTERNAL_LINKS`, + // each chunk in the result will be formatted as Apache Arrow Stream. See + // the [Apache Arrow streaming format]. + // + // When specifying `format=CSV` and `disposition=EXTERNAL_LINKS`, each chunk + // in the result will be a CSV according to [RFC 4180] standard. All the + // columns values will have *string representation* similar to the + // `JSON_ARRAY` format, and `null` values will be encoded as “null”. + // Only the first chunk in the result would contain a header row with column + // names. For example, the output of `SELECT concat('id-', id) AS strCol, id + // AS intCol, null as nullCol FROM range(3)` would look like this: + // + // ``` strCol,intCol,nullCol id-1,1,null id-2,2,null id-3,3,null ``` + // + // [Apache Arrow streaming format]: https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format + // [RFC 4180]: https://www.rfc-editor.org/rfc/rfc4180 + Format types.String `tfsdk:"format" tf:"optional"` + // When `wait_timeout > 0s`, the call will block up to the specified time. + // If the statement execution doesn't finish within this time, + // `on_wait_timeout` determines whether the execution should continue or be + // canceled. When set to `CONTINUE`, the statement execution continues + // asynchronously and the call returns a statement ID which can be used for + // polling with :method:statementexecution/getStatement. When set to + // `CANCEL`, the statement execution is canceled and the call returns with a + // `CANCELED` state. + OnWaitTimeout types.String `tfsdk:"on_wait_timeout" tf:"optional"` + // A list of parameters to pass into a SQL statement containing parameter + // markers. A parameter consists of a name, a value, and optionally a type. + // To represent a NULL value, the `value` field may be omitted or set to + // `null` explicitly. If the `type` field is omitted, the value is + // interpreted as a string. + // + // If the type is given, parameters will be checked for type correctness + // according to the given type. A value is correct if the provided string + // can be converted to the requested type using the `cast` function. The + // exact semantics are described in the section [`cast` function] of the SQL + // language reference. + // + // For example, the following statement contains two parameters, `my_name` + // and `my_date`: + // + // SELECT * FROM my_table WHERE name = :my_name AND date = :my_date + // + // The parameters can be passed in the request body as follows: + // + // { ..., "statement": "SELECT * FROM my_table WHERE name = :my_name AND + // date = :my_date", "parameters": [ { "name": "my_name", "value": "the + // name" }, { "name": "my_date", "value": "2020-01-01", "type": "DATE" } ] } + // + // Currently, positional parameters denoted by a `?` marker are not + // supported by the Databricks SQL Statement Execution API. + // + // Also see the section [Parameter markers] of the SQL language reference. + // + // [Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html + // [`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // Applies the given row limit to the statement's result set, but unlike the + // `LIMIT` clause in SQL, it also sets the `truncated` field in the response + // to indicate whether the result was trimmed due to the limit or not. + RowLimit types.Int64 `tfsdk:"row_limit" tf:"optional"` + // Sets default schema for statement execution, similar to [`USE SCHEMA`] in + // SQL. + // + // [`USE SCHEMA`]: https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-use-schema.html + Schema types.String `tfsdk:"schema" tf:"optional"` + // The SQL statement to execute. The statement can optionally be + // parameterized, see `parameters`. + Statement types.String `tfsdk:"statement" tf:""` + // The time in seconds the call will wait for the statement's result set as + // `Ns`, where `N` can be set to 0 or to a value between 5 and 50. + // + // When set to `0s`, the statement will execute in asynchronous mode and the + // call will not wait for the execution to finish. In this case, the call + // returns directly with `PENDING` state and a statement ID which can be + // used for polling with :method:statementexecution/getStatement. + // + // When set between 5 and 50 seconds, the call will behave synchronously up + // to this timeout and wait for the statement execution to finish. If the + // execution finishes within this time, the call returns immediately with a + // manifest and result data (or a `FAILED` state in case of an execution + // error). If the statement takes longer to execute, `on_wait_timeout` + // determines what should happen after the timeout is reached. + WaitTimeout types.String `tfsdk:"wait_timeout" tf:"optional"` + // Warehouse upon which to execute a statement. See also [What are SQL + // warehouses?] + // + // [What are SQL warehouses?]: https://docs.databricks.com/sql/admin/warehouse-type.html + WarehouseId types.String `tfsdk:"warehouse_id" tf:""` +} + +func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExecuteStatementRequest_SdkV2) { +} + +func (newState *ExecuteStatementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExecuteStatementRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExecuteStatementRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(StatementParameterListItem_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, ExecuteStatementRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExecuteStatementRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "byte_limit": o.ByteLimit, + "catalog": o.Catalog, + "disposition": o.Disposition, + "format": o.Format, + "on_wait_timeout": o.OnWaitTimeout, + "parameters": o.Parameters, + "row_limit": o.RowLimit, + "schema": o.Schema, + "statement": o.Statement, + "wait_timeout": o.WaitTimeout, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExecuteStatementRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "byte_limit": types.Int64Type, + "catalog": types.StringType, + "disposition": types.StringType, + "format": types.StringType, + "on_wait_timeout": types.StringType, + "parameters": basetypes.ListType{ + ElemType: StatementParameterListItem{}.Type(ctx), + }, + "row_limit": types.Int64Type, + "schema": types.StringType, + "statement": types.StringType, + "wait_timeout": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in ExecuteStatementRequest_SdkV2 as +// a slice of StatementParameterListItem_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ExecuteStatementRequest_SdkV2) GetParameters(ctx context.Context) ([]StatementParameterListItem_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []StatementParameterListItem_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ExecuteStatementRequest_SdkV2. +func (o *ExecuteStatementRequest_SdkV2) SetParameters(ctx context.Context, v []StatementParameterListItem_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type ExternalLink_SdkV2 struct { + // The number of bytes in the result chunk. This field is not available when + // using `INLINE` disposition. + ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + // The position within the sequence of result set chunks. + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + // Indicates the date-time that the given external link will expire and + // becomes invalid, after which point a new `external_link` must be + // requested. + Expiration types.String `tfsdk:"expiration" tf:"optional"` + + ExternalLink types.String `tfsdk:"external_link" tf:"optional"` + // HTTP headers that must be included with a GET request to the + // `external_link`. Each header is provided as a key-value pair. Headers are + // typically used to pass a decryption key to the external service. The + // values of these headers should be considered sensitive and the client + // should not expose these values in a log. + HttpHeaders types.Map `tfsdk:"http_headers" tf:"optional"` + // When fetching, provides the `chunk_index` for the _next_ chunk. If + // absent, indicates there are no more chunks. The next chunk can be fetched + // with a :method:statementexecution/getStatementResultChunkN request. + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + // When fetching, provides a link to fetch the _next_ chunk. If absent, + // indicates there are no more chunks. This link is an absolute `path` to be + // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque + // link. This is an alternative to using `next_chunk_index`. + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + // The number of rows within the result chunk. + RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + // The starting row offset within the result set. + RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` +} + +func (newState *ExternalLink_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExternalLink_SdkV2) { +} + +func (newState *ExternalLink_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExternalLink_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExternalLink. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExternalLink_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "http_headers": 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, ExternalLink_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExternalLink_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "byte_count": o.ByteCount, + "chunk_index": o.ChunkIndex, + "expiration": o.Expiration, + "external_link": o.ExternalLink, + "http_headers": o.HttpHeaders, + "next_chunk_index": o.NextChunkIndex, + "next_chunk_internal_link": o.NextChunkInternalLink, + "row_count": o.RowCount, + "row_offset": o.RowOffset, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExternalLink_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "byte_count": types.Int64Type, + "chunk_index": types.Int64Type, + "expiration": types.StringType, + "external_link": types.StringType, + "http_headers": basetypes.MapType{ + ElemType: types.StringType, + }, + "next_chunk_index": types.Int64Type, + "next_chunk_internal_link": types.StringType, + "row_count": types.Int64Type, + "row_offset": types.Int64Type, + }, + } +} + +// GetHttpHeaders returns the value of the HttpHeaders field in ExternalLink_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 *ExternalLink_SdkV2) GetHttpHeaders(ctx context.Context) (map[string]types.String, bool) { + if o.HttpHeaders.IsNull() || o.HttpHeaders.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.HttpHeaders.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetHttpHeaders sets the value of the HttpHeaders field in ExternalLink_SdkV2. +func (o *ExternalLink_SdkV2) SetHttpHeaders(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["http_headers"] + t = t.(attr.TypeWithElementType).ElementType() + o.HttpHeaders = types.MapValueMust(t, vs) +} + +// Get an alert +type GetAlertRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertRequest_SdkV2) { +} + +func (newState *GetAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAlertRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAlertRequest_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, GetAlertRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAlertRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Get an alert +type GetAlertsLegacyRequest_SdkV2 struct { + AlertId types.String `tfsdk:"-"` +} + +func (newState *GetAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAlertsLegacyRequest_SdkV2) { +} + +func (newState *GetAlertsLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAlertsLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAlertsLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAlertsLegacyRequest_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, GetAlertsLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAlertsLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert_id": o.AlertId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAlertsLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert_id": types.StringType, + }, + } +} + +// Retrieve a definition +type GetDashboardRequest_SdkV2 struct { + DashboardId types.String `tfsdk:"-"` +} + +func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDashboardRequest_SdkV2) { +} + +func (newState *GetDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDashboardRequest_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, GetDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +// Get object ACL +type GetDbsqlPermissionRequest_SdkV2 struct { + // Object ID. An ACL is returned for the object with this UUID. + ObjectId types.String `tfsdk:"-"` + // The type of object permissions to check. + ObjectType types.String `tfsdk:"-"` +} + +func (newState *GetDbsqlPermissionRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetDbsqlPermissionRequest_SdkV2) { +} + +func (newState *GetDbsqlPermissionRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetDbsqlPermissionRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetDbsqlPermissionRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetDbsqlPermissionRequest_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, GetDbsqlPermissionRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetDbsqlPermissionRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "objectId": o.ObjectId, + "objectType": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetDbsqlPermissionRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "objectId": types.StringType, + "objectType": types.StringType, + }, + } +} + +// Get a query definition. +type GetQueriesLegacyRequest_SdkV2 struct { + QueryId types.String `tfsdk:"-"` +} + +func (newState *GetQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueriesLegacyRequest_SdkV2) { +} + +func (newState *GetQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQueriesLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueriesLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetQueriesLegacyRequest_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, GetQueriesLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetQueriesLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_id": o.QueryId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_id": types.StringType, + }, + } +} + +// Get a query +type GetQueryRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *GetQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetQueryRequest_SdkV2) { +} + +func (newState *GetQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetQueryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetQueryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetQueryRequest_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, GetQueryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetResponse_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // An object's type and UUID, separated by a forward slash (/) character. + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + // A singular noun object type. + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *GetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetResponse_SdkV2) { +} + +func (newState *GetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AccessControl_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, GetResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AccessControl{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in GetResponse_SdkV2 as +// a slice of AccessControl_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetResponse_SdkV2) GetAccessControlList(ctx context.Context) ([]AccessControl_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AccessControl_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in GetResponse_SdkV2. +func (o *GetResponse_SdkV2) SetAccessControlList(ctx context.Context, v []AccessControl_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +// Get status, manifest, and result first chunk +type GetStatementRequest_SdkV2 struct { + // The statement ID is returned upon successfully submitting a SQL + // statement, and is a required reference for all subsequent calls. + StatementId types.String `tfsdk:"-"` +} + +func (newState *GetStatementRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementRequest_SdkV2) { +} + +func (newState *GetStatementRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatementRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStatementRequest_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, GetStatementRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStatementRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "statement_id": o.StatementId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStatementRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "statement_id": types.StringType, + }, + } +} + +// Get result chunk by index +type GetStatementResultChunkNRequest_SdkV2 struct { + ChunkIndex types.Int64 `tfsdk:"-"` + // The statement ID is returned upon successfully submitting a SQL + // statement, and is a required reference for all subsequent calls. + StatementId types.String `tfsdk:"-"` +} + +func (newState *GetStatementResultChunkNRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatementResultChunkNRequest_SdkV2) { +} + +func (newState *GetStatementResultChunkNRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatementResultChunkNRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatementResultChunkNRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStatementResultChunkNRequest_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, GetStatementResultChunkNRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStatementResultChunkNRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "chunk_index": o.ChunkIndex, + "statement_id": o.StatementId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStatementResultChunkNRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "chunk_index": types.Int64Type, + "statement_id": types.StringType, + }, + } +} + +// Get SQL warehouse permission levels +type GetWarehousePermissionLevelsRequest_SdkV2 struct { + // The SQL warehouse for which to get or manage permissions. + WarehouseId types.String `tfsdk:"-"` +} + +func (newState *GetWarehousePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsRequest_SdkV2) { +} + +func (newState *GetWarehousePermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWarehousePermissionLevelsRequest_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, GetWarehousePermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWarehousePermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "warehouse_id": types.StringType, + }, + } +} + +type GetWarehousePermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetWarehousePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionLevelsResponse_SdkV2) { +} + +func (newState *GetWarehousePermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWarehousePermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(WarehousePermissionsDescription_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, GetWarehousePermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWarehousePermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: WarehousePermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetWarehousePermissionLevelsResponse_SdkV2 as +// a slice of WarehousePermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWarehousePermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]WarehousePermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []WarehousePermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetWarehousePermissionLevelsResponse_SdkV2. +func (o *GetWarehousePermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []WarehousePermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get SQL warehouse permissions +type GetWarehousePermissionsRequest_SdkV2 struct { + // The SQL warehouse for which to get or manage permissions. + WarehouseId types.String `tfsdk:"-"` +} + +func (newState *GetWarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehousePermissionsRequest_SdkV2) { +} + +func (newState *GetWarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehousePermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehousePermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWarehousePermissionsRequest_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, GetWarehousePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWarehousePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "warehouse_id": types.StringType, + }, + } +} + +// Get warehouse info +type GetWarehouseRequest_SdkV2 struct { + // Required. Id of the SQL warehouse. + Id types.String `tfsdk:"-"` +} + +func (newState *GetWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseRequest_SdkV2) { +} + +func (newState *GetWarehouseRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehouseRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWarehouseRequest_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, GetWarehouseRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWarehouseRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type GetWarehouseResponse_SdkV2 struct { + // The amount of time in minutes that a SQL warehouse must be idle (i.e., no + // RUNNING queries) before it is automatically stopped. + // + // Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. + // + // Defaults to 120 mins + AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` + // Channel Details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Size of the clusters allocated for this warehouse. Increasing the size of + // a spark cluster allows you to run larger queries on it. If you want to + // increase the number of concurrent queries, please tune max_num_clusters. + // + // Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large + // - 2X-Large - 3X-Large - 4X-Large + ClusterSize types.String `tfsdk:"cluster_size" tf:"optional"` + // warehouse creator name + CreatorName types.String `tfsdk:"creator_name" tf:"optional"` + // Configures whether the warehouse should use Photon optimized clusters. + // + // Defaults to false. + EnablePhoton types.Bool `tfsdk:"enable_photon" tf:"optional"` + // Configures whether the warehouse should use serverless compute + EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` + // Optional health status. Assume the warehouse is healthy if this field is + // not set. + Health types.List `tfsdk:"health" tf:"optional,object"` + // unique identifier for warehouse + Id types.String `tfsdk:"id" tf:"optional"` + // Deprecated. Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // the jdbc connection string for this warehouse + JdbcUrl types.String `tfsdk:"jdbc_url" tf:"optional"` + // Maximum number of clusters that the autoscaler will create to handle + // concurrent queries. + // + // Supported values: - Must be >= min_num_clusters - Must be <= 30. + // + // Defaults to min_clusters if unset. + MaxNumClusters types.Int64 `tfsdk:"max_num_clusters" tf:"optional"` + // Minimum number of available clusters that will be maintained for this SQL + // warehouse. Increasing this will ensure that a larger number of clusters + // are always running and therefore may reduce the cold start time for new + // queries. This is similar to reserved vs. revocable cores in a resource + // manager. + // + // Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) + // + // Defaults to 1 + MinNumClusters types.Int64 `tfsdk:"min_num_clusters" tf:"optional"` + // Logical name for the cluster. + // + // Supported values: - Must be unique within an org. - Must be less than 100 + // characters. + Name types.String `tfsdk:"name" tf:"optional"` + // current number of active sessions for the warehouse + NumActiveSessions types.Int64 `tfsdk:"num_active_sessions" tf:"optional"` + // current number of clusters running for the service + NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` + // ODBC parameters for the SQL warehouse + OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + // Configurations whether the warehouse should use spot instances. + SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` + // State of the warehouse + State types.String `tfsdk:"state" tf:"optional"` + // A set of key-value pairs that will be tagged on all resources (e.g., AWS + // instances and EBS volumes) associated with this SQL warehouse. + // + // Supported values: - Number of tags < 45. + Tags types.List `tfsdk:"tags" tf:"optional,object"` + // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless + // compute, you must set to `PRO` and also set the field + // `enable_serverless_compute` to `true`. + WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` +} + +func (newState *GetWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWarehouseResponse_SdkV2) { +} + +func (newState *GetWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWarehouseResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "health": reflect.TypeOf(EndpointHealth_SdkV2{}), + "odbc_params": reflect.TypeOf(OdbcParams_SdkV2{}), + "tags": reflect.TypeOf(EndpointTags_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, GetWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWarehouseResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "auto_stop_mins": o.AutoStopMins, + "channel": o.Channel, + "cluster_size": o.ClusterSize, + "creator_name": o.CreatorName, + "enable_photon": o.EnablePhoton, + "enable_serverless_compute": o.EnableServerlessCompute, + "health": o.Health, + "id": o.Id, + "instance_profile_arn": o.InstanceProfileArn, + "jdbc_url": o.JdbcUrl, + "max_num_clusters": o.MaxNumClusters, + "min_num_clusters": o.MinNumClusters, + "name": o.Name, + "num_active_sessions": o.NumActiveSessions, + "num_clusters": o.NumClusters, + "odbc_params": o.OdbcParams, + "spot_instance_policy": o.SpotInstancePolicy, + "state": o.State, + "tags": o.Tags, + "warehouse_type": o.WarehouseType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "auto_stop_mins": types.Int64Type, + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "cluster_size": types.StringType, + "creator_name": types.StringType, + "enable_photon": types.BoolType, + "enable_serverless_compute": types.BoolType, + "health": basetypes.ListType{ + ElemType: EndpointHealth{}.Type(ctx), + }, + "id": types.StringType, + "instance_profile_arn": types.StringType, + "jdbc_url": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "num_active_sessions": types.Int64Type, + "num_clusters": types.Int64Type, + "odbc_params": basetypes.ListType{ + ElemType: OdbcParams{}.Type(ctx), + }, + "spot_instance_policy": types.StringType, + "state": types.StringType, + "tags": basetypes.ListType{ + ElemType: EndpointTags{}.Type(ctx), + }, + "warehouse_type": types.StringType, + }, + } +} + +// GetChannel returns the value of the Channel field in GetWarehouseResponse_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWarehouseResponse_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in GetWarehouseResponse_SdkV2. +func (o *GetWarehouseResponse_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetHealth returns the value of the Health field in GetWarehouseResponse_SdkV2 as +// a EndpointHealth_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWarehouseResponse_SdkV2) GetHealth(ctx context.Context) (EndpointHealth_SdkV2, bool) { + var e EndpointHealth_SdkV2 + if o.Health.IsNull() || o.Health.IsUnknown() { + return e, false + } + var v []EndpointHealth_SdkV2 + d := o.Health.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetHealth sets the value of the Health field in GetWarehouseResponse_SdkV2. +func (o *GetWarehouseResponse_SdkV2) SetHealth(ctx context.Context, v EndpointHealth_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] + o.Health = types.ListValueMust(t, vs) +} + +// GetOdbcParams returns the value of the OdbcParams field in GetWarehouseResponse_SdkV2 as +// a OdbcParams_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWarehouseResponse_SdkV2) GetOdbcParams(ctx context.Context) (OdbcParams_SdkV2, bool) { + var e OdbcParams_SdkV2 + if o.OdbcParams.IsNull() || o.OdbcParams.IsUnknown() { + return e, false + } + var v []OdbcParams_SdkV2 + d := o.OdbcParams.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOdbcParams sets the value of the OdbcParams field in GetWarehouseResponse_SdkV2. +func (o *GetWarehouseResponse_SdkV2) SetOdbcParams(ctx context.Context, v OdbcParams_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["odbc_params"] + o.OdbcParams = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in GetWarehouseResponse_SdkV2 as +// a EndpointTags_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWarehouseResponse_SdkV2) GetTags(ctx context.Context) (EndpointTags_SdkV2, bool) { + var e EndpointTags_SdkV2 + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return e, false + } + var v []EndpointTags_SdkV2 + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTags sets the value of the Tags field in GetWarehouseResponse_SdkV2. +func (o *GetWarehouseResponse_SdkV2) SetTags(ctx context.Context, v EndpointTags_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] + o.Tags = types.ListValueMust(t, vs) +} + +type GetWorkspaceWarehouseConfigResponse_SdkV2 struct { + // Optional: Channel selection details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Deprecated: Use sql_configuration_parameters + ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + // Spark confs for external hive metastore configuration JSON serialized + // size must be less than <= 512K + DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + // List of Warehouse Types allowed in this workspace (limits allowed value + // of the type field in CreateWarehouse and EditWarehouse). Note: Some types + // cannot be disabled, they don't need to be specified in + // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing + // warehouses to be converted to another type. Used by frontend to save + // specific type availability in the warehouse create and edit form UI. + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + // Deprecated: Use sql_configuration_parameters + GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + // GCP only: Google Service Account used to pass to cluster to access Google + // Cloud Storage + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + // AWS Only: Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // Security policy for warehouses + SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + // SQL configuration parameters + SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` +} + +func (newState *GetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceWarehouseConfigResponse_SdkV2) { +} + +func (newState *GetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceWarehouseConfigResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceWarehouseConfigResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceWarehouseConfigResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "config_param": reflect.TypeOf(RepeatedEndpointConfPairs_SdkV2{}), + "data_access_config": reflect.TypeOf(EndpointConfPair_SdkV2{}), + "enabled_warehouse_types": reflect.TypeOf(WarehouseTypePair_SdkV2{}), + "global_param": reflect.TypeOf(RepeatedEndpointConfPairs_SdkV2{}), + "sql_configuration_parameters": reflect.TypeOf(RepeatedEndpointConfPairs_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, GetWorkspaceWarehouseConfigResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceWarehouseConfigResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "channel": o.Channel, + "config_param": o.ConfigParam, + "data_access_config": o.DataAccessConfig, + "enabled_warehouse_types": o.EnabledWarehouseTypes, + "global_param": o.GlobalParam, + "google_service_account": o.GoogleServiceAccount, + "instance_profile_arn": o.InstanceProfileArn, + "security_policy": o.SecurityPolicy, + "sql_configuration_parameters": o.SqlConfigurationParameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceWarehouseConfigResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "config_param": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + "data_access_config": basetypes.ListType{ + ElemType: EndpointConfPair{}.Type(ctx), + }, + "enabled_warehouse_types": basetypes.ListType{ + ElemType: WarehouseTypePair{}.Type(ctx), + }, + "global_param": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + "google_service_account": types.StringType, + "instance_profile_arn": types.StringType, + "security_policy": types.StringType, + "sql_configuration_parameters": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + }, + } +} + +// GetChannel returns the value of the Channel field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetConfigParam returns the value of the ConfigParam field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetConfigParam(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.ConfigParam.IsNull() || o.ConfigParam.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.ConfigParam.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfigParam sets the value of the ConfigParam field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetConfigParam(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config_param"] + o.ConfigParam = types.ListValueMust(t, vs) +} + +// GetDataAccessConfig returns the value of the DataAccessConfig field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a slice of EndpointConfPair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetDataAccessConfig(ctx context.Context) ([]EndpointConfPair_SdkV2, bool) { + if o.DataAccessConfig.IsNull() || o.DataAccessConfig.IsUnknown() { + return nil, false + } + var v []EndpointConfPair_SdkV2 + d := o.DataAccessConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataAccessConfig sets the value of the DataAccessConfig field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetDataAccessConfig(ctx context.Context, v []EndpointConfPair_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["data_access_config"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataAccessConfig = types.ListValueMust(t, vs) +} + +// GetEnabledWarehouseTypes returns the value of the EnabledWarehouseTypes field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a slice of WarehouseTypePair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetEnabledWarehouseTypes(ctx context.Context) ([]WarehouseTypePair_SdkV2, bool) { + if o.EnabledWarehouseTypes.IsNull() || o.EnabledWarehouseTypes.IsUnknown() { + return nil, false + } + var v []WarehouseTypePair_SdkV2 + d := o.EnabledWarehouseTypes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnabledWarehouseTypes sets the value of the EnabledWarehouseTypes field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetEnabledWarehouseTypes(ctx context.Context, v []WarehouseTypePair_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["enabled_warehouse_types"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnabledWarehouseTypes = types.ListValueMust(t, vs) +} + +// GetGlobalParam returns the value of the GlobalParam field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetGlobalParam(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.GlobalParam.IsNull() || o.GlobalParam.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.GlobalParam.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGlobalParam sets the value of the GlobalParam field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetGlobalParam(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["global_param"] + o.GlobalParam = types.ListValueMust(t, vs) +} + +// GetSqlConfigurationParameters returns the value of the SqlConfigurationParameters field in GetWorkspaceWarehouseConfigResponse_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) GetSqlConfigurationParameters(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.SqlConfigurationParameters.IsNull() || o.SqlConfigurationParameters.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.SqlConfigurationParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlConfigurationParameters sets the value of the SqlConfigurationParameters field in GetWorkspaceWarehouseConfigResponse_SdkV2. +func (o *GetWorkspaceWarehouseConfigResponse_SdkV2) SetSqlConfigurationParameters(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_configuration_parameters"] + o.SqlConfigurationParameters = types.ListValueMust(t, vs) +} + +type LegacyAlert_SdkV2 struct { + // Timestamp when the alert was created. + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // Alert ID. + Id types.String `tfsdk:"id" tf:"optional"` + // Timestamp when the alert was last triggered. + LastTriggeredAt types.String `tfsdk:"last_triggered_at" tf:"optional"` + // Name of the alert. + Name types.String `tfsdk:"name" tf:"optional"` + // Alert configuration options. + Options types.List `tfsdk:"options" tf:"optional,object"` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + + Query types.List `tfsdk:"query" tf:"optional,object"` + // Number of seconds after being triggered before the alert rearms itself + // and can be triggered again. If `null`, alert will never be triggered + // again. + Rearm types.Int64 `tfsdk:"rearm" tf:"optional"` + // State of the alert. Possible values are: `unknown` (yet to be evaluated), + // `triggered` (evaluated and fulfilled trigger conditions), or `ok` + // (evaluated and did not fulfill trigger conditions). + State types.String `tfsdk:"state" tf:"optional"` + // Timestamp when the alert was last updated. + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + + User types.List `tfsdk:"user" tf:"optional,object"` +} + +func (newState *LegacyAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyAlert_SdkV2) { +} + +func (newState *LegacyAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyAlert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyAlert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LegacyAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(AlertOptions_SdkV2{}), + "query": reflect.TypeOf(AlertQuery_SdkV2{}), + "user": reflect.TypeOf(User_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, LegacyAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LegacyAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "id": o.Id, + "last_triggered_at": o.LastTriggeredAt, + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "query": o.Query, + "rearm": o.Rearm, + "state": o.State, + "updated_at": o.UpdatedAt, + "user": o.User, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LegacyAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.StringType, + "id": types.StringType, + "last_triggered_at": types.StringType, + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: AlertOptions{}.Type(ctx), + }, + "parent": types.StringType, + "query": basetypes.ListType{ + ElemType: AlertQuery{}.Type(ctx), + }, + "rearm": types.Int64Type, + "state": types.StringType, + "updated_at": types.StringType, + "user": basetypes.ListType{ + ElemType: User{}.Type(ctx), + }, + }, + } +} + +// GetOptions returns the value of the Options field in LegacyAlert_SdkV2 as +// a AlertOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyAlert_SdkV2) GetOptions(ctx context.Context) (AlertOptions_SdkV2, bool) { + var e AlertOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []AlertOptions_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 LegacyAlert_SdkV2. +func (o *LegacyAlert_SdkV2) SetOptions(ctx context.Context, v AlertOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +// GetQuery returns the value of the Query field in LegacyAlert_SdkV2 as +// a AlertQuery_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyAlert_SdkV2) GetQuery(ctx context.Context) (AlertQuery_SdkV2, bool) { + var e AlertQuery_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []AlertQuery_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in LegacyAlert_SdkV2. +func (o *LegacyAlert_SdkV2) SetQuery(ctx context.Context, v AlertQuery_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +// GetUser returns the value of the User field in LegacyAlert_SdkV2 as +// a User_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyAlert_SdkV2) GetUser(ctx context.Context) (User_SdkV2, bool) { + var e User_SdkV2 + if o.User.IsNull() || o.User.IsUnknown() { + return e, false + } + var v []User_SdkV2 + d := o.User.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUser sets the value of the User field in LegacyAlert_SdkV2. +func (o *LegacyAlert_SdkV2) SetUser(ctx context.Context, v User_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] + o.User = types.ListValueMust(t, vs) +} + +type LegacyQuery_SdkV2 struct { + // Describes whether the authenticated user is allowed to edit the + // definition of this query. + CanEdit types.Bool `tfsdk:"can_edit" tf:"optional"` + // The timestamp when this query was created. + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // Data source ID maps to the ID of the data source used by the resource and + // is distinct from the warehouse ID. [Learn more] + // + // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list + DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Query ID. + Id types.String `tfsdk:"id" tf:"optional"` + // Indicates whether the query is trashed. Trashed queries can't be used in + // dashboards, or appear in search results. If this boolean is `true`, the + // `options` property for this query includes a `moved_to_trash_at` + // timestamp. Trashed queries are permanently deleted after 30 days. + IsArchived types.Bool `tfsdk:"is_archived" tf:"optional"` + // Whether the query is a draft. Draft queries only appear in list views for + // their owners. Visualizations from draft queries cannot appear on + // dashboards. + IsDraft types.Bool `tfsdk:"is_draft" tf:"optional"` + // Whether this query object appears in the current user's favorites list. + // This flag determines whether the star icon for favorites is selected. + IsFavorite types.Bool `tfsdk:"is_favorite" tf:"optional"` + // Text parameter types are not safe from SQL injection for all types of + // data source. Set this Boolean parameter to `true` if a query either does + // not use any text type parameters or uses a data source type where text + // type parameters are handled safely. + IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` + + LastModifiedBy types.List `tfsdk:"last_modified_by" tf:"optional,object"` + // The ID of the user who last saved changes to this query. + LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:"optional"` + // If there is a cached result for this query and user, this field includes + // the query result ID. If this query uses parameters, this field is always + // null. + LatestQueryDataId types.String `tfsdk:"latest_query_data_id" tf:"optional"` + // The title of this query that appears in list views, widget headings, and + // on the query page. + Name types.String `tfsdk:"name" tf:"optional"` + + Options types.List `tfsdk:"options" tf:"optional,object"` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * + // `CAN_EDIT`: Can edit the query * `CAN_MANAGE`: Can manage the query + PermissionTier types.String `tfsdk:"permission_tier" tf:"optional"` + // The text of the query to be run. + Query types.String `tfsdk:"query" tf:"optional"` + // A SHA-256 hash of the query text along with the authenticated user ID. + QueryHash types.String `tfsdk:"query_hash" tf:"optional"` + // Sets the **Run as** role for the object. Must be set to one of `"viewer"` + // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as + // owner" behavior) + RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // The timestamp at which this query was last updated. + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` + + User types.List `tfsdk:"user" tf:"optional,object"` + // The ID of the user who owns the query. + UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + + Visualizations types.List `tfsdk:"visualizations" tf:"optional"` +} + +func (newState *LegacyQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyQuery_SdkV2) { +} + +func (newState *LegacyQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LegacyQuery_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "last_modified_by": reflect.TypeOf(User_SdkV2{}), + "options": reflect.TypeOf(QueryOptions_SdkV2{}), + "tags": reflect.TypeOf(types.String{}), + "user": reflect.TypeOf(User_SdkV2{}), + "visualizations": reflect.TypeOf(LegacyVisualization_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, LegacyQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LegacyQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "can_edit": o.CanEdit, + "created_at": o.CreatedAt, + "data_source_id": o.DataSourceId, + "description": o.Description, + "id": o.Id, + "is_archived": o.IsArchived, + "is_draft": o.IsDraft, + "is_favorite": o.IsFavorite, + "is_safe": o.IsSafe, + "last_modified_by": o.LastModifiedBy, + "last_modified_by_id": o.LastModifiedById, + "latest_query_data_id": o.LatestQueryDataId, + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "permission_tier": o.PermissionTier, + "query": o.Query, + "query_hash": o.QueryHash, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + "updated_at": o.UpdatedAt, + "user": o.User, + "user_id": o.UserId, + "visualizations": o.Visualizations, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LegacyQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "can_edit": types.BoolType, + "created_at": types.StringType, + "data_source_id": types.StringType, + "description": types.StringType, + "id": types.StringType, + "is_archived": types.BoolType, + "is_draft": types.BoolType, + "is_favorite": types.BoolType, + "is_safe": types.BoolType, + "last_modified_by": basetypes.ListType{ + ElemType: User{}.Type(ctx), + }, + "last_modified_by_id": types.Int64Type, + "latest_query_data_id": types.StringType, + "name": types.StringType, + "options": basetypes.ListType{ + ElemType: QueryOptions{}.Type(ctx), + }, + "parent": types.StringType, + "permission_tier": types.StringType, + "query": types.StringType, + "query_hash": types.StringType, + "run_as_role": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "updated_at": types.StringType, + "user": basetypes.ListType{ + ElemType: User{}.Type(ctx), + }, + "user_id": types.Int64Type, + "visualizations": basetypes.ListType{ + ElemType: LegacyVisualization{}.Type(ctx), + }, + }, + } +} + +// GetLastModifiedBy returns the value of the LastModifiedBy field in LegacyQuery_SdkV2 as +// a User_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyQuery_SdkV2) GetLastModifiedBy(ctx context.Context) (User_SdkV2, bool) { + var e User_SdkV2 + if o.LastModifiedBy.IsNull() || o.LastModifiedBy.IsUnknown() { + return e, false + } + var v []User_SdkV2 + d := o.LastModifiedBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetLastModifiedBy sets the value of the LastModifiedBy field in LegacyQuery_SdkV2. +func (o *LegacyQuery_SdkV2) SetLastModifiedBy(ctx context.Context, v User_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["last_modified_by"] + o.LastModifiedBy = types.ListValueMust(t, vs) +} + +// GetOptions returns the value of the Options field in LegacyQuery_SdkV2 as +// a QueryOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyQuery_SdkV2) GetOptions(ctx context.Context) (QueryOptions_SdkV2, bool) { + var e QueryOptions_SdkV2 + if o.Options.IsNull() || o.Options.IsUnknown() { + return e, false + } + var v []QueryOptions_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 LegacyQuery_SdkV2. +func (o *LegacyQuery_SdkV2) SetOptions(ctx context.Context, v QueryOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] + o.Options = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in LegacyQuery_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyQuery_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in LegacyQuery_SdkV2. +func (o *LegacyQuery_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +// GetUser returns the value of the User field in LegacyQuery_SdkV2 as +// a User_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyQuery_SdkV2) GetUser(ctx context.Context) (User_SdkV2, bool) { + var e User_SdkV2 + if o.User.IsNull() || o.User.IsUnknown() { + return e, false + } + var v []User_SdkV2 + d := o.User.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetUser sets the value of the User field in LegacyQuery_SdkV2. +func (o *LegacyQuery_SdkV2) SetUser(ctx context.Context, v User_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] + o.User = types.ListValueMust(t, vs) +} + +// GetVisualizations returns the value of the Visualizations field in LegacyQuery_SdkV2 as +// a slice of LegacyVisualization_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyQuery_SdkV2) GetVisualizations(ctx context.Context) ([]LegacyVisualization_SdkV2, bool) { + if o.Visualizations.IsNull() || o.Visualizations.IsUnknown() { + return nil, false + } + var v []LegacyVisualization_SdkV2 + d := o.Visualizations.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetVisualizations sets the value of the Visualizations field in LegacyQuery_SdkV2. +func (o *LegacyQuery_SdkV2) SetVisualizations(ctx context.Context, v []LegacyVisualization_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["visualizations"] + t = t.(attr.TypeWithElementType).ElementType() + o.Visualizations = types.ListValueMust(t, vs) +} + +// The visualization description API changes frequently and is unsupported. You +// can duplicate a visualization by copying description objects received _from +// the API_ and then using them to create a new one with a POST request to the +// same endpoint. Databricks does not recommend constructing ad-hoc +// visualizations entirely in JSON. +type LegacyVisualization_SdkV2 struct { + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // A short description of this visualization. This is not displayed in the + // UI. + Description types.String `tfsdk:"description" tf:"optional"` + // The UUID for this visualization. + Id types.String `tfsdk:"id" tf:"optional"` + // The name of the visualization that appears on dashboards and the query + // screen. + Name types.String `tfsdk:"name" tf:"optional"` + // The options object varies widely from one visualization type to the next + // and is unsupported. Databricks does not recommend modifying visualization + // settings in JSON. + Options types.Object `tfsdk:"options" tf:"optional"` + + Query types.List `tfsdk:"query" tf:"optional,object"` + // The type of visualization: chart, table, pivot table, and so on. + Type_ types.String `tfsdk:"type" tf:"optional"` + + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` +} + +func (newState *LegacyVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyVisualization_SdkV2) { +} + +func (newState *LegacyVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState LegacyVisualization_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in LegacyVisualization. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a LegacyVisualization_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query": reflect.TypeOf(LegacyQuery_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, LegacyVisualization_SdkV2 +// only implements ToObjectValue() and Type(). +func (o LegacyVisualization_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "description": o.Description, + "id": o.Id, + "name": o.Name, + "options": o.Options, + "query": o.Query, + "type": o.Type_, + "updated_at": o.UpdatedAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o LegacyVisualization_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.StringType, + "description": types.StringType, + "id": types.StringType, + "name": types.StringType, + "options": types.ObjectType{}, + "query": basetypes.ListType{ + ElemType: LegacyQuery{}.Type(ctx), + }, + "type": types.StringType, + "updated_at": types.StringType, + }, + } +} + +// GetQuery returns the value of the Query field in LegacyVisualization_SdkV2 as +// a LegacyQuery_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *LegacyVisualization_SdkV2) GetQuery(ctx context.Context) (LegacyQuery_SdkV2, bool) { + var e LegacyQuery_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []LegacyQuery_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in LegacyVisualization_SdkV2. +func (o *LegacyVisualization_SdkV2) SetQuery(ctx context.Context, v LegacyQuery_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +// List alerts +type ListAlertsRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAlertsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsRequest_SdkV2) { +} + +func (newState *ListAlertsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAlertsRequest_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, ListAlertsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAlertsRequest_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 ListAlertsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListAlertsResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ListAlertsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponse_SdkV2) { +} + +func (newState *ListAlertsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAlertsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(ListAlertsResponseAlert_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, ListAlertsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAlertsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAlertsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "results": basetypes.ListType{ + ElemType: ListAlertsResponseAlert{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ListAlertsResponse_SdkV2 as +// a slice of ListAlertsResponseAlert_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAlertsResponse_SdkV2) GetResults(ctx context.Context) ([]ListAlertsResponseAlert_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []ListAlertsResponseAlert_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ListAlertsResponse_SdkV2. +func (o *ListAlertsResponse_SdkV2) SetResults(ctx context.Context, v []ListAlertsResponseAlert_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +type ListAlertsResponseAlert_SdkV2 struct { + // Trigger conditions of the alert. + Condition types.List `tfsdk:"condition" tf:"optional,object"` + // The timestamp indicating when the alert was created. + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // Custom body of alert notification, if it exists. See [here] for custom + // templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + // Custom subject of alert notification, if it exists. This can include + // email subject entries and Slack notification headers, for example. See + // [here] for custom templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // The display name of the alert. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying the alert. + Id types.String `tfsdk:"id" tf:"optional"` + // The workspace state of the alert. Used for tracking trashed status. + LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + // Whether to notify alert subscribers when alert returns back to normal. + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + // The owner's username. This field is set to "Unavailable" if the user has + // been deleted. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // UUID of the query attached to the alert. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // Number of seconds an alert must wait after being triggered to rearm + // itself. After rearming, it can be triggered again. If 0 or not specified, + // the alert will not be triggered again. + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` + // Current state of the alert's trigger status. This field is set to UNKNOWN + // if the alert has not yet been evaluated or ran into an error during the + // last evaluation. + State types.String `tfsdk:"state" tf:"optional"` + // Timestamp when the alert was last triggered, if the alert has been + // triggered before. + TriggerTime types.String `tfsdk:"trigger_time" tf:"optional"` + // The timestamp indicating when the alert was updated. + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` +} + +func (newState *ListAlertsResponseAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAlertsResponseAlert_SdkV2) { +} + +func (newState *ListAlertsResponseAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAlertsResponseAlert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAlertsResponseAlert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAlertsResponseAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition": reflect.TypeOf(AlertCondition_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, ListAlertsResponseAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAlertsResponseAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition": o.Condition, + "create_time": o.CreateTime, + "custom_body": o.CustomBody, + "custom_subject": o.CustomSubject, + "display_name": o.DisplayName, + "id": o.Id, + "lifecycle_state": o.LifecycleState, + "notify_on_ok": o.NotifyOnOk, + "owner_user_name": o.OwnerUserName, + "query_id": o.QueryId, + "seconds_to_retrigger": o.SecondsToRetrigger, + "state": o.State, + "trigger_time": o.TriggerTime, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAlertsResponseAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition": basetypes.ListType{ + ElemType: AlertCondition{}.Type(ctx), + }, + "create_time": types.StringType, + "custom_body": types.StringType, + "custom_subject": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + "lifecycle_state": types.StringType, + "notify_on_ok": types.BoolType, + "owner_user_name": types.StringType, + "query_id": types.StringType, + "seconds_to_retrigger": types.Int64Type, + "state": types.StringType, + "trigger_time": types.StringType, + "update_time": types.StringType, + }, + } +} + +// GetCondition returns the value of the Condition field in ListAlertsResponseAlert_SdkV2 as +// a AlertCondition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAlertsResponseAlert_SdkV2) GetCondition(ctx context.Context) (AlertCondition_SdkV2, bool) { + var e AlertCondition_SdkV2 + if o.Condition.IsNull() || o.Condition.IsUnknown() { + return e, false + } + var v []AlertCondition_SdkV2 + d := o.Condition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCondition sets the value of the Condition field in ListAlertsResponseAlert_SdkV2. +func (o *ListAlertsResponseAlert_SdkV2) SetCondition(ctx context.Context, v AlertCondition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] + o.Condition = types.ListValueMust(t, vs) +} + +// Get dashboard objects +type ListDashboardsRequest_SdkV2 struct { + // Name of dashboard attribute to order by. + Order types.String `tfsdk:"-"` + // Page number to retrieve. + Page types.Int64 `tfsdk:"-"` + // Number of dashboards to return per page. + PageSize types.Int64 `tfsdk:"-"` + // Full text search term. + Q types.String `tfsdk:"-"` +} + +func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListDashboardsRequest_SdkV2) { +} + +func (newState *ListDashboardsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListDashboardsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListDashboardsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListDashboardsRequest_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, ListDashboardsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "order": o.Order, + "page": o.Page, + "page_size": o.PageSize, + "q": o.Q, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListDashboardsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "order": types.StringType, + "page": types.Int64Type, + "page_size": types.Int64Type, + "q": types.StringType, + }, + } +} + +// Get a list of queries +type ListQueriesLegacyRequest_SdkV2 struct { + // Name of query attribute to order by. Default sort order is ascending. + // Append a dash (`-`) to order descending instead. + // + // - `name`: The name of the query. + // + // - `created_at`: The timestamp the query was created. + // + // - `runtime`: The time it took to run this query. This is blank for + // parameterized queries. A blank value is treated as the highest value for + // sorting. + // + // - `executed_at`: The timestamp when the query was last run. + // + // - `created_by`: The user name of the user that created the query. + Order types.String `tfsdk:"-"` + // Page number to retrieve. + Page types.Int64 `tfsdk:"-"` + // Number of queries to return per page. + PageSize types.Int64 `tfsdk:"-"` + // Full text search term + Q types.String `tfsdk:"-"` +} + +func (newState *ListQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesLegacyRequest_SdkV2) { +} + +func (newState *ListQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueriesLegacyRequest_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, ListQueriesLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueriesLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "order": o.Order, + "page": o.Page, + "page_size": o.PageSize, + "q": o.Q, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "order": types.StringType, + "page": types.Int64Type, + "page_size": types.Int64Type, + "q": types.StringType, + }, + } +} + +// List queries +type ListQueriesRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListQueriesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesRequest_SdkV2) { +} + +func (newState *ListQueriesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueriesRequest_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, ListQueriesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueriesRequest_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 ListQueriesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListQueriesResponse_SdkV2 struct { + // Whether there is another page of results. + HasNextPage types.Bool `tfsdk:"has_next_page" tf:"optional"` + // A token that can be used to get the next page of results. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Res types.List `tfsdk:"res" tf:"optional"` +} + +func (newState *ListQueriesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueriesResponse_SdkV2) { +} + +func (newState *ListQueriesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueriesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueriesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueriesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "res": reflect.TypeOf(QueryInfo_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, ListQueriesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueriesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "has_next_page": o.HasNextPage, + "next_page_token": o.NextPageToken, + "res": o.Res, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQueriesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "has_next_page": types.BoolType, + "next_page_token": types.StringType, + "res": basetypes.ListType{ + ElemType: QueryInfo{}.Type(ctx), + }, + }, + } +} + +// GetRes returns the value of the Res field in ListQueriesResponse_SdkV2 as +// a slice of QueryInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQueriesResponse_SdkV2) GetRes(ctx context.Context) ([]QueryInfo_SdkV2, bool) { + if o.Res.IsNull() || o.Res.IsUnknown() { + return nil, false + } + var v []QueryInfo_SdkV2 + d := o.Res.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRes sets the value of the Res field in ListQueriesResponse_SdkV2. +func (o *ListQueriesResponse_SdkV2) SetRes(ctx context.Context, v []QueryInfo_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["res"] + t = t.(attr.TypeWithElementType).ElementType() + o.Res = types.ListValueMust(t, vs) +} + +// List Queries +type ListQueryHistoryRequest_SdkV2 struct { + // A filter to limit query history results. This field is optional. + FilterBy types.List `tfsdk:"-"` + // Whether to include the query metrics with each query. Only use this for a + // small subset of queries (max_results). Defaults to false. + IncludeMetrics types.Bool `tfsdk:"-"` + // Limit the number of results returned in one page. Must be less than 1000 + // and the default is 100. + MaxResults types.Int64 `tfsdk:"-"` + // A token that can be used to get the next page of results. The token can + // contains characters that need to be encoded before using it in a URL. For + // example, the character '+' needs to be replaced by %2B. This field is + // optional. + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListQueryHistoryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryHistoryRequest_SdkV2) { +} + +func (newState *ListQueryHistoryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryHistoryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryHistoryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueryHistoryRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "filter_by": reflect.TypeOf(QueryFilter_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, ListQueryHistoryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueryHistoryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "filter_by": o.FilterBy, + "include_metrics": o.IncludeMetrics, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQueryHistoryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "filter_by": basetypes.ListType{ + ElemType: QueryFilter{}.Type(ctx), + }, + "include_metrics": types.BoolType, + "max_results": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// GetFilterBy returns the value of the FilterBy field in ListQueryHistoryRequest_SdkV2 as +// a QueryFilter_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQueryHistoryRequest_SdkV2) GetFilterBy(ctx context.Context) (QueryFilter_SdkV2, bool) { + var e QueryFilter_SdkV2 + if o.FilterBy.IsNull() || o.FilterBy.IsUnknown() { + return e, false + } + var v []QueryFilter_SdkV2 + d := o.FilterBy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetFilterBy sets the value of the FilterBy field in ListQueryHistoryRequest_SdkV2. +func (o *ListQueryHistoryRequest_SdkV2) SetFilterBy(ctx context.Context, v QueryFilter_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter_by"] + o.FilterBy = types.ListValueMust(t, vs) +} + +type ListQueryObjectsResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ListQueryObjectsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponse_SdkV2) { +} + +func (newState *ListQueryObjectsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueryObjectsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(ListQueryObjectsResponseQuery_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, ListQueryObjectsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueryObjectsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQueryObjectsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "results": basetypes.ListType{ + ElemType: ListQueryObjectsResponseQuery{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ListQueryObjectsResponse_SdkV2 as +// a slice of ListQueryObjectsResponseQuery_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQueryObjectsResponse_SdkV2) GetResults(ctx context.Context) ([]ListQueryObjectsResponseQuery_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []ListQueryObjectsResponseQuery_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ListQueryObjectsResponse_SdkV2. +func (o *ListQueryObjectsResponse_SdkV2) SetResults(ctx context.Context, v []ListQueryObjectsResponseQuery_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +type ListQueryObjectsResponseQuery_SdkV2 struct { + // Whether to apply a 1000 row limit to the query result. + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + // Name of the catalog where this query will be executed. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // Timestamp when this query was created. + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Display name of the query that appears in list views, widget headings, + // and on the query page. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying the query. + Id types.String `tfsdk:"id" tf:"optional"` + // Username of the user who last saved changes to this query. + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + // Indicates whether the query is trashed. + LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + // Username of the user that owns the query. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // List of query parameter definitions. + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // Text of the query to be run. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Sets the "Run as" role for the object. + RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + // Name of the schema where this query will be executed. + Schema types.String `tfsdk:"schema" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // Timestamp when this query was last updated. + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + // ID of the SQL warehouse attached to the query. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *ListQueryObjectsResponseQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListQueryObjectsResponseQuery_SdkV2) { +} + +func (newState *ListQueryObjectsResponseQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListQueryObjectsResponseQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListQueryObjectsResponseQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListQueryObjectsResponseQuery_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(QueryParameter_SdkV2{}), + "tags": 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, ListQueryObjectsResponseQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListQueryObjectsResponseQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_auto_limit": o.ApplyAutoLimit, + "catalog": o.Catalog, + "create_time": o.CreateTime, + "description": o.Description, + "display_name": o.DisplayName, + "id": o.Id, + "last_modifier_user_name": o.LastModifierUserName, + "lifecycle_state": o.LifecycleState, + "owner_user_name": o.OwnerUserName, + "parameters": o.Parameters, + "query_text": o.QueryText, + "run_as_mode": o.RunAsMode, + "schema": o.Schema, + "tags": o.Tags, + "update_time": o.UpdateTime, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListQueryObjectsResponseQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_auto_limit": types.BoolType, + "catalog": types.StringType, + "create_time": types.StringType, + "description": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + "last_modifier_user_name": types.StringType, + "lifecycle_state": types.StringType, + "owner_user_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: QueryParameter{}.Type(ctx), + }, + "query_text": types.StringType, + "run_as_mode": types.StringType, + "schema": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "update_time": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in ListQueryObjectsResponseQuery_SdkV2 as +// a slice of QueryParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQueryObjectsResponseQuery_SdkV2) GetParameters(ctx context.Context) ([]QueryParameter_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []QueryParameter_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in ListQueryObjectsResponseQuery_SdkV2. +func (o *ListQueryObjectsResponseQuery_SdkV2) SetParameters(ctx context.Context, v []QueryParameter_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in ListQueryObjectsResponseQuery_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListQueryObjectsResponseQuery_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in ListQueryObjectsResponseQuery_SdkV2. +func (o *ListQueryObjectsResponseQuery_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type ListResponse_SdkV2 struct { + // The total number of dashboards. + Count types.Int64 `tfsdk:"count" tf:"optional"` + // The current page being displayed. + Page types.Int64 `tfsdk:"page" tf:"optional"` + // The number of dashboards per page. + PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + // List of dashboards returned. + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse_SdkV2) { +} + +func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(Dashboard_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, ListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "count": o.Count, + "page": o.Page, + "page_size": o.PageSize, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "count": types.Int64Type, + "page": types.Int64Type, + "page_size": types.Int64Type, + "results": basetypes.ListType{ + ElemType: Dashboard{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ListResponse_SdkV2 as +// a slice of Dashboard_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListResponse_SdkV2) GetResults(ctx context.Context) ([]Dashboard_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []Dashboard_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ListResponse_SdkV2. +func (o *ListResponse_SdkV2) SetResults(ctx context.Context, v []Dashboard_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +// List visualizations on a query +type ListVisualizationsForQueryRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListVisualizationsForQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryRequest_SdkV2) { +} + +func (newState *ListVisualizationsForQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListVisualizationsForQueryRequest_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, ListVisualizationsForQueryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVisualizationsForQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVisualizationsForQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +type ListVisualizationsForQueryResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *ListVisualizationsForQueryResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVisualizationsForQueryResponse_SdkV2) { +} + +func (newState *ListVisualizationsForQueryResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVisualizationsForQueryResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVisualizationsForQueryResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListVisualizationsForQueryResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(Visualization_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, ListVisualizationsForQueryResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVisualizationsForQueryResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVisualizationsForQueryResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "results": basetypes.ListType{ + ElemType: Visualization{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in ListVisualizationsForQueryResponse_SdkV2 as +// a slice of Visualization_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListVisualizationsForQueryResponse_SdkV2) GetResults(ctx context.Context) ([]Visualization_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []Visualization_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in ListVisualizationsForQueryResponse_SdkV2. +func (o *ListVisualizationsForQueryResponse_SdkV2) SetResults(ctx context.Context, v []Visualization_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +// List warehouses +type ListWarehousesRequest_SdkV2 struct { + // Service Principal which will be used to fetch the list of warehouses. If + // not specified, the user from the session header is used. + RunAsUserId types.Int64 `tfsdk:"-"` +} + +func (newState *ListWarehousesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesRequest_SdkV2) { +} + +func (newState *ListWarehousesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWarehousesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListWarehousesRequest_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, ListWarehousesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWarehousesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "run_as_user_id": o.RunAsUserId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWarehousesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "run_as_user_id": types.Int64Type, + }, + } +} + +type ListWarehousesResponse_SdkV2 struct { + // A list of warehouses and their configurations. + Warehouses types.List `tfsdk:"warehouses" tf:"optional"` +} + +func (newState *ListWarehousesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWarehousesResponse_SdkV2) { +} + +func (newState *ListWarehousesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWarehousesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWarehousesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListWarehousesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "warehouses": reflect.TypeOf(EndpointInfo_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, ListWarehousesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWarehousesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "warehouses": o.Warehouses, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWarehousesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "warehouses": basetypes.ListType{ + ElemType: EndpointInfo{}.Type(ctx), + }, + }, + } +} + +// GetWarehouses returns the value of the Warehouses field in ListWarehousesResponse_SdkV2 as +// a slice of EndpointInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListWarehousesResponse_SdkV2) GetWarehouses(ctx context.Context) ([]EndpointInfo_SdkV2, bool) { + if o.Warehouses.IsNull() || o.Warehouses.IsUnknown() { + return nil, false + } + var v []EndpointInfo_SdkV2 + d := o.Warehouses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWarehouses sets the value of the Warehouses field in ListWarehousesResponse_SdkV2. +func (o *ListWarehousesResponse_SdkV2) SetWarehouses(ctx context.Context, v []EndpointInfo_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["warehouses"] + t = t.(attr.TypeWithElementType).ElementType() + o.Warehouses = types.ListValueMust(t, vs) +} + +type MultiValuesOptions_SdkV2 struct { + // Character that prefixes each selected parameter value. + Prefix types.String `tfsdk:"prefix" tf:"optional"` + // Character that separates each selected parameter value. Defaults to a + // comma. + Separator types.String `tfsdk:"separator" tf:"optional"` + // Character that suffixes each selected parameter value. + Suffix types.String `tfsdk:"suffix" tf:"optional"` +} + +func (newState *MultiValuesOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MultiValuesOptions_SdkV2) { +} + +func (newState *MultiValuesOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState MultiValuesOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MultiValuesOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MultiValuesOptions_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, MultiValuesOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MultiValuesOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "prefix": o.Prefix, + "separator": o.Separator, + "suffix": o.Suffix, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MultiValuesOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "prefix": types.StringType, + "separator": types.StringType, + "suffix": types.StringType, + }, + } +} + +type NumericValue_SdkV2 struct { + Value types.Float64 `tfsdk:"value" tf:"optional"` +} + +func (newState *NumericValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan NumericValue_SdkV2) { +} + +func (newState *NumericValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState NumericValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in NumericValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a NumericValue_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, NumericValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o NumericValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o NumericValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": types.Float64Type, + }, + } +} + +type OdbcParams_SdkV2 struct { + Hostname types.String `tfsdk:"hostname" tf:"optional"` + + Path types.String `tfsdk:"path" tf:"optional"` + + Port types.Int64 `tfsdk:"port" tf:"optional"` + + Protocol types.String `tfsdk:"protocol" tf:"optional"` +} + +func (newState *OdbcParams_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OdbcParams_SdkV2) { +} + +func (newState *OdbcParams_SdkV2) SyncEffectiveFieldsDuringRead(existingState OdbcParams_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OdbcParams. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OdbcParams_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, OdbcParams_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OdbcParams_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "hostname": o.Hostname, + "path": o.Path, + "port": o.Port, + "protocol": o.Protocol, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OdbcParams_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "hostname": types.StringType, + "path": types.StringType, + "port": types.Int64Type, + "protocol": types.StringType, + }, + } +} + +type Parameter_SdkV2 struct { + // List of valid parameter values, newline delimited. Only applies for + // dropdown list parameters. + EnumOptions types.String `tfsdk:"enumOptions" tf:"optional"` + // If specified, allows multiple values to be selected for this parameter. + // Only applies to dropdown list and query-based dropdown list parameters. + MultiValuesOptions types.List `tfsdk:"multiValuesOptions" tf:"optional,object"` + // The literal parameter marker that appears between double curly braces in + // the query text. + Name types.String `tfsdk:"name" tf:"optional"` + // The UUID of the query that provides the parameter values. Only applies + // for query-based dropdown list parameters. + QueryId types.String `tfsdk:"queryId" tf:"optional"` + // The text displayed in a parameter picking widget. + Title types.String `tfsdk:"title" tf:"optional"` + // Parameters can have several different types. + Type_ types.String `tfsdk:"type" tf:"optional"` + // The default value for this parameter. + Value types.Object `tfsdk:"value" tf:"optional"` +} + +func (newState *Parameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Parameter_SdkV2) { +} + +func (newState *Parameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState Parameter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Parameter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Parameter_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "multiValuesOptions": reflect.TypeOf(MultiValuesOptions_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, Parameter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Parameter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enumOptions": o.EnumOptions, + "multiValuesOptions": o.MultiValuesOptions, + "name": o.Name, + "queryId": o.QueryId, + "title": o.Title, + "type": o.Type_, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Parameter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enumOptions": types.StringType, + "multiValuesOptions": basetypes.ListType{ + ElemType: MultiValuesOptions{}.Type(ctx), + }, + "name": types.StringType, + "queryId": types.StringType, + "title": types.StringType, + "type": types.StringType, + "value": types.ObjectType{}, + }, + } +} + +// GetMultiValuesOptions returns the value of the MultiValuesOptions field in Parameter_SdkV2 as +// a MultiValuesOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Parameter_SdkV2) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptions_SdkV2, bool) { + var e MultiValuesOptions_SdkV2 + if o.MultiValuesOptions.IsNull() || o.MultiValuesOptions.IsUnknown() { + return e, false + } + var v []MultiValuesOptions_SdkV2 + d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMultiValuesOptions sets the value of the MultiValuesOptions field in Parameter_SdkV2. +func (o *Parameter_SdkV2) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multiValuesOptions"] + o.MultiValuesOptions = types.ListValueMust(t, vs) +} + +type Query_SdkV2 struct { + // Whether to apply a 1000 row limit to the query result. + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + // Name of the catalog where this query will be executed. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // Timestamp when this query was created. + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Display name of the query that appears in list views, widget headings, + // and on the query page. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying the query. + Id types.String `tfsdk:"id" tf:"optional"` + // Username of the user who last saved changes to this query. + LastModifierUserName types.String `tfsdk:"last_modifier_user_name" tf:"optional"` + // Indicates whether the query is trashed. + LifecycleState types.String `tfsdk:"lifecycle_state" tf:"optional"` + // Username of the user that owns the query. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // List of query parameter definitions. + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // Workspace path of the workspace folder containing the object. + ParentPath types.String `tfsdk:"parent_path" tf:"optional"` + // Text of the query to be run. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Sets the "Run as" role for the object. + RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + // Name of the schema where this query will be executed. + Schema types.String `tfsdk:"schema" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // Timestamp when this query was last updated. + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` + // ID of the SQL warehouse attached to the query. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *Query_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Query_SdkV2) { +} + +func (newState *Query_SdkV2) SyncEffectiveFieldsDuringRead(existingState Query_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Query. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Query_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(QueryParameter_SdkV2{}), + "tags": 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, Query_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Query_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_auto_limit": o.ApplyAutoLimit, + "catalog": o.Catalog, + "create_time": o.CreateTime, + "description": o.Description, + "display_name": o.DisplayName, + "id": o.Id, + "last_modifier_user_name": o.LastModifierUserName, + "lifecycle_state": o.LifecycleState, + "owner_user_name": o.OwnerUserName, + "parameters": o.Parameters, + "parent_path": o.ParentPath, + "query_text": o.QueryText, + "run_as_mode": o.RunAsMode, + "schema": o.Schema, + "tags": o.Tags, + "update_time": o.UpdateTime, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Query_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_auto_limit": types.BoolType, + "catalog": types.StringType, + "create_time": types.StringType, + "description": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + "last_modifier_user_name": types.StringType, + "lifecycle_state": types.StringType, + "owner_user_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: QueryParameter{}.Type(ctx), + }, + "parent_path": types.StringType, + "query_text": types.StringType, + "run_as_mode": types.StringType, + "schema": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "update_time": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in Query_SdkV2 as +// a slice of QueryParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Query_SdkV2) GetParameters(ctx context.Context) ([]QueryParameter_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []QueryParameter_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in Query_SdkV2. +func (o *Query_SdkV2) SetParameters(ctx context.Context, v []QueryParameter_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in Query_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *Query_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in Query_SdkV2. +func (o *Query_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type QueryBackedValue_SdkV2 struct { + // If specified, allows multiple values to be selected for this parameter. + MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + // UUID of the query that provides the parameter values. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // List of selected query parameter values. + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *QueryBackedValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryBackedValue_SdkV2) { +} + +func (newState *QueryBackedValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryBackedValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryBackedValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryBackedValue_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "multi_values_options": reflect.TypeOf(MultiValuesOptions_SdkV2{}), + "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, QueryBackedValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryBackedValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "multi_values_options": o.MultiValuesOptions, + "query_id": o.QueryId, + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryBackedValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "multi_values_options": basetypes.ListType{ + ElemType: MultiValuesOptions{}.Type(ctx), + }, + "query_id": types.StringType, + "values": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetMultiValuesOptions returns the value of the MultiValuesOptions field in QueryBackedValue_SdkV2 as +// a MultiValuesOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryBackedValue_SdkV2) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptions_SdkV2, bool) { + var e MultiValuesOptions_SdkV2 + if o.MultiValuesOptions.IsNull() || o.MultiValuesOptions.IsUnknown() { + return e, false + } + var v []MultiValuesOptions_SdkV2 + d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMultiValuesOptions sets the value of the MultiValuesOptions field in QueryBackedValue_SdkV2. +func (o *QueryBackedValue_SdkV2) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multi_values_options"] + o.MultiValuesOptions = types.ListValueMust(t, vs) +} + +// GetValues returns the value of the Values field in QueryBackedValue_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryBackedValue_SdkV2) GetValues(ctx context.Context) ([]types.String, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in QueryBackedValue_SdkV2. +func (o *QueryBackedValue_SdkV2) SetValues(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["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type QueryEditContent_SdkV2 struct { + // Data source ID maps to the ID of the data source used by the resource and + // is distinct from the warehouse ID. [Learn more] + // + // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list + DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // The title of this query that appears in list views, widget headings, and + // on the query page. + Name types.String `tfsdk:"name" tf:"optional"` + // Exclusively used for storing a list parameter definitions. A parameter is + // an object with `title`, `name`, `type`, and `value` properties. The + // `value` field here is the default value. It can be overridden at runtime. + Options types.Object `tfsdk:"options" tf:"optional"` + // The text of the query to be run. + Query types.String `tfsdk:"query" tf:"optional"` + + QueryId types.String `tfsdk:"-"` + // Sets the **Run as** role for the object. Must be set to one of `"viewer"` + // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as + // owner" behavior) + RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryEditContent_SdkV2) { +} + +func (newState *QueryEditContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryEditContent_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryEditContent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": 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, QueryEditContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryEditContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_source_id": o.DataSourceId, + "description": o.Description, + "name": o.Name, + "options": o.Options, + "query": o.Query, + "query_id": o.QueryId, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryEditContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_source_id": types.StringType, + "description": types.StringType, + "name": types.StringType, + "options": types.ObjectType{}, + "query": types.StringType, + "query_id": types.StringType, + "run_as_role": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetTags returns the value of the Tags field in QueryEditContent_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryEditContent_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in QueryEditContent_SdkV2. +func (o *QueryEditContent_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type QueryFilter_SdkV2 struct { + // A range filter for query submitted time. The time range must be <= 30 + // days. + QueryStartTimeRange types.List `tfsdk:"query_start_time_range" tf:"optional,object"` + // A list of statement IDs. + StatementIds types.List `tfsdk:"statement_ids" tf:"optional"` + + Statuses types.List `tfsdk:"statuses" tf:"optional"` + // A list of user IDs who ran the queries. + UserIds types.List `tfsdk:"user_ids" tf:"optional"` + // A list of warehouse IDs. + WarehouseIds types.List `tfsdk:"warehouse_ids" tf:"optional"` +} + +func (newState *QueryFilter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryFilter_SdkV2) { +} + +func (newState *QueryFilter_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryFilter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryFilter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryFilter_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query_start_time_range": reflect.TypeOf(TimeRange_SdkV2{}), + "statement_ids": reflect.TypeOf(types.String{}), + "statuses": reflect.TypeOf(types.String{}), + "user_ids": reflect.TypeOf(types.Int64{}), + "warehouse_ids": 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, QueryFilter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryFilter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_start_time_range": o.QueryStartTimeRange, + "statement_ids": o.StatementIds, + "statuses": o.Statuses, + "user_ids": o.UserIds, + "warehouse_ids": o.WarehouseIds, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryFilter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_start_time_range": basetypes.ListType{ + ElemType: TimeRange{}.Type(ctx), + }, + "statement_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + "statuses": basetypes.ListType{ + ElemType: types.StringType, + }, + "user_ids": basetypes.ListType{ + ElemType: types.Int64Type, + }, + "warehouse_ids": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetQueryStartTimeRange returns the value of the QueryStartTimeRange field in QueryFilter_SdkV2 as +// a TimeRange_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryFilter_SdkV2) GetQueryStartTimeRange(ctx context.Context) (TimeRange_SdkV2, bool) { + var e TimeRange_SdkV2 + if o.QueryStartTimeRange.IsNull() || o.QueryStartTimeRange.IsUnknown() { + return e, false + } + var v []TimeRange_SdkV2 + d := o.QueryStartTimeRange.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueryStartTimeRange sets the value of the QueryStartTimeRange field in QueryFilter_SdkV2. +func (o *QueryFilter_SdkV2) SetQueryStartTimeRange(ctx context.Context, v TimeRange_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_start_time_range"] + o.QueryStartTimeRange = types.ListValueMust(t, vs) +} + +// GetStatementIds returns the value of the StatementIds field in QueryFilter_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryFilter_SdkV2) GetStatementIds(ctx context.Context) ([]types.String, bool) { + if o.StatementIds.IsNull() || o.StatementIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.StatementIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStatementIds sets the value of the StatementIds field in QueryFilter_SdkV2. +func (o *QueryFilter_SdkV2) SetStatementIds(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["statement_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.StatementIds = types.ListValueMust(t, vs) +} + +// GetStatuses returns the value of the Statuses field in QueryFilter_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryFilter_SdkV2) GetStatuses(ctx context.Context) ([]types.String, bool) { + if o.Statuses.IsNull() || o.Statuses.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Statuses.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetStatuses sets the value of the Statuses field in QueryFilter_SdkV2. +func (o *QueryFilter_SdkV2) SetStatuses(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["statuses"] + t = t.(attr.TypeWithElementType).ElementType() + o.Statuses = types.ListValueMust(t, vs) +} + +// GetUserIds returns the value of the UserIds field in QueryFilter_SdkV2 as +// a slice of types.Int64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryFilter_SdkV2) GetUserIds(ctx context.Context) ([]types.Int64, bool) { + if o.UserIds.IsNull() || o.UserIds.IsUnknown() { + return nil, false + } + var v []types.Int64 + d := o.UserIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetUserIds sets the value of the UserIds field in QueryFilter_SdkV2. +func (o *QueryFilter_SdkV2) SetUserIds(ctx context.Context, v []types.Int64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.UserIds = types.ListValueMust(t, vs) +} + +// GetWarehouseIds returns the value of the WarehouseIds field in QueryFilter_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryFilter_SdkV2) GetWarehouseIds(ctx context.Context) ([]types.String, bool) { + if o.WarehouseIds.IsNull() || o.WarehouseIds.IsUnknown() { + return nil, false + } + var v []types.String + d := o.WarehouseIds.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetWarehouseIds sets the value of the WarehouseIds field in QueryFilter_SdkV2. +func (o *QueryFilter_SdkV2) SetWarehouseIds(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["warehouse_ids"] + t = t.(attr.TypeWithElementType).ElementType() + o.WarehouseIds = types.ListValueMust(t, vs) +} + +type QueryInfo_SdkV2 struct { + // SQL Warehouse channel information at the time of query execution + ChannelUsed types.List `tfsdk:"channel_used" tf:"optional,object"` + // Total execution time of the statement ( excluding result fetch time ). + Duration types.Int64 `tfsdk:"duration" tf:"optional"` + // Alias for `warehouse_id`. + EndpointId types.String `tfsdk:"endpoint_id" tf:"optional"` + // Message describing why the query could not complete. + ErrorMessage types.String `tfsdk:"error_message" tf:"optional"` + // The ID of the user whose credentials were used to run the query. + ExecutedAsUserId types.Int64 `tfsdk:"executed_as_user_id" tf:"optional"` + // The email address or username of the user whose credentials were used to + // run the query. + ExecutedAsUserName types.String `tfsdk:"executed_as_user_name" tf:"optional"` + // The time execution of the query ended. + ExecutionEndTimeMs types.Int64 `tfsdk:"execution_end_time_ms" tf:"optional"` + // Whether more updates for the query are expected. + IsFinal types.Bool `tfsdk:"is_final" tf:"optional"` + // A key that can be used to look up query details. + LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` + // Metrics about query execution. + Metrics types.List `tfsdk:"metrics" tf:"optional,object"` + // Whether plans exist for the execution, or the reason why they are missing + PlansState types.String `tfsdk:"plans_state" tf:"optional"` + // The time the query ended. + QueryEndTimeMs types.Int64 `tfsdk:"query_end_time_ms" tf:"optional"` + // The query ID. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // The time the query started. + QueryStartTimeMs types.Int64 `tfsdk:"query_start_time_ms" tf:"optional"` + // The text of the query. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // The number of results returned by the query. + RowsProduced types.Int64 `tfsdk:"rows_produced" tf:"optional"` + // URL to the Spark UI query plan. + SparkUiUrl types.String `tfsdk:"spark_ui_url" tf:"optional"` + // Type of statement for this query + StatementType types.String `tfsdk:"statement_type" tf:"optional"` + // Query status with one the following values: + // + // - `QUEUED`: Query has been received and queued. - `RUNNING`: Query has + // started. - `CANCELED`: Query has been cancelled by the user. - `FAILED`: + // Query has failed. - `FINISHED`: Query has completed. + Status types.String `tfsdk:"status" tf:"optional"` + // The ID of the user who ran the query. + UserId types.Int64 `tfsdk:"user_id" tf:"optional"` + // The email address or username of the user who ran the query. + UserName types.String `tfsdk:"user_name" tf:"optional"` + // Warehouse ID. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *QueryInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryInfo_SdkV2) { +} + +func (newState *QueryInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel_used": reflect.TypeOf(ChannelInfo_SdkV2{}), + "metrics": reflect.TypeOf(QueryMetrics_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, QueryInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "channel_used": o.ChannelUsed, + "duration": o.Duration, + "endpoint_id": o.EndpointId, + "error_message": o.ErrorMessage, + "executed_as_user_id": o.ExecutedAsUserId, + "executed_as_user_name": o.ExecutedAsUserName, + "execution_end_time_ms": o.ExecutionEndTimeMs, + "is_final": o.IsFinal, + "lookup_key": o.LookupKey, + "metrics": o.Metrics, + "plans_state": o.PlansState, + "query_end_time_ms": o.QueryEndTimeMs, + "query_id": o.QueryId, + "query_start_time_ms": o.QueryStartTimeMs, + "query_text": o.QueryText, + "rows_produced": o.RowsProduced, + "spark_ui_url": o.SparkUiUrl, + "statement_type": o.StatementType, + "status": o.Status, + "user_id": o.UserId, + "user_name": o.UserName, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "channel_used": basetypes.ListType{ + ElemType: ChannelInfo{}.Type(ctx), + }, + "duration": types.Int64Type, + "endpoint_id": types.StringType, + "error_message": types.StringType, + "executed_as_user_id": types.Int64Type, + "executed_as_user_name": types.StringType, + "execution_end_time_ms": types.Int64Type, + "is_final": types.BoolType, + "lookup_key": types.StringType, + "metrics": basetypes.ListType{ + ElemType: QueryMetrics{}.Type(ctx), + }, + "plans_state": types.StringType, + "query_end_time_ms": types.Int64Type, + "query_id": types.StringType, + "query_start_time_ms": types.Int64Type, + "query_text": types.StringType, + "rows_produced": types.Int64Type, + "spark_ui_url": types.StringType, + "statement_type": types.StringType, + "status": types.StringType, + "user_id": types.Int64Type, + "user_name": types.StringType, + "warehouse_id": types.StringType, + }, + } +} + +// GetChannelUsed returns the value of the ChannelUsed field in QueryInfo_SdkV2 as +// a ChannelInfo_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryInfo_SdkV2) GetChannelUsed(ctx context.Context) (ChannelInfo_SdkV2, bool) { + var e ChannelInfo_SdkV2 + if o.ChannelUsed.IsNull() || o.ChannelUsed.IsUnknown() { + return e, false + } + var v []ChannelInfo_SdkV2 + d := o.ChannelUsed.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannelUsed sets the value of the ChannelUsed field in QueryInfo_SdkV2. +func (o *QueryInfo_SdkV2) SetChannelUsed(ctx context.Context, v ChannelInfo_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel_used"] + o.ChannelUsed = types.ListValueMust(t, vs) +} + +// GetMetrics returns the value of the Metrics field in QueryInfo_SdkV2 as +// a QueryMetrics_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryInfo_SdkV2) GetMetrics(ctx context.Context) (QueryMetrics_SdkV2, bool) { + var e QueryMetrics_SdkV2 + if o.Metrics.IsNull() || o.Metrics.IsUnknown() { + return e, false + } + var v []QueryMetrics_SdkV2 + d := o.Metrics.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetMetrics sets the value of the Metrics field in QueryInfo_SdkV2. +func (o *QueryInfo_SdkV2) SetMetrics(ctx context.Context, v QueryMetrics_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metrics"] + o.Metrics = types.ListValueMust(t, vs) +} + +type QueryList_SdkV2 struct { + // The total number of queries. + Count types.Int64 `tfsdk:"count" tf:"optional"` + // The page number that is currently displayed. + Page types.Int64 `tfsdk:"page" tf:"optional"` + // The number of queries per page. + PageSize types.Int64 `tfsdk:"page_size" tf:"optional"` + // List of queries returned. + Results types.List `tfsdk:"results" tf:"optional"` +} + +func (newState *QueryList_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryList_SdkV2) { +} + +func (newState *QueryList_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryList_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryList. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryList_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "results": reflect.TypeOf(LegacyQuery_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, QueryList_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryList_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "count": o.Count, + "page": o.Page, + "page_size": o.PageSize, + "results": o.Results, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryList_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "count": types.Int64Type, + "page": types.Int64Type, + "page_size": types.Int64Type, + "results": basetypes.ListType{ + ElemType: LegacyQuery{}.Type(ctx), + }, + }, + } +} + +// GetResults returns the value of the Results field in QueryList_SdkV2 as +// a slice of LegacyQuery_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryList_SdkV2) GetResults(ctx context.Context) ([]LegacyQuery_SdkV2, bool) { + if o.Results.IsNull() || o.Results.IsUnknown() { + return nil, false + } + var v []LegacyQuery_SdkV2 + d := o.Results.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetResults sets the value of the Results field in QueryList_SdkV2. +func (o *QueryList_SdkV2) SetResults(ctx context.Context, v []LegacyQuery_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["results"] + t = t.(attr.TypeWithElementType).ElementType() + o.Results = types.ListValueMust(t, vs) +} + +// A query metric that encapsulates a set of measurements for a single query. +// Metrics come from the driver and are stored in the history service database. +type QueryMetrics_SdkV2 struct { + // Time spent loading metadata and optimizing the query, in milliseconds. + CompilationTimeMs types.Int64 `tfsdk:"compilation_time_ms" tf:"optional"` + // Time spent executing the query, in milliseconds. + ExecutionTimeMs types.Int64 `tfsdk:"execution_time_ms" tf:"optional"` + // Total amount of data sent over the network between executor nodes during + // shuffle, in bytes. + NetworkSentBytes types.Int64 `tfsdk:"network_sent_bytes" tf:"optional"` + // Timestamp of when the query was enqueued waiting while the warehouse was + // at max load. This field is optional and will not appear if the query + // skipped the overloading queue. + OverloadingQueueStartTimestamp types.Int64 `tfsdk:"overloading_queue_start_timestamp" tf:"optional"` + // Total execution time for all individual Photon query engine tasks in the + // query, in milliseconds. + PhotonTotalTimeMs types.Int64 `tfsdk:"photon_total_time_ms" tf:"optional"` + // Timestamp of when the query was enqueued waiting for a cluster to be + // provisioned for the warehouse. This field is optional and will not appear + // if the query skipped the provisioning queue. + ProvisioningQueueStartTimestamp types.Int64 `tfsdk:"provisioning_queue_start_timestamp" tf:"optional"` + // Total number of bytes in all tables not read due to pruning + PrunedBytes types.Int64 `tfsdk:"pruned_bytes" tf:"optional"` + // Total number of files from all tables not read due to pruning + PrunedFilesCount types.Int64 `tfsdk:"pruned_files_count" tf:"optional"` + // Timestamp of when the underlying compute started compilation of the + // query. + QueryCompilationStartTimestamp types.Int64 `tfsdk:"query_compilation_start_timestamp" tf:"optional"` + // Total size of data read by the query, in bytes. + ReadBytes types.Int64 `tfsdk:"read_bytes" tf:"optional"` + // Size of persistent data read from the cache, in bytes. + ReadCacheBytes types.Int64 `tfsdk:"read_cache_bytes" tf:"optional"` + // Number of files read after pruning + ReadFilesCount types.Int64 `tfsdk:"read_files_count" tf:"optional"` + // Number of partitions read after pruning. + ReadPartitionsCount types.Int64 `tfsdk:"read_partitions_count" tf:"optional"` + // Size of persistent data read from cloud object storage on your cloud + // tenant, in bytes. + ReadRemoteBytes types.Int64 `tfsdk:"read_remote_bytes" tf:"optional"` + // Time spent fetching the query results after the execution finished, in + // milliseconds. + ResultFetchTimeMs types.Int64 `tfsdk:"result_fetch_time_ms" tf:"optional"` + // `true` if the query result was fetched from cache, `false` otherwise. + ResultFromCache types.Bool `tfsdk:"result_from_cache" tf:"optional"` + // Total number of rows returned by the query. + RowsProducedCount types.Int64 `tfsdk:"rows_produced_count" tf:"optional"` + // Total number of rows read by the query. + RowsReadCount types.Int64 `tfsdk:"rows_read_count" tf:"optional"` + // Size of data temporarily written to disk while executing the query, in + // bytes. + SpillToDiskBytes types.Int64 `tfsdk:"spill_to_disk_bytes" tf:"optional"` + // Sum of execution time for all of the query’s tasks, in milliseconds. + TaskTotalTimeMs types.Int64 `tfsdk:"task_total_time_ms" tf:"optional"` + // Total execution time of the query from the client’s point of view, in + // milliseconds. + TotalTimeMs types.Int64 `tfsdk:"total_time_ms" tf:"optional"` + // Size pf persistent data written to cloud object storage in your cloud + // tenant, in bytes. + WriteRemoteBytes types.Int64 `tfsdk:"write_remote_bytes" tf:"optional"` +} + +func (newState *QueryMetrics_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryMetrics_SdkV2) { +} + +func (newState *QueryMetrics_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryMetrics_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryMetrics. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryMetrics_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, QueryMetrics_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryMetrics_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "compilation_time_ms": o.CompilationTimeMs, + "execution_time_ms": o.ExecutionTimeMs, + "network_sent_bytes": o.NetworkSentBytes, + "overloading_queue_start_timestamp": o.OverloadingQueueStartTimestamp, + "photon_total_time_ms": o.PhotonTotalTimeMs, + "provisioning_queue_start_timestamp": o.ProvisioningQueueStartTimestamp, + "pruned_bytes": o.PrunedBytes, + "pruned_files_count": o.PrunedFilesCount, + "query_compilation_start_timestamp": o.QueryCompilationStartTimestamp, + "read_bytes": o.ReadBytes, + "read_cache_bytes": o.ReadCacheBytes, + "read_files_count": o.ReadFilesCount, + "read_partitions_count": o.ReadPartitionsCount, + "read_remote_bytes": o.ReadRemoteBytes, + "result_fetch_time_ms": o.ResultFetchTimeMs, + "result_from_cache": o.ResultFromCache, + "rows_produced_count": o.RowsProducedCount, + "rows_read_count": o.RowsReadCount, + "spill_to_disk_bytes": o.SpillToDiskBytes, + "task_total_time_ms": o.TaskTotalTimeMs, + "total_time_ms": o.TotalTimeMs, + "write_remote_bytes": o.WriteRemoteBytes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryMetrics_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "compilation_time_ms": types.Int64Type, + "execution_time_ms": types.Int64Type, + "network_sent_bytes": types.Int64Type, + "overloading_queue_start_timestamp": types.Int64Type, + "photon_total_time_ms": types.Int64Type, + "provisioning_queue_start_timestamp": types.Int64Type, + "pruned_bytes": types.Int64Type, + "pruned_files_count": types.Int64Type, + "query_compilation_start_timestamp": types.Int64Type, + "read_bytes": types.Int64Type, + "read_cache_bytes": types.Int64Type, + "read_files_count": types.Int64Type, + "read_partitions_count": types.Int64Type, + "read_remote_bytes": types.Int64Type, + "result_fetch_time_ms": types.Int64Type, + "result_from_cache": types.BoolType, + "rows_produced_count": types.Int64Type, + "rows_read_count": types.Int64Type, + "spill_to_disk_bytes": types.Int64Type, + "task_total_time_ms": types.Int64Type, + "total_time_ms": types.Int64Type, + "write_remote_bytes": types.Int64Type, + }, + } +} + +type QueryOptions_SdkV2 struct { + // The name of the catalog to execute this query in. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // The timestamp when this query was moved to trash. Only present when the + // `is_archived` property is `true`. Trashed items are deleted after thirty + // days. + MovedToTrashAt types.String `tfsdk:"moved_to_trash_at" tf:"optional"` + + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // The name of the schema to execute this query in. + Schema types.String `tfsdk:"schema" tf:"optional"` +} + +func (newState *QueryOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryOptions_SdkV2) { +} + +func (newState *QueryOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryOptions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(Parameter_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, QueryOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "catalog": o.Catalog, + "moved_to_trash_at": o.MovedToTrashAt, + "parameters": o.Parameters, + "schema": o.Schema, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "catalog": types.StringType, + "moved_to_trash_at": types.StringType, + "parameters": basetypes.ListType{ + ElemType: Parameter{}.Type(ctx), + }, + "schema": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in QueryOptions_SdkV2 as +// a slice of Parameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryOptions_SdkV2) GetParameters(ctx context.Context) ([]Parameter_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []Parameter_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in QueryOptions_SdkV2. +func (o *QueryOptions_SdkV2) SetParameters(ctx context.Context, v []Parameter_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +type QueryParameter_SdkV2 struct { + // Date-range query parameter value. Can only specify one of + // `dynamic_date_range_value` or `date_range_value`. + DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + // Date query parameter value. Can only specify one of `dynamic_date_value` + // or `date_value`. + DateValue types.List `tfsdk:"date_value" tf:"optional,object"` + // Dropdown query parameter value. + EnumValue types.List `tfsdk:"enum_value" tf:"optional,object"` + // Literal parameter marker that appears between double curly braces in the + // query text. + Name types.String `tfsdk:"name" tf:"optional"` + // Numeric query parameter value. + NumericValue types.List `tfsdk:"numeric_value" tf:"optional,object"` + // Query-based dropdown query parameter value. + QueryBackedValue types.List `tfsdk:"query_backed_value" tf:"optional,object"` + // Text query parameter value. + TextValue types.List `tfsdk:"text_value" tf:"optional,object"` + // Text displayed in the user-facing parameter widget in the UI. + Title types.String `tfsdk:"title" tf:"optional"` +} + +func (newState *QueryParameter_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryParameter_SdkV2) { +} + +func (newState *QueryParameter_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryParameter_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryParameter. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryParameter_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "date_range_value": reflect.TypeOf(DateRangeValue_SdkV2{}), + "date_value": reflect.TypeOf(DateValue_SdkV2{}), + "enum_value": reflect.TypeOf(EnumValue_SdkV2{}), + "numeric_value": reflect.TypeOf(NumericValue_SdkV2{}), + "query_backed_value": reflect.TypeOf(QueryBackedValue_SdkV2{}), + "text_value": reflect.TypeOf(TextValue_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, QueryParameter_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryParameter_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "date_range_value": o.DateRangeValue, + "date_value": o.DateValue, + "enum_value": o.EnumValue, + "name": o.Name, + "numeric_value": o.NumericValue, + "query_backed_value": o.QueryBackedValue, + "text_value": o.TextValue, + "title": o.Title, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryParameter_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "date_range_value": basetypes.ListType{ + ElemType: DateRangeValue{}.Type(ctx), + }, + "date_value": basetypes.ListType{ + ElemType: DateValue{}.Type(ctx), + }, + "enum_value": basetypes.ListType{ + ElemType: EnumValue{}.Type(ctx), + }, + "name": types.StringType, + "numeric_value": basetypes.ListType{ + ElemType: NumericValue{}.Type(ctx), + }, + "query_backed_value": basetypes.ListType{ + ElemType: QueryBackedValue{}.Type(ctx), + }, + "text_value": basetypes.ListType{ + ElemType: TextValue{}.Type(ctx), + }, + "title": types.StringType, + }, + } +} + +// GetDateRangeValue returns the value of the DateRangeValue field in QueryParameter_SdkV2 as +// a DateRangeValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetDateRangeValue(ctx context.Context) (DateRangeValue_SdkV2, bool) { + var e DateRangeValue_SdkV2 + if o.DateRangeValue.IsNull() || o.DateRangeValue.IsUnknown() { + return e, false + } + var v []DateRangeValue_SdkV2 + d := o.DateRangeValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDateRangeValue sets the value of the DateRangeValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetDateRangeValue(ctx context.Context, v DateRangeValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_range_value"] + o.DateRangeValue = types.ListValueMust(t, vs) +} + +// GetDateValue returns the value of the DateValue field in QueryParameter_SdkV2 as +// a DateValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetDateValue(ctx context.Context) (DateValue_SdkV2, bool) { + var e DateValue_SdkV2 + if o.DateValue.IsNull() || o.DateValue.IsUnknown() { + return e, false + } + var v []DateValue_SdkV2 + d := o.DateValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDateValue sets the value of the DateValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetDateValue(ctx context.Context, v DateValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_value"] + o.DateValue = types.ListValueMust(t, vs) +} + +// GetEnumValue returns the value of the EnumValue field in QueryParameter_SdkV2 as +// a EnumValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetEnumValue(ctx context.Context) (EnumValue_SdkV2, bool) { + var e EnumValue_SdkV2 + if o.EnumValue.IsNull() || o.EnumValue.IsUnknown() { + return e, false + } + var v []EnumValue_SdkV2 + d := o.EnumValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEnumValue sets the value of the EnumValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetEnumValue(ctx context.Context, v EnumValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enum_value"] + o.EnumValue = types.ListValueMust(t, vs) +} + +// GetNumericValue returns the value of the NumericValue field in QueryParameter_SdkV2 as +// a NumericValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetNumericValue(ctx context.Context) (NumericValue_SdkV2, bool) { + var e NumericValue_SdkV2 + if o.NumericValue.IsNull() || o.NumericValue.IsUnknown() { + return e, false + } + var v []NumericValue_SdkV2 + d := o.NumericValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetNumericValue sets the value of the NumericValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetNumericValue(ctx context.Context, v NumericValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["numeric_value"] + o.NumericValue = types.ListValueMust(t, vs) +} + +// GetQueryBackedValue returns the value of the QueryBackedValue field in QueryParameter_SdkV2 as +// a QueryBackedValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetQueryBackedValue(ctx context.Context) (QueryBackedValue_SdkV2, bool) { + var e QueryBackedValue_SdkV2 + if o.QueryBackedValue.IsNull() || o.QueryBackedValue.IsUnknown() { + return e, false + } + var v []QueryBackedValue_SdkV2 + d := o.QueryBackedValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQueryBackedValue sets the value of the QueryBackedValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetQueryBackedValue(ctx context.Context, v QueryBackedValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_backed_value"] + o.QueryBackedValue = types.ListValueMust(t, vs) +} + +// GetTextValue returns the value of the TextValue field in QueryParameter_SdkV2 as +// a TextValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryParameter_SdkV2) GetTextValue(ctx context.Context) (TextValue_SdkV2, bool) { + var e TextValue_SdkV2 + if o.TextValue.IsNull() || o.TextValue.IsUnknown() { + return e, false + } + var v []TextValue_SdkV2 + d := o.TextValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetTextValue sets the value of the TextValue field in QueryParameter_SdkV2. +func (o *QueryParameter_SdkV2) SetTextValue(ctx context.Context, v TextValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["text_value"] + o.TextValue = types.ListValueMust(t, vs) +} + +type QueryPostContent_SdkV2 struct { + // Data source ID maps to the ID of the data source used by the resource and + // is distinct from the warehouse ID. [Learn more] + // + // [Learn more]: https://docs.databricks.com/api/workspace/datasources/list + DataSourceId types.String `tfsdk:"data_source_id" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // The title of this query that appears in list views, widget headings, and + // on the query page. + Name types.String `tfsdk:"name" tf:"optional"` + // Exclusively used for storing a list parameter definitions. A parameter is + // an object with `title`, `name`, `type`, and `value` properties. The + // `value` field here is the default value. It can be overridden at runtime. + Options types.Object `tfsdk:"options" tf:"optional"` + // The identifier of the workspace folder containing the object. + Parent types.String `tfsdk:"parent" tf:"optional"` + // The text of the query to be run. + Query types.String `tfsdk:"query" tf:"optional"` + // Sets the **Run as** role for the object. Must be set to one of `"viewer"` + // (signifying "run as viewer" behavior) or `"owner"` (signifying "run as + // owner" behavior) + RunAsRole types.String `tfsdk:"run_as_role" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` +} + +func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryPostContent_SdkV2) { +} + +func (newState *QueryPostContent_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryPostContent_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryPostContent_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "tags": 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, QueryPostContent_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryPostContent_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_source_id": o.DataSourceId, + "description": o.Description, + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "query": o.Query, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryPostContent_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_source_id": types.StringType, + "description": types.StringType, + "name": types.StringType, + "options": types.ObjectType{}, + "parent": types.StringType, + "query": types.StringType, + "run_as_role": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetTags returns the value of the Tags field in QueryPostContent_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryPostContent_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in QueryPostContent_SdkV2. +func (o *QueryPostContent_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type RepeatedEndpointConfPairs_SdkV2 struct { + // Deprecated: Use configuration_pairs + ConfigPair types.List `tfsdk:"config_pair" tf:"optional"` + + ConfigurationPairs types.List `tfsdk:"configuration_pairs" tf:"optional"` +} + +func (newState *RepeatedEndpointConfPairs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepeatedEndpointConfPairs_SdkV2) { +} + +func (newState *RepeatedEndpointConfPairs_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepeatedEndpointConfPairs_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepeatedEndpointConfPairs. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepeatedEndpointConfPairs_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "config_pair": reflect.TypeOf(EndpointConfPair_SdkV2{}), + "configuration_pairs": reflect.TypeOf(EndpointConfPair_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, RepeatedEndpointConfPairs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepeatedEndpointConfPairs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "config_pair": o.ConfigPair, + "configuration_pairs": o.ConfigurationPairs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepeatedEndpointConfPairs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "config_pair": basetypes.ListType{ + ElemType: EndpointConfPair{}.Type(ctx), + }, + "configuration_pairs": basetypes.ListType{ + ElemType: EndpointConfPair{}.Type(ctx), + }, + }, + } +} + +// GetConfigPair returns the value of the ConfigPair field in RepeatedEndpointConfPairs_SdkV2 as +// a slice of EndpointConfPair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepeatedEndpointConfPairs_SdkV2) GetConfigPair(ctx context.Context) ([]EndpointConfPair_SdkV2, bool) { + if o.ConfigPair.IsNull() || o.ConfigPair.IsUnknown() { + return nil, false + } + var v []EndpointConfPair_SdkV2 + d := o.ConfigPair.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConfigPair sets the value of the ConfigPair field in RepeatedEndpointConfPairs_SdkV2. +func (o *RepeatedEndpointConfPairs_SdkV2) SetConfigPair(ctx context.Context, v []EndpointConfPair_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["config_pair"] + t = t.(attr.TypeWithElementType).ElementType() + o.ConfigPair = types.ListValueMust(t, vs) +} + +// GetConfigurationPairs returns the value of the ConfigurationPairs field in RepeatedEndpointConfPairs_SdkV2 as +// a slice of EndpointConfPair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepeatedEndpointConfPairs_SdkV2) GetConfigurationPairs(ctx context.Context) ([]EndpointConfPair_SdkV2, bool) { + if o.ConfigurationPairs.IsNull() || o.ConfigurationPairs.IsUnknown() { + return nil, false + } + var v []EndpointConfPair_SdkV2 + d := o.ConfigurationPairs.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetConfigurationPairs sets the value of the ConfigurationPairs field in RepeatedEndpointConfPairs_SdkV2. +func (o *RepeatedEndpointConfPairs_SdkV2) SetConfigurationPairs(ctx context.Context, v []EndpointConfPair_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["configuration_pairs"] + t = t.(attr.TypeWithElementType).ElementType() + o.ConfigurationPairs = types.ListValueMust(t, vs) +} + +// Restore a dashboard +type RestoreDashboardRequest_SdkV2 struct { + DashboardId types.String `tfsdk:"-"` +} + +func (newState *RestoreDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreDashboardRequest_SdkV2) { +} + +func (newState *RestoreDashboardRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreDashboardRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreDashboardRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreDashboardRequest_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, RestoreDashboardRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, + } +} + +// Restore a query +type RestoreQueriesLegacyRequest_SdkV2 struct { + QueryId types.String `tfsdk:"-"` +} + +func (newState *RestoreQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreQueriesLegacyRequest_SdkV2) { +} + +func (newState *RestoreQueriesLegacyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreQueriesLegacyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreQueriesLegacyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreQueriesLegacyRequest_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, RestoreQueriesLegacyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreQueriesLegacyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "query_id": o.QueryId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RestoreQueriesLegacyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "query_id": types.StringType, + }, + } +} + +type RestoreResponse_SdkV2 struct { +} + +func (newState *RestoreResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RestoreResponse_SdkV2) { +} + +func (newState *RestoreResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RestoreResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RestoreResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RestoreResponse_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, RestoreResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RestoreResponse_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 RestoreResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ResultData_SdkV2 struct { + // The number of bytes in the result chunk. This field is not available when + // using `INLINE` disposition. + ByteCount types.Int64 `tfsdk:"byte_count" tf:"optional"` + // The position within the sequence of result set chunks. + ChunkIndex types.Int64 `tfsdk:"chunk_index" tf:"optional"` + // The `JSON_ARRAY` format is an array of arrays of values, where each + // non-null value is formatted as a string. Null values are encoded as JSON + // `null`. + DataArray types.List `tfsdk:"data_array" tf:"optional"` + + ExternalLinks types.List `tfsdk:"external_links" tf:"optional"` + // When fetching, provides the `chunk_index` for the _next_ chunk. If + // absent, indicates there are no more chunks. The next chunk can be fetched + // with a :method:statementexecution/getStatementResultChunkN request. + NextChunkIndex types.Int64 `tfsdk:"next_chunk_index" tf:"optional"` + // When fetching, provides a link to fetch the _next_ chunk. If absent, + // indicates there are no more chunks. This link is an absolute `path` to be + // joined with your `$DATABRICKS_HOST`, and should be treated as an opaque + // link. This is an alternative to using `next_chunk_index`. + NextChunkInternalLink types.String `tfsdk:"next_chunk_internal_link" tf:"optional"` + // The number of rows within the result chunk. + RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` + // The starting row offset within the result set. + RowOffset types.Int64 `tfsdk:"row_offset" tf:"optional"` +} + +func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData_SdkV2) { +} + +func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultData_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResultData_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data_array": reflect.TypeOf(types.String{}), + "external_links": reflect.TypeOf(ExternalLink_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, ResultData_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResultData_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "byte_count": o.ByteCount, + "chunk_index": o.ChunkIndex, + "data_array": o.DataArray, + "external_links": o.ExternalLinks, + "next_chunk_index": o.NextChunkIndex, + "next_chunk_internal_link": o.NextChunkInternalLink, + "row_count": o.RowCount, + "row_offset": o.RowOffset, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResultData_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "byte_count": types.Int64Type, + "chunk_index": types.Int64Type, + "data_array": basetypes.ListType{ + ElemType: basetypes.ListType{ + ElemType: types.StringType, + }, + }, + "external_links": basetypes.ListType{ + ElemType: ExternalLink{}.Type(ctx), + }, + "next_chunk_index": types.Int64Type, + "next_chunk_internal_link": types.StringType, + "row_count": types.Int64Type, + "row_offset": types.Int64Type, + }, + } +} + +// GetDataArray returns the value of the DataArray field in ResultData_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultData_SdkV2) GetDataArray(ctx context.Context) ([]types.String, bool) { + if o.DataArray.IsNull() || o.DataArray.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DataArray.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataArray sets the value of the DataArray field in ResultData_SdkV2. +func (o *ResultData_SdkV2) SetDataArray(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["data_array"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataArray = types.ListValueMust(t, vs) +} + +// GetExternalLinks returns the value of the ExternalLinks field in ResultData_SdkV2 as +// a slice of ExternalLink_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultData_SdkV2) GetExternalLinks(ctx context.Context) ([]ExternalLink_SdkV2, bool) { + if o.ExternalLinks.IsNull() || o.ExternalLinks.IsUnknown() { + return nil, false + } + var v []ExternalLink_SdkV2 + d := o.ExternalLinks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetExternalLinks sets the value of the ExternalLinks field in ResultData_SdkV2. +func (o *ResultData_SdkV2) SetExternalLinks(ctx context.Context, v []ExternalLink_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_links"] + t = t.(attr.TypeWithElementType).ElementType() + o.ExternalLinks = types.ListValueMust(t, vs) +} + +// The result manifest provides schema and metadata for the result set. +type ResultManifest_SdkV2 struct { + // Array of result set chunk metadata. + Chunks types.List `tfsdk:"chunks" tf:"optional"` + + Format types.String `tfsdk:"format" tf:"optional"` + // The schema is an ordered list of column descriptions. + Schema types.List `tfsdk:"schema" tf:"optional,object"` + // The total number of bytes in the result set. This field is not available + // when using `INLINE` disposition. + TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:"optional"` + // The total number of chunks that the result set has been divided into. + TotalChunkCount types.Int64 `tfsdk:"total_chunk_count" tf:"optional"` + // The total number of rows in the result set. + TotalRowCount types.Int64 `tfsdk:"total_row_count" tf:"optional"` + // Indicates whether the result is truncated due to `row_limit` or + // `byte_limit`. + Truncated types.Bool `tfsdk:"truncated" tf:"optional"` +} + +func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest_SdkV2) { +} + +func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultManifest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResultManifest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "chunks": reflect.TypeOf(BaseChunkInfo_SdkV2{}), + "schema": reflect.TypeOf(ResultSchema_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, ResultManifest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResultManifest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "chunks": o.Chunks, + "format": o.Format, + "schema": o.Schema, + "total_byte_count": o.TotalByteCount, + "total_chunk_count": o.TotalChunkCount, + "total_row_count": o.TotalRowCount, + "truncated": o.Truncated, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResultManifest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "chunks": basetypes.ListType{ + ElemType: BaseChunkInfo{}.Type(ctx), + }, + "format": types.StringType, + "schema": basetypes.ListType{ + ElemType: ResultSchema{}.Type(ctx), + }, + "total_byte_count": types.Int64Type, + "total_chunk_count": types.Int64Type, + "total_row_count": types.Int64Type, + "truncated": types.BoolType, + }, + } +} + +// GetChunks returns the value of the Chunks field in ResultManifest_SdkV2 as +// a slice of BaseChunkInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultManifest_SdkV2) GetChunks(ctx context.Context) ([]BaseChunkInfo_SdkV2, bool) { + if o.Chunks.IsNull() || o.Chunks.IsUnknown() { + return nil, false + } + var v []BaseChunkInfo_SdkV2 + d := o.Chunks.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetChunks sets the value of the Chunks field in ResultManifest_SdkV2. +func (o *ResultManifest_SdkV2) SetChunks(ctx context.Context, v []BaseChunkInfo_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["chunks"] + t = t.(attr.TypeWithElementType).ElementType() + o.Chunks = types.ListValueMust(t, vs) +} + +// GetSchema returns the value of the Schema field in ResultManifest_SdkV2 as +// a ResultSchema_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultManifest_SdkV2) GetSchema(ctx context.Context) (ResultSchema_SdkV2, bool) { + var e ResultSchema_SdkV2 + if o.Schema.IsNull() || o.Schema.IsUnknown() { + return e, false + } + var v []ResultSchema_SdkV2 + d := o.Schema.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSchema sets the value of the Schema field in ResultManifest_SdkV2. +func (o *ResultManifest_SdkV2) SetSchema(ctx context.Context, v ResultSchema_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schema"] + o.Schema = types.ListValueMust(t, vs) +} + +// The schema is an ordered list of column descriptions. +type ResultSchema_SdkV2 struct { + ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + + Columns types.List `tfsdk:"columns" tf:"optional"` +} + +func (newState *ResultSchema_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultSchema_SdkV2) { +} + +func (newState *ResultSchema_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultSchema_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultSchema. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResultSchema_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnInfo_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, ResultSchema_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResultSchema_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "column_count": o.ColumnCount, + "columns": o.Columns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResultSchema_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "column_count": types.Int64Type, + "columns": basetypes.ListType{ + ElemType: ColumnInfo{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in ResultSchema_SdkV2 as +// a slice of ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultSchema_SdkV2) GetColumns(ctx context.Context) ([]ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnInfo_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 ResultSchema_SdkV2. +func (o *ResultSchema_SdkV2) SetColumns(ctx context.Context, v []ColumnInfo_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) +} + +type ServiceError_SdkV2 struct { + ErrorCode types.String `tfsdk:"error_code" tf:"optional"` + // A brief summary of the error condition. + Message types.String `tfsdk:"message" tf:"optional"` +} + +func (newState *ServiceError_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ServiceError_SdkV2) { +} + +func (newState *ServiceError_SdkV2) SyncEffectiveFieldsDuringRead(existingState ServiceError_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ServiceError. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ServiceError_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, ServiceError_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ServiceError_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error_code": o.ErrorCode, + "message": o.Message, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ServiceError_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error_code": types.StringType, + "message": types.StringType, + }, + } +} + +// Set object ACL +type SetRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // Object ID. The ACL for the object with this UUID is overwritten by this + // request's POST content. + ObjectId types.String `tfsdk:"-"` + // The type of object permission to set. + ObjectType types.String `tfsdk:"-"` +} + +func (newState *SetRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetRequest_SdkV2) { +} + +func (newState *SetRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AccessControl_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, SetRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "objectId": o.ObjectId, + "objectType": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AccessControl{}.Type(ctx), + }, + "objectId": types.StringType, + "objectType": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in SetRequest_SdkV2 as +// a slice of AccessControl_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SetRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]AccessControl_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AccessControl_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in SetRequest_SdkV2. +func (o *SetRequest_SdkV2) SetAccessControlList(ctx context.Context, v []AccessControl_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type SetResponse_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // An object's type and UUID, separated by a forward slash (/) character. + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + // A singular noun object type. + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *SetResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetResponse_SdkV2) { +} + +func (newState *SetResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(AccessControl_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, SetResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: AccessControl{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in SetResponse_SdkV2 as +// a slice of AccessControl_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SetResponse_SdkV2) GetAccessControlList(ctx context.Context) ([]AccessControl_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []AccessControl_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in SetResponse_SdkV2. +func (o *SetResponse_SdkV2) SetAccessControlList(ctx context.Context, v []AccessControl_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type SetWorkspaceWarehouseConfigRequest_SdkV2 struct { + // Optional: Channel selection details + Channel types.List `tfsdk:"channel" tf:"optional,object"` + // Deprecated: Use sql_configuration_parameters + ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + // Spark confs for external hive metastore configuration JSON serialized + // size must be less than <= 512K + DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` + // List of Warehouse Types allowed in this workspace (limits allowed value + // of the type field in CreateWarehouse and EditWarehouse). Note: Some types + // cannot be disabled, they don't need to be specified in + // SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing + // warehouses to be converted to another type. Used by frontend to save + // specific type availability in the warehouse create and edit form UI. + EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` + // Deprecated: Use sql_configuration_parameters + GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + // GCP only: Google Service Account used to pass to cluster to access Google + // Cloud Storage + GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` + // AWS Only: Instance profile used to pass IAM role to the cluster + InstanceProfileArn types.String `tfsdk:"instance_profile_arn" tf:"optional"` + // Security policy for warehouses + SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` + // SQL configuration parameters + SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` +} + +func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest_SdkV2) { +} + +func (newState *SetWorkspaceWarehouseConfigRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetWorkspaceWarehouseConfigRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "channel": reflect.TypeOf(Channel_SdkV2{}), + "config_param": reflect.TypeOf(RepeatedEndpointConfPairs_SdkV2{}), + "data_access_config": reflect.TypeOf(EndpointConfPair_SdkV2{}), + "enabled_warehouse_types": reflect.TypeOf(WarehouseTypePair_SdkV2{}), + "global_param": reflect.TypeOf(RepeatedEndpointConfPairs_SdkV2{}), + "sql_configuration_parameters": reflect.TypeOf(RepeatedEndpointConfPairs_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, SetWorkspaceWarehouseConfigRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetWorkspaceWarehouseConfigRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "channel": o.Channel, + "config_param": o.ConfigParam, + "data_access_config": o.DataAccessConfig, + "enabled_warehouse_types": o.EnabledWarehouseTypes, + "global_param": o.GlobalParam, + "google_service_account": o.GoogleServiceAccount, + "instance_profile_arn": o.InstanceProfileArn, + "security_policy": o.SecurityPolicy, + "sql_configuration_parameters": o.SqlConfigurationParameters, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SetWorkspaceWarehouseConfigRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "channel": basetypes.ListType{ + ElemType: Channel{}.Type(ctx), + }, + "config_param": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + "data_access_config": basetypes.ListType{ + ElemType: EndpointConfPair{}.Type(ctx), + }, + "enabled_warehouse_types": basetypes.ListType{ + ElemType: WarehouseTypePair{}.Type(ctx), + }, + "global_param": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + "google_service_account": types.StringType, + "instance_profile_arn": types.StringType, + "security_policy": types.StringType, + "sql_configuration_parameters": basetypes.ListType{ + ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + }, + }, + } +} + +// GetChannel returns the value of the Channel field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a Channel_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetChannel(ctx context.Context) (Channel_SdkV2, bool) { + var e Channel_SdkV2 + if o.Channel.IsNull() || o.Channel.IsUnknown() { + return e, false + } + var v []Channel_SdkV2 + d := o.Channel.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetChannel sets the value of the Channel field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetChannel(ctx context.Context, v Channel_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] + o.Channel = types.ListValueMust(t, vs) +} + +// GetConfigParam returns the value of the ConfigParam field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetConfigParam(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.ConfigParam.IsNull() || o.ConfigParam.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.ConfigParam.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetConfigParam sets the value of the ConfigParam field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetConfigParam(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config_param"] + o.ConfigParam = types.ListValueMust(t, vs) +} + +// GetDataAccessConfig returns the value of the DataAccessConfig field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a slice of EndpointConfPair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetDataAccessConfig(ctx context.Context) ([]EndpointConfPair_SdkV2, bool) { + if o.DataAccessConfig.IsNull() || o.DataAccessConfig.IsUnknown() { + return nil, false + } + var v []EndpointConfPair_SdkV2 + d := o.DataAccessConfig.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataAccessConfig sets the value of the DataAccessConfig field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetDataAccessConfig(ctx context.Context, v []EndpointConfPair_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["data_access_config"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataAccessConfig = types.ListValueMust(t, vs) +} + +// GetEnabledWarehouseTypes returns the value of the EnabledWarehouseTypes field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a slice of WarehouseTypePair_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetEnabledWarehouseTypes(ctx context.Context) ([]WarehouseTypePair_SdkV2, bool) { + if o.EnabledWarehouseTypes.IsNull() || o.EnabledWarehouseTypes.IsUnknown() { + return nil, false + } + var v []WarehouseTypePair_SdkV2 + d := o.EnabledWarehouseTypes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEnabledWarehouseTypes sets the value of the EnabledWarehouseTypes field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetEnabledWarehouseTypes(ctx context.Context, v []WarehouseTypePair_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["enabled_warehouse_types"] + t = t.(attr.TypeWithElementType).ElementType() + o.EnabledWarehouseTypes = types.ListValueMust(t, vs) +} + +// GetGlobalParam returns the value of the GlobalParam field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetGlobalParam(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.GlobalParam.IsNull() || o.GlobalParam.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.GlobalParam.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetGlobalParam sets the value of the GlobalParam field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetGlobalParam(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["global_param"] + o.GlobalParam = types.ListValueMust(t, vs) +} + +// GetSqlConfigurationParameters returns the value of the SqlConfigurationParameters field in SetWorkspaceWarehouseConfigRequest_SdkV2 as +// a RepeatedEndpointConfPairs_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) GetSqlConfigurationParameters(ctx context.Context) (RepeatedEndpointConfPairs_SdkV2, bool) { + var e RepeatedEndpointConfPairs_SdkV2 + if o.SqlConfigurationParameters.IsNull() || o.SqlConfigurationParameters.IsUnknown() { + return e, false + } + var v []RepeatedEndpointConfPairs_SdkV2 + d := o.SqlConfigurationParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSqlConfigurationParameters sets the value of the SqlConfigurationParameters field in SetWorkspaceWarehouseConfigRequest_SdkV2. +func (o *SetWorkspaceWarehouseConfigRequest_SdkV2) SetSqlConfigurationParameters(ctx context.Context, v RepeatedEndpointConfPairs_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_configuration_parameters"] + o.SqlConfigurationParameters = types.ListValueMust(t, vs) +} + +type SetWorkspaceWarehouseConfigResponse_SdkV2 struct { +} + +func (newState *SetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigResponse_SdkV2) { +} + +func (newState *SetWorkspaceWarehouseConfigResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SetWorkspaceWarehouseConfigResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SetWorkspaceWarehouseConfigResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SetWorkspaceWarehouseConfigResponse_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, SetWorkspaceWarehouseConfigResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SetWorkspaceWarehouseConfigResponse_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 SetWorkspaceWarehouseConfigResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Start a warehouse +type StartRequest_SdkV2 struct { + // Required. Id of the SQL warehouse. + Id types.String `tfsdk:"-"` +} + +func (newState *StartRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartRequest_SdkV2) { +} + +func (newState *StartRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StartRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartRequest_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, StartRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StartRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type StartWarehouseResponse_SdkV2 struct { +} + +func (newState *StartWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StartWarehouseResponse_SdkV2) { +} + +func (newState *StartWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StartWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StartWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StartWarehouseResponse_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, StartWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StartWarehouseResponse_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 StartWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type StatementParameterListItem_SdkV2 struct { + // The name of a parameter marker to be substituted in the statement. + Name types.String `tfsdk:"name" tf:""` + // The data type, given as a string. For example: `INT`, `STRING`, + // `DECIMAL(10,2)`. If no type is given the type is assumed to be `STRING`. + // Complex types, such as `ARRAY`, `MAP`, and `STRUCT` are not supported. + // For valid types, refer to the section [Data types] of the SQL language + // reference. + // + // [Data types]: https://docs.databricks.com/sql/language-manual/functions/cast.html + Type_ types.String `tfsdk:"type" tf:"optional"` + // The value to substitute, represented as a string. If omitted, the value + // is interpreted as NULL. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *StatementParameterListItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementParameterListItem_SdkV2) { +} + +func (newState *StatementParameterListItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementParameterListItem_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementParameterListItem. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StatementParameterListItem_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, StatementParameterListItem_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StatementParameterListItem_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "name": o.Name, + "type": o.Type_, + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StatementParameterListItem_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + "type": types.StringType, + "value": types.StringType, + }, + } +} + +type StatementResponse_SdkV2 struct { + // The result manifest provides schema and metadata for the result set. + Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + + Result types.List `tfsdk:"result" tf:"optional,object"` + // The statement ID is returned upon successfully submitting a SQL + // statement, and is a required reference for all subsequent calls. + StatementId types.String `tfsdk:"statement_id" tf:"optional"` + // The status response includes execution state and if relevant, error + // information. + Status types.List `tfsdk:"status" tf:"optional,object"` +} + +func (newState *StatementResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementResponse_SdkV2) { +} + +func (newState *StatementResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StatementResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "manifest": reflect.TypeOf(ResultManifest_SdkV2{}), + "result": reflect.TypeOf(ResultData_SdkV2{}), + "status": reflect.TypeOf(StatementStatus_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, StatementResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StatementResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "manifest": o.Manifest, + "result": o.Result, + "statement_id": o.StatementId, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StatementResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "manifest": basetypes.ListType{ + ElemType: ResultManifest{}.Type(ctx), + }, + "result": basetypes.ListType{ + ElemType: ResultData{}.Type(ctx), + }, + "statement_id": types.StringType, + "status": basetypes.ListType{ + ElemType: StatementStatus{}.Type(ctx), + }, + }, + } +} + +// GetManifest returns the value of the Manifest field in StatementResponse_SdkV2 as +// a ResultManifest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StatementResponse_SdkV2) GetManifest(ctx context.Context) (ResultManifest_SdkV2, bool) { + var e ResultManifest_SdkV2 + if o.Manifest.IsNull() || o.Manifest.IsUnknown() { + return e, false + } + var v []ResultManifest_SdkV2 + d := o.Manifest.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetManifest sets the value of the Manifest field in StatementResponse_SdkV2. +func (o *StatementResponse_SdkV2) SetManifest(ctx context.Context, v ResultManifest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manifest"] + o.Manifest = types.ListValueMust(t, vs) +} + +// GetResult returns the value of the Result field in StatementResponse_SdkV2 as +// a ResultData_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StatementResponse_SdkV2) GetResult(ctx context.Context) (ResultData_SdkV2, bool) { + var e ResultData_SdkV2 + if o.Result.IsNull() || o.Result.IsUnknown() { + return e, false + } + var v []ResultData_SdkV2 + d := o.Result.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResult sets the value of the Result field in StatementResponse_SdkV2. +func (o *StatementResponse_SdkV2) SetResult(ctx context.Context, v ResultData_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] + o.Result = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in StatementResponse_SdkV2 as +// a StatementStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StatementResponse_SdkV2) GetStatus(ctx context.Context) (StatementStatus_SdkV2, bool) { + var e StatementStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []StatementStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in StatementResponse_SdkV2. +func (o *StatementResponse_SdkV2) SetStatus(ctx context.Context, v StatementStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +// The status response includes execution state and if relevant, error +// information. +type StatementStatus_SdkV2 struct { + Error types.List `tfsdk:"error" tf:"optional,object"` + // Statement execution state: - `PENDING`: waiting for warehouse - + // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data + // available for fetch - `FAILED`: execution failed; reason for failure + // 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" tf:"optional"` +} + +func (newState *StatementStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementStatus_SdkV2) { +} + +func (newState *StatementStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState StatementStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StatementStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StatementStatus_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "error": reflect.TypeOf(ServiceError_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, StatementStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StatementStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "error": o.Error, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StatementStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "error": basetypes.ListType{ + ElemType: ServiceError{}.Type(ctx), + }, + "state": types.StringType, + }, + } +} + +// GetError returns the value of the Error field in StatementStatus_SdkV2 as +// a ServiceError_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *StatementStatus_SdkV2) GetError(ctx context.Context) (ServiceError_SdkV2, bool) { + var e ServiceError_SdkV2 + if o.Error.IsNull() || o.Error.IsUnknown() { + return e, false + } + var v []ServiceError_SdkV2 + d := o.Error.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetError sets the value of the Error field in StatementStatus_SdkV2. +func (o *StatementStatus_SdkV2) SetError(ctx context.Context, v ServiceError_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] + o.Error = types.ListValueMust(t, vs) +} + +// Stop a warehouse +type StopRequest_SdkV2 struct { + // Required. Id of the SQL warehouse. + Id types.String `tfsdk:"-"` +} + +func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopRequest_SdkV2) { +} + +func (newState *StopRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StopRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StopRequest_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, StopRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StopRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o StopRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type StopWarehouseResponse_SdkV2 struct { +} + +func (newState *StopWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan StopWarehouseResponse_SdkV2) { +} + +func (newState *StopWarehouseResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState StopWarehouseResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in StopWarehouseResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a StopWarehouseResponse_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, StopWarehouseResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o StopWarehouseResponse_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 StopWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type Success_SdkV2 struct { + Message types.String `tfsdk:"message" tf:"optional"` +} + +func (newState *Success_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Success_SdkV2) { +} + +func (newState *Success_SdkV2) SyncEffectiveFieldsDuringRead(existingState Success_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Success. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Success_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, Success_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Success_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Success_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + }, + } +} + +type TerminationReason_SdkV2 struct { + // status code indicating why the cluster was terminated + Code types.String `tfsdk:"code" tf:"optional"` + // list of parameters that provide additional information about why the + // cluster was terminated + Parameters types.Map `tfsdk:"parameters" tf:"optional"` + // type of the termination + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TerminationReason_SdkV2) { +} + +func (newState *TerminationReason_SdkV2) SyncEffectiveFieldsDuringRead(existingState TerminationReason_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TerminationReason. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TerminationReason_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": 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, TerminationReason_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TerminationReason_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "code": o.Code, + "parameters": o.Parameters, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TerminationReason_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "code": types.StringType, + "parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "type": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in TerminationReason_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 *TerminationReason_SdkV2) GetParameters(ctx context.Context) (map[string]types.String, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in TerminationReason_SdkV2. +func (o *TerminationReason_SdkV2) SetParameters(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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.MapValueMust(t, vs) +} + +type TextValue_SdkV2 struct { + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *TextValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TextValue_SdkV2) { +} + +func (newState *TextValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState TextValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TextValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TextValue_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, TextValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TextValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "value": o.Value, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TextValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "value": types.StringType, + }, + } +} + +type TimeRange_SdkV2 struct { + // The end time in milliseconds. + EndTimeMs types.Int64 `tfsdk:"end_time_ms" tf:"optional"` + // The start time in milliseconds. + StartTimeMs types.Int64 `tfsdk:"start_time_ms" tf:"optional"` +} + +func (newState *TimeRange_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TimeRange_SdkV2) { +} + +func (newState *TimeRange_SdkV2) SyncEffectiveFieldsDuringRead(existingState TimeRange_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TimeRange. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TimeRange_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, TimeRange_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TimeRange_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "end_time_ms": o.EndTimeMs, + "start_time_ms": o.StartTimeMs, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TimeRange_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "end_time_ms": types.Int64Type, + "start_time_ms": types.Int64Type, + }, + } +} + +type TransferOwnershipObjectId_SdkV2 struct { + // Email address for the new owner, who must exist in the workspace. + NewOwner types.String `tfsdk:"new_owner" tf:"optional"` +} + +func (newState *TransferOwnershipObjectId_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipObjectId_SdkV2) { +} + +func (newState *TransferOwnershipObjectId_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipObjectId_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipObjectId. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TransferOwnershipObjectId_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, TransferOwnershipObjectId_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TransferOwnershipObjectId_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "new_owner": o.NewOwner, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TransferOwnershipObjectId_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "new_owner": types.StringType, + }, + } +} + +// Transfer object ownership +type TransferOwnershipRequest_SdkV2 struct { + // Email address for the new owner, who must exist in the workspace. + NewOwner types.String `tfsdk:"new_owner" tf:"optional"` + // The ID of the object on which to change ownership. + ObjectId types.List `tfsdk:"-"` + // The type of object on which to change ownership. + ObjectType types.String `tfsdk:"-"` +} + +func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TransferOwnershipRequest_SdkV2) { +} + +func (newState *TransferOwnershipRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TransferOwnershipRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TransferOwnershipRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TransferOwnershipRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "objectId": reflect.TypeOf(TransferOwnershipObjectId_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, TransferOwnershipRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TransferOwnershipRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "new_owner": o.NewOwner, + "objectId": o.ObjectId, + "objectType": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TransferOwnershipRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "new_owner": types.StringType, + "objectId": basetypes.ListType{ + ElemType: TransferOwnershipObjectId{}.Type(ctx), + }, + "objectType": types.StringType, + }, + } +} + +// GetObjectId returns the value of the ObjectId field in TransferOwnershipRequest_SdkV2 as +// a TransferOwnershipObjectId_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *TransferOwnershipRequest_SdkV2) GetObjectId(ctx context.Context) (TransferOwnershipObjectId_SdkV2, bool) { + var e TransferOwnershipObjectId_SdkV2 + if o.ObjectId.IsNull() || o.ObjectId.IsUnknown() { + return e, false + } + var v []TransferOwnershipObjectId_SdkV2 + d := o.ObjectId.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetObjectId sets the value of the ObjectId field in TransferOwnershipRequest_SdkV2. +func (o *TransferOwnershipRequest_SdkV2) SetObjectId(ctx context.Context, v TransferOwnershipObjectId_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["objectId"] + o.ObjectId = types.ListValueMust(t, vs) +} + +// Delete an alert +type TrashAlertRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *TrashAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashAlertRequest_SdkV2) { +} + +func (newState *TrashAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashAlertRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashAlertRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TrashAlertRequest_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, TrashAlertRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TrashAlertRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TrashAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +// Delete a query +type TrashQueryRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` +} + +func (newState *TrashQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan TrashQueryRequest_SdkV2) { +} + +func (newState *TrashQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState TrashQueryRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in TrashQueryRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a TrashQueryRequest_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, TrashQueryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o TrashQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o TrashQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + }, + } +} + +type UpdateAlertRequest_SdkV2 struct { + Alert types.List `tfsdk:"alert" tf:"optional,object"` + + Id types.String `tfsdk:"-"` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + UpdateMask types.String `tfsdk:"update_mask" tf:""` +} + +func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequest_SdkV2) { +} + +func (newState *UpdateAlertRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAlertRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "alert": reflect.TypeOf(UpdateAlertRequestAlert_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, UpdateAlertRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAlertRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "alert": o.Alert, + "id": o.Id, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "alert": basetypes.ListType{ + ElemType: UpdateAlertRequestAlert{}.Type(ctx), + }, + "id": types.StringType, + "update_mask": types.StringType, + }, + } +} + +// GetAlert returns the value of the Alert field in UpdateAlertRequest_SdkV2 as +// a UpdateAlertRequestAlert_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAlertRequest_SdkV2) GetAlert(ctx context.Context) (UpdateAlertRequestAlert_SdkV2, bool) { + var e UpdateAlertRequestAlert_SdkV2 + if o.Alert.IsNull() || o.Alert.IsUnknown() { + return e, false + } + var v []UpdateAlertRequestAlert_SdkV2 + d := o.Alert.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetAlert sets the value of the Alert field in UpdateAlertRequest_SdkV2. +func (o *UpdateAlertRequest_SdkV2) SetAlert(ctx context.Context, v UpdateAlertRequestAlert_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] + o.Alert = types.ListValueMust(t, vs) +} + +type UpdateAlertRequestAlert_SdkV2 struct { + // Trigger conditions of the alert. + Condition types.List `tfsdk:"condition" tf:"optional,object"` + // Custom body of alert notification, if it exists. See [here] for custom + // templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomBody types.String `tfsdk:"custom_body" tf:"optional"` + // Custom subject of alert notification, if it exists. This can include + // email subject entries and Slack notification headers, for example. See + // [here] for custom templating instructions. + // + // [here]: https://docs.databricks.com/sql/user/alerts/index.html + CustomSubject types.String `tfsdk:"custom_subject" tf:"optional"` + // The display name of the alert. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Whether to notify alert subscribers when alert returns back to normal. + NotifyOnOk types.Bool `tfsdk:"notify_on_ok" tf:"optional"` + // The owner's username. This field is set to "Unavailable" if the user has + // been deleted. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // UUID of the query attached to the alert. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // Number of seconds an alert must wait after being triggered to rearm + // itself. After rearming, it can be triggered again. If 0 or not specified, + // the alert will not be triggered again. + SecondsToRetrigger types.Int64 `tfsdk:"seconds_to_retrigger" tf:"optional"` +} + +func (newState *UpdateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAlertRequestAlert_SdkV2) { +} + +func (newState *UpdateAlertRequestAlert_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAlertRequestAlert_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAlertRequestAlert. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAlertRequestAlert_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "condition": reflect.TypeOf(AlertCondition_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, UpdateAlertRequestAlert_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAlertRequestAlert_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "condition": o.Condition, + "custom_body": o.CustomBody, + "custom_subject": o.CustomSubject, + "display_name": o.DisplayName, + "notify_on_ok": o.NotifyOnOk, + "owner_user_name": o.OwnerUserName, + "query_id": o.QueryId, + "seconds_to_retrigger": o.SecondsToRetrigger, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAlertRequestAlert_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "condition": basetypes.ListType{ + ElemType: AlertCondition{}.Type(ctx), + }, + "custom_body": types.StringType, + "custom_subject": types.StringType, + "display_name": types.StringType, + "notify_on_ok": types.BoolType, + "owner_user_name": types.StringType, + "query_id": types.StringType, + "seconds_to_retrigger": types.Int64Type, + }, + } +} + +// GetCondition returns the value of the Condition field in UpdateAlertRequestAlert_SdkV2 as +// a AlertCondition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAlertRequestAlert_SdkV2) GetCondition(ctx context.Context) (AlertCondition_SdkV2, bool) { + var e AlertCondition_SdkV2 + if o.Condition.IsNull() || o.Condition.IsUnknown() { + return e, false + } + var v []AlertCondition_SdkV2 + d := o.Condition.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCondition sets the value of the Condition field in UpdateAlertRequestAlert_SdkV2. +func (o *UpdateAlertRequestAlert_SdkV2) SetCondition(ctx context.Context, v AlertCondition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] + o.Condition = types.ListValueMust(t, vs) +} + +type UpdateQueryRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` + + Query types.List `tfsdk:"query" tf:"optional,object"` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + UpdateMask types.String `tfsdk:"update_mask" tf:""` +} + +func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequest_SdkV2) { +} + +func (newState *UpdateQueryRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateQueryRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "query": reflect.TypeOf(UpdateQueryRequestQuery_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, UpdateQueryRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateQueryRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "query": o.Query, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "query": basetypes.ListType{ + ElemType: UpdateQueryRequestQuery{}.Type(ctx), + }, + "update_mask": types.StringType, + }, + } +} + +// GetQuery returns the value of the Query field in UpdateQueryRequest_SdkV2 as +// a UpdateQueryRequestQuery_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateQueryRequest_SdkV2) GetQuery(ctx context.Context) (UpdateQueryRequestQuery_SdkV2, bool) { + var e UpdateQueryRequestQuery_SdkV2 + if o.Query.IsNull() || o.Query.IsUnknown() { + return e, false + } + var v []UpdateQueryRequestQuery_SdkV2 + d := o.Query.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetQuery sets the value of the Query field in UpdateQueryRequest_SdkV2. +func (o *UpdateQueryRequest_SdkV2) SetQuery(ctx context.Context, v UpdateQueryRequestQuery_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] + o.Query = types.ListValueMust(t, vs) +} + +type UpdateQueryRequestQuery_SdkV2 struct { + // Whether to apply a 1000 row limit to the query result. + ApplyAutoLimit types.Bool `tfsdk:"apply_auto_limit" tf:"optional"` + // Name of the catalog where this query will be executed. + Catalog types.String `tfsdk:"catalog" tf:"optional"` + // General description that conveys additional information about this query + // such as usage notes. + Description types.String `tfsdk:"description" tf:"optional"` + // Display name of the query that appears in list views, widget headings, + // and on the query page. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // Username of the user that owns the query. + OwnerUserName types.String `tfsdk:"owner_user_name" tf:"optional"` + // List of query parameter definitions. + Parameters types.List `tfsdk:"parameters" tf:"optional"` + // Text of the query to be run. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // Sets the "Run as" role for the object. + RunAsMode types.String `tfsdk:"run_as_mode" tf:"optional"` + // Name of the schema where this query will be executed. + Schema types.String `tfsdk:"schema" tf:"optional"` + + Tags types.List `tfsdk:"tags" tf:"optional"` + // ID of the SQL warehouse attached to the query. + WarehouseId types.String `tfsdk:"warehouse_id" tf:"optional"` +} + +func (newState *UpdateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateQueryRequestQuery_SdkV2) { +} + +func (newState *UpdateQueryRequestQuery_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateQueryRequestQuery_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateQueryRequestQuery. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateQueryRequestQuery_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "parameters": reflect.TypeOf(QueryParameter_SdkV2{}), + "tags": 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, UpdateQueryRequestQuery_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateQueryRequestQuery_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "apply_auto_limit": o.ApplyAutoLimit, + "catalog": o.Catalog, + "description": o.Description, + "display_name": o.DisplayName, + "owner_user_name": o.OwnerUserName, + "parameters": o.Parameters, + "query_text": o.QueryText, + "run_as_mode": o.RunAsMode, + "schema": o.Schema, + "tags": o.Tags, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateQueryRequestQuery_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "apply_auto_limit": types.BoolType, + "catalog": types.StringType, + "description": types.StringType, + "display_name": types.StringType, + "owner_user_name": types.StringType, + "parameters": basetypes.ListType{ + ElemType: QueryParameter{}.Type(ctx), + }, + "query_text": types.StringType, + "run_as_mode": types.StringType, + "schema": types.StringType, + "tags": basetypes.ListType{ + ElemType: types.StringType, + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetParameters returns the value of the Parameters field in UpdateQueryRequestQuery_SdkV2 as +// a slice of QueryParameter_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateQueryRequestQuery_SdkV2) GetParameters(ctx context.Context) ([]QueryParameter_SdkV2, bool) { + if o.Parameters.IsNull() || o.Parameters.IsUnknown() { + return nil, false + } + var v []QueryParameter_SdkV2 + d := o.Parameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetParameters sets the value of the Parameters field in UpdateQueryRequestQuery_SdkV2. +func (o *UpdateQueryRequestQuery_SdkV2) SetParameters(ctx context.Context, v []QueryParameter_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["parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.Parameters = types.ListValueMust(t, vs) +} + +// GetTags returns the value of the Tags field in UpdateQueryRequestQuery_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateQueryRequestQuery_SdkV2) GetTags(ctx context.Context) ([]types.String, bool) { + if o.Tags.IsNull() || o.Tags.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Tags.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetTags sets the value of the Tags field in UpdateQueryRequestQuery_SdkV2. +func (o *UpdateQueryRequestQuery_SdkV2) SetTags(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["tags"] + t = t.(attr.TypeWithElementType).ElementType() + o.Tags = types.ListValueMust(t, vs) +} + +type UpdateResponse_SdkV2 struct { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateResponse_SdkV2) { +} + +func (newState *UpdateResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateResponse_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, UpdateResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse_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 UpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateVisualizationRequest_SdkV2 struct { + Id types.String `tfsdk:"-"` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + UpdateMask types.String `tfsdk:"update_mask" tf:""` + + Visualization types.List `tfsdk:"visualization" tf:"optional,object"` +} + +func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest_SdkV2) { +} + +func (newState *UpdateVisualizationRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateVisualizationRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "visualization": reflect.TypeOf(UpdateVisualizationRequestVisualization_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, UpdateVisualizationRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateVisualizationRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "update_mask": o.UpdateMask, + "visualization": o.Visualization, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateVisualizationRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "update_mask": types.StringType, + "visualization": basetypes.ListType{ + ElemType: UpdateVisualizationRequestVisualization{}.Type(ctx), + }, + }, + } +} + +// GetVisualization returns the value of the Visualization field in UpdateVisualizationRequest_SdkV2 as +// a UpdateVisualizationRequestVisualization_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateVisualizationRequest_SdkV2) GetVisualization(ctx context.Context) (UpdateVisualizationRequestVisualization_SdkV2, bool) { + var e UpdateVisualizationRequestVisualization_SdkV2 + if o.Visualization.IsNull() || o.Visualization.IsUnknown() { + return e, false + } + var v []UpdateVisualizationRequestVisualization_SdkV2 + d := o.Visualization.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVisualization sets the value of the Visualization field in UpdateVisualizationRequest_SdkV2. +func (o *UpdateVisualizationRequest_SdkV2) SetVisualization(ctx context.Context, v UpdateVisualizationRequestVisualization_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] + o.Visualization = types.ListValueMust(t, vs) +} + +type UpdateVisualizationRequestVisualization_SdkV2 struct { + // The display name of the visualization. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // The visualization options varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying + // visualization options directly. + SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + // The visualization query plan varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying the + // visualization query plan directly. + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + // The type of visualization: counter, table, funnel, and so on. + Type_ types.String `tfsdk:"type" tf:"optional"` +} + +func (newState *UpdateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequestVisualization_SdkV2) { +} + +func (newState *UpdateVisualizationRequestVisualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateVisualizationRequestVisualization_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateVisualizationRequestVisualization. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateVisualizationRequestVisualization_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, UpdateVisualizationRequestVisualization_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateVisualizationRequestVisualization_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "display_name": o.DisplayName, + "serialized_options": o.SerializedOptions, + "serialized_query_plan": o.SerializedQueryPlan, + "type": o.Type_, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateVisualizationRequestVisualization_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "display_name": types.StringType, + "serialized_options": types.StringType, + "serialized_query_plan": types.StringType, + "type": types.StringType, + }, + } +} + +type User_SdkV2 struct { + Email types.String `tfsdk:"email" tf:"optional"` + + Id types.Int64 `tfsdk:"id" tf:"optional"` + + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *User_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan User_SdkV2) { +} + +func (newState *User_SdkV2) SyncEffectiveFieldsDuringRead(existingState User_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in User. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a User_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, User_SdkV2 +// only implements ToObjectValue() and Type(). +func (o User_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "email": o.Email, + "id": o.Id, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o User_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "email": types.StringType, + "id": types.Int64Type, + "name": types.StringType, + }, + } +} + +type Visualization_SdkV2 struct { + // The timestamp indicating when the visualization was created. + CreateTime types.String `tfsdk:"create_time" tf:"optional"` + // The display name of the visualization. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // UUID identifying the visualization. + Id types.String `tfsdk:"id" tf:"optional"` + // UUID of the query that the visualization is attached to. + QueryId types.String `tfsdk:"query_id" tf:"optional"` + // The visualization options varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying + // visualization options directly. + SerializedOptions types.String `tfsdk:"serialized_options" tf:"optional"` + // The visualization query plan varies widely from one visualization type to + // the next and is unsupported. Databricks does not recommend modifying the + // visualization query plan directly. + SerializedQueryPlan types.String `tfsdk:"serialized_query_plan" tf:"optional"` + // The type of visualization: counter, table, funnel, and so on. + Type_ types.String `tfsdk:"type" tf:"optional"` + // The timestamp indicating when the visualization was updated. + UpdateTime types.String `tfsdk:"update_time" tf:"optional"` +} + +func (newState *Visualization_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Visualization_SdkV2) { +} + +func (newState *Visualization_SdkV2) SyncEffectiveFieldsDuringRead(existingState Visualization_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Visualization. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Visualization_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, Visualization_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Visualization_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "display_name": o.DisplayName, + "id": o.Id, + "query_id": o.QueryId, + "serialized_options": o.SerializedOptions, + "serialized_query_plan": o.SerializedQueryPlan, + "type": o.Type_, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Visualization_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "display_name": types.StringType, + "id": types.StringType, + "query_id": types.StringType, + "serialized_options": types.StringType, + "serialized_query_plan": types.StringType, + "type": types.StringType, + "update_time": types.StringType, + }, + } +} + +type WarehouseAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *WarehouseAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlRequest_SdkV2) { +} + +func (newState *WarehouseAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehouseAccessControlRequest_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, WarehouseAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehouseAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehouseAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type WarehouseAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *WarehouseAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseAccessControlResponse_SdkV2) { +} + +func (newState *WarehouseAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehouseAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(WarehousePermission_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, WarehouseAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehouseAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehouseAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: WarehousePermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in WarehouseAccessControlResponse_SdkV2 as +// a slice of WarehousePermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WarehouseAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]WarehousePermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []WarehousePermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in WarehouseAccessControlResponse_SdkV2. +func (o *WarehouseAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []WarehousePermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type WarehousePermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *WarehousePermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermission_SdkV2) { +} + +func (newState *WarehousePermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehousePermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, WarehousePermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehousePermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehousePermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in WarehousePermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *WarehousePermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in WarehousePermission_SdkV2. +func (o *WarehousePermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type WarehousePermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *WarehousePermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissions_SdkV2) { +} + +func (newState *WarehousePermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehousePermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(WarehouseAccessControlResponse_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, WarehousePermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehousePermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: WarehouseAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in WarehousePermissions_SdkV2 as +// a slice of WarehouseAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WarehousePermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]WarehouseAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []WarehouseAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in WarehousePermissions_SdkV2. +func (o *WarehousePermissions_SdkV2) SetAccessControlList(ctx context.Context, v []WarehouseAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type WarehousePermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *WarehousePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsDescription_SdkV2) { +} + +func (newState *WarehousePermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehousePermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehousePermissionsDescription_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, WarehousePermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehousePermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type WarehousePermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The SQL warehouse for which to get or manage permissions. + WarehouseId types.String `tfsdk:"-"` +} + +func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehousePermissionsRequest_SdkV2) { +} + +func (newState *WarehousePermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehousePermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehousePermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(WarehouseAccessControlRequest_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, WarehousePermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "warehouse_id": o.WarehouseId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehousePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: WarehouseAccessControlRequest{}.Type(ctx), + }, + "warehouse_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in WarehousePermissionsRequest_SdkV2 as +// a slice of WarehouseAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WarehousePermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]WarehouseAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []WarehouseAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in WarehousePermissionsRequest_SdkV2. +func (o *WarehousePermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []WarehouseAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type WarehouseTypePair_SdkV2 struct { + // If set to false the specific warehouse type will not be be allowed as a + // value for warehouse_type in CreateWarehouse and EditWarehouse + Enabled types.Bool `tfsdk:"enabled" tf:"optional"` + // Warehouse type: `PRO` or `CLASSIC`. + WarehouseType types.String `tfsdk:"warehouse_type" tf:"optional"` +} + +func (newState *WarehouseTypePair_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WarehouseTypePair_SdkV2) { +} + +func (newState *WarehouseTypePair_SdkV2) SyncEffectiveFieldsDuringRead(existingState WarehouseTypePair_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WarehouseTypePair. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WarehouseTypePair_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, WarehouseTypePair_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WarehouseTypePair_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "enabled": o.Enabled, + "warehouse_type": o.WarehouseType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WarehouseTypePair_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "enabled": types.BoolType, + "warehouse_type": types.StringType, + }, + } +} + +type Widget_SdkV2 struct { + // The unique ID for this widget. + Id types.String `tfsdk:"id" tf:"optional"` + + Options types.List `tfsdk:"options" tf:"optional,object"` + // The visualization description API changes frequently and is unsupported. + // You can duplicate a visualization by copying description objects received + // _from the API_ and then using them to create a new one with a POST + // request to the same endpoint. Databricks does not recommend constructing + // ad-hoc visualizations entirely in JSON. + Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + // Unused field. + Width types.Int64 `tfsdk:"width" tf:"optional"` +} + +func (newState *Widget_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Widget_SdkV2) { +} + +func (newState *Widget_SdkV2) SyncEffectiveFieldsDuringRead(existingState Widget_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Widget. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Widget_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "options": reflect.TypeOf(WidgetOptions_SdkV2{}), + "visualization": reflect.TypeOf(LegacyVisualization_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, Widget_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Widget_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "id": o.Id, + "options": o.Options, + "visualization": o.Visualization, + "width": o.Width, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Widget_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "id": types.StringType, + "options": basetypes.ListType{ + ElemType: WidgetOptions{}.Type(ctx), + }, + "visualization": basetypes.ListType{ + ElemType: LegacyVisualization{}.Type(ctx), + }, + "width": types.Int64Type, + }, + } +} + +// GetOptions returns the value of the Options field in Widget_SdkV2 as +// a WidgetOptions_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Widget_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 Widget_SdkV2. +func (o *Widget_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) +} + +// GetVisualization returns the value of the Visualization field in Widget_SdkV2 as +// a LegacyVisualization_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Widget_SdkV2) GetVisualization(ctx context.Context) (LegacyVisualization_SdkV2, bool) { + var e LegacyVisualization_SdkV2 + if o.Visualization.IsNull() || o.Visualization.IsUnknown() { + return e, false + } + var v []LegacyVisualization_SdkV2 + d := o.Visualization.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVisualization sets the value of the Visualization field in Widget_SdkV2. +func (o *Widget_SdkV2) SetVisualization(ctx context.Context, v LegacyVisualization_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] + o.Visualization = types.ListValueMust(t, vs) +} + +type WidgetOptions_SdkV2 struct { + // Timestamp when this object was created + CreatedAt types.String `tfsdk:"created_at" tf:"optional"` + // Custom description of the widget + Description types.String `tfsdk:"description" tf:"optional"` + // Whether this widget is hidden on the dashboard. + IsHidden types.Bool `tfsdk:"isHidden" tf:"optional"` + // How parameters used by the visualization in this widget relate to other + // widgets on the dashboard. Databricks does not recommend modifying this + // definition in JSON. + ParameterMappings types.Object `tfsdk:"parameterMappings" tf:"optional"` + // Coordinates of this widget on a dashboard. This portion of the API + // changes frequently and is unsupported. + Position types.List `tfsdk:"position" tf:"optional,object"` + // Custom title of the widget + Title types.String `tfsdk:"title" tf:"optional"` + // Timestamp of the last time this object was updated. + UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` +} + +func (newState *WidgetOptions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetOptions_SdkV2) { +} + +func (newState *WidgetOptions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WidgetOptions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetOptions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WidgetOptions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "position": reflect.TypeOf(WidgetPosition_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, WidgetOptions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WidgetOptions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "description": o.Description, + "isHidden": o.IsHidden, + "parameterMappings": o.ParameterMappings, + "position": o.Position, + "title": o.Title, + "updated_at": o.UpdatedAt, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WidgetOptions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.StringType, + "description": types.StringType, + "isHidden": types.BoolType, + "parameterMappings": types.ObjectType{}, + "position": basetypes.ListType{ + ElemType: WidgetPosition{}.Type(ctx), + }, + "title": types.StringType, + "updated_at": types.StringType, + }, + } +} + +// GetPosition returns the value of the Position field in WidgetOptions_SdkV2 as +// a WidgetPosition_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *WidgetOptions_SdkV2) GetPosition(ctx context.Context) (WidgetPosition_SdkV2, bool) { + var e WidgetPosition_SdkV2 + if o.Position.IsNull() || o.Position.IsUnknown() { + return e, false + } + var v []WidgetPosition_SdkV2 + d := o.Position.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPosition sets the value of the Position field in WidgetOptions_SdkV2. +func (o *WidgetOptions_SdkV2) SetPosition(ctx context.Context, v WidgetPosition_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["position"] + o.Position = types.ListValueMust(t, vs) +} + +// Coordinates of this widget on a dashboard. This portion of the API changes +// frequently and is unsupported. +type WidgetPosition_SdkV2 struct { + // reserved for internal use + AutoHeight types.Bool `tfsdk:"autoHeight" tf:"optional"` + // column in the dashboard grid. Values start with 0 + Col types.Int64 `tfsdk:"col" tf:"optional"` + // row in the dashboard grid. Values start with 0 + Row types.Int64 `tfsdk:"row" tf:"optional"` + // width of the widget measured in dashboard grid cells + SizeX types.Int64 `tfsdk:"sizeX" tf:"optional"` + // height of the widget measured in dashboard grid cells + SizeY types.Int64 `tfsdk:"sizeY" tf:"optional"` +} + +func (newState *WidgetPosition_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WidgetPosition_SdkV2) { +} + +func (newState *WidgetPosition_SdkV2) SyncEffectiveFieldsDuringRead(existingState WidgetPosition_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WidgetPosition. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WidgetPosition_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, WidgetPosition_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WidgetPosition_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "autoHeight": o.AutoHeight, + "col": o.Col, + "row": o.Row, + "sizeX": o.SizeX, + "sizeY": o.SizeY, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WidgetPosition_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "autoHeight": types.BoolType, + "col": types.Int64Type, + "row": types.Int64Type, + "sizeX": types.Int64Type, + "sizeY": types.Int64Type, + }, + } +} diff --git a/internal/service/sql_tf/model.go b/internal/service/sql_tf/model.go index 9fe1288aa..e204a761c 100755 --- a/internal/service/sql_tf/model.go +++ b/internal/service/sql_tf/model.go @@ -73,7 +73,7 @@ func (o AccessControl) Type(ctx context.Context) attr.Type { type Alert struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"optional,object"` // The timestamp indicating when the alert was created. CreateTime types.String `tfsdk:"create_time" tf:"optional"` // Custom body of alert notification, if it exists. See [here] for custom @@ -165,9 +165,7 @@ func (o Alert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Alert) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), - }, + "condition": AlertCondition{}.Type(ctx), "create_time": types.StringType, "custom_body": types.StringType, "custom_subject": types.StringType, @@ -195,7 +193,10 @@ func (o *Alert) GetCondition(ctx context.Context) (AlertCondition, bool) { return e, false } var v []AlertCondition - d := o.Condition.ElementsAs(ctx, &v, true) + d := o.Condition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -207,9 +208,8 @@ func (o *Alert) GetCondition(ctx context.Context) (AlertCondition, bool) { // SetCondition sets the value of the Condition field in Alert. func (o *Alert) SetCondition(ctx context.Context, v AlertCondition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] - o.Condition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Condition = vs } type AlertCondition struct { @@ -219,9 +219,9 @@ type AlertCondition struct { Op types.String `tfsdk:"op" tf:"optional"` // Name of the column from the query result to use for comparison in alert // evaluation. - Operand types.List `tfsdk:"operand" tf:"optional,object"` + Operand types.Object `tfsdk:"operand" tf:"optional,object"` // Threshold value used for comparison in alert evaluation. - Threshold types.List `tfsdk:"threshold" tf:"optional,object"` + Threshold types.Object `tfsdk:"threshold" tf:"optional,object"` } func (newState *AlertCondition) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertCondition) { @@ -264,12 +264,8 @@ func (o AlertCondition) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "empty_result_state": types.StringType, "op": types.StringType, - "operand": basetypes.ListType{ - ElemType: AlertConditionOperand{}.Type(ctx), - }, - "threshold": basetypes.ListType{ - ElemType: AlertConditionThreshold{}.Type(ctx), - }, + "operand": AlertConditionOperand{}.Type(ctx), + "threshold": AlertConditionThreshold{}.Type(ctx), }, } } @@ -283,7 +279,10 @@ func (o *AlertCondition) GetOperand(ctx context.Context) (AlertConditionOperand, return e, false } var v []AlertConditionOperand - d := o.Operand.ElementsAs(ctx, &v, true) + d := o.Operand.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -295,9 +294,8 @@ func (o *AlertCondition) GetOperand(ctx context.Context) (AlertConditionOperand, // SetOperand sets the value of the Operand field in AlertCondition. func (o *AlertCondition) SetOperand(ctx context.Context, v AlertConditionOperand) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["operand"] - o.Operand = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Operand = vs } // GetThreshold returns the value of the Threshold field in AlertCondition as @@ -309,7 +307,10 @@ func (o *AlertCondition) GetThreshold(ctx context.Context) (AlertConditionThresh return e, false } var v []AlertConditionThreshold - d := o.Threshold.ElementsAs(ctx, &v, true) + d := o.Threshold.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -321,13 +322,12 @@ func (o *AlertCondition) GetThreshold(ctx context.Context) (AlertConditionThresh // SetThreshold sets the value of the Threshold field in AlertCondition. func (o *AlertCondition) SetThreshold(ctx context.Context, v AlertConditionThreshold) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["threshold"] - o.Threshold = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Threshold = vs } type AlertConditionOperand struct { - Column types.List `tfsdk:"column" tf:"optional,object"` + Column types.Object `tfsdk:"column" tf:"optional,object"` } func (newState *AlertConditionOperand) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionOperand) { @@ -364,9 +364,7 @@ func (o AlertConditionOperand) ToObjectValue(ctx context.Context) basetypes.Obje func (o AlertConditionOperand) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "column": basetypes.ListType{ - ElemType: AlertOperandColumn{}.Type(ctx), - }, + "column": AlertOperandColumn{}.Type(ctx), }, } } @@ -380,7 +378,10 @@ func (o *AlertConditionOperand) GetColumn(ctx context.Context) (AlertOperandColu return e, false } var v []AlertOperandColumn - d := o.Column.ElementsAs(ctx, &v, true) + d := o.Column.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -392,13 +393,12 @@ func (o *AlertConditionOperand) GetColumn(ctx context.Context) (AlertOperandColu // SetColumn sets the value of the Column field in AlertConditionOperand. func (o *AlertConditionOperand) SetColumn(ctx context.Context, v AlertOperandColumn) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["column"] - o.Column = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Column = vs } type AlertConditionThreshold struct { - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"optional,object"` } func (newState *AlertConditionThreshold) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertConditionThreshold) { @@ -435,9 +435,7 @@ func (o AlertConditionThreshold) ToObjectValue(ctx context.Context) basetypes.Ob func (o AlertConditionThreshold) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "value": basetypes.ListType{ - ElemType: AlertOperandValue{}.Type(ctx), - }, + "value": AlertOperandValue{}.Type(ctx), }, } } @@ -451,7 +449,10 @@ func (o *AlertConditionThreshold) GetValue(ctx context.Context) (AlertOperandVal return e, false } var v []AlertOperandValue - d := o.Value.ElementsAs(ctx, &v, true) + d := o.Value.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -463,9 +464,8 @@ func (o *AlertConditionThreshold) GetValue(ctx context.Context) (AlertOperandVal // SetValue sets the value of the Value field in AlertConditionThreshold. func (o *AlertConditionThreshold) SetValue(ctx context.Context, v AlertOperandValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] - o.Value = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Value = vs } type AlertOperandColumn struct { @@ -666,7 +666,7 @@ type AlertQuery struct { // on the query page. Name types.String `tfsdk:"name" tf:"optional"` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"optional,object"` // The text of the query to be run. Query types.String `tfsdk:"query" tf:"optional"` @@ -732,10 +732,8 @@ func (o AlertQuery) Type(ctx context.Context) attr.Type { "is_draft": types.BoolType, "is_safe": types.BoolType, "name": types.StringType, - "options": basetypes.ListType{ - ElemType: QueryOptions{}.Type(ctx), - }, - "query": types.StringType, + "options": QueryOptions{}.Type(ctx), + "query": types.StringType, "tags": basetypes.ListType{ ElemType: types.StringType, }, @@ -754,7 +752,10 @@ func (o *AlertQuery) GetOptions(ctx context.Context) (QueryOptions, bool) { return e, false } var v []QueryOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -766,9 +767,8 @@ func (o *AlertQuery) GetOptions(ctx context.Context) (QueryOptions, bool) { // SetOptions sets the value of the Options field in AlertQuery. func (o *AlertQuery) SetOptions(ctx context.Context, v QueryOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // GetTags returns the value of the Tags field in AlertQuery as @@ -1102,7 +1102,7 @@ type CreateAlert struct { // Name of the alert. Name types.String `tfsdk:"name" tf:""` // Alert configuration options. - Options types.List `tfsdk:"options" tf:"object"` + Options types.Object `tfsdk:"options" tf:"object"` // The identifier of the workspace folder containing the object. Parent types.String `tfsdk:"parent" tf:"optional"` // Query ID. @@ -1151,10 +1151,8 @@ func (o CreateAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o CreateAlert) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "name": types.StringType, - "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), - }, + "name": types.StringType, + "options": AlertOptions{}.Type(ctx), "parent": types.StringType, "query_id": types.StringType, "rearm": types.Int64Type, @@ -1171,7 +1169,10 @@ func (o *CreateAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { return e, false } var v []AlertOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1183,13 +1184,12 @@ func (o *CreateAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { // SetOptions sets the value of the Options field in CreateAlert. func (o *CreateAlert) SetOptions(ctx context.Context, v AlertOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } type CreateAlertRequest struct { - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"optional,object"` } func (newState *CreateAlertRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAlertRequest) { @@ -1226,9 +1226,7 @@ func (o CreateAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CreateAlertRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "alert": basetypes.ListType{ - ElemType: CreateAlertRequestAlert{}.Type(ctx), - }, + "alert": CreateAlertRequestAlert{}.Type(ctx), }, } } @@ -1242,7 +1240,10 @@ func (o *CreateAlertRequest) GetAlert(ctx context.Context) (CreateAlertRequestAl return e, false } var v []CreateAlertRequestAlert - d := o.Alert.ElementsAs(ctx, &v, true) + d := o.Alert.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1254,14 +1255,13 @@ func (o *CreateAlertRequest) GetAlert(ctx context.Context) (CreateAlertRequestAl // SetAlert sets the value of the Alert field in CreateAlertRequest. func (o *CreateAlertRequest) SetAlert(ctx context.Context, v CreateAlertRequestAlert) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] - o.Alert = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Alert = vs } type CreateAlertRequestAlert struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"optional,object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // @@ -1328,9 +1328,7 @@ func (o CreateAlertRequestAlert) ToObjectValue(ctx context.Context) basetypes.Ob func (o CreateAlertRequestAlert) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), - }, + "condition": AlertCondition{}.Type(ctx), "custom_body": types.StringType, "custom_subject": types.StringType, "display_name": types.StringType, @@ -1351,7 +1349,10 @@ func (o *CreateAlertRequestAlert) GetCondition(ctx context.Context) (AlertCondit return e, false } var v []AlertCondition - d := o.Condition.ElementsAs(ctx, &v, true) + d := o.Condition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1363,13 +1364,12 @@ func (o *CreateAlertRequestAlert) GetCondition(ctx context.Context) (AlertCondit // SetCondition sets the value of the Condition field in CreateAlertRequestAlert. func (o *CreateAlertRequestAlert) SetCondition(ctx context.Context, v AlertCondition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] - o.Condition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Condition = vs } type CreateQueryRequest struct { - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` } func (newState *CreateQueryRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateQueryRequest) { @@ -1406,9 +1406,7 @@ func (o CreateQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CreateQueryRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "query": basetypes.ListType{ - ElemType: CreateQueryRequestQuery{}.Type(ctx), - }, + "query": CreateQueryRequestQuery{}.Type(ctx), }, } } @@ -1422,7 +1420,10 @@ func (o *CreateQueryRequest) GetQuery(ctx context.Context) (CreateQueryRequestQu return e, false } var v []CreateQueryRequestQuery - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1434,9 +1435,8 @@ func (o *CreateQueryRequest) GetQuery(ctx context.Context) (CreateQueryRequestQu // SetQuery sets the value of the Query field in CreateQueryRequest. func (o *CreateQueryRequest) SetQuery(ctx context.Context, v CreateQueryRequestQuery) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } type CreateQueryRequestQuery struct { @@ -1646,7 +1646,7 @@ func (o CreateQueryVisualizationsLegacyRequest) Type(ctx context.Context) attr.T } type CreateVisualizationRequest struct { - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` } func (newState *CreateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVisualizationRequest) { @@ -1683,9 +1683,7 @@ func (o CreateVisualizationRequest) ToObjectValue(ctx context.Context) basetypes func (o CreateVisualizationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "visualization": basetypes.ListType{ - ElemType: CreateVisualizationRequestVisualization{}.Type(ctx), - }, + "visualization": CreateVisualizationRequestVisualization{}.Type(ctx), }, } } @@ -1699,7 +1697,10 @@ func (o *CreateVisualizationRequest) GetVisualization(ctx context.Context) (Crea return e, false } var v []CreateVisualizationRequestVisualization - d := o.Visualization.ElementsAs(ctx, &v, true) + d := o.Visualization.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1711,9 +1712,8 @@ func (o *CreateVisualizationRequest) GetVisualization(ctx context.Context) (Crea // SetVisualization sets the value of the Visualization field in CreateVisualizationRequest. func (o *CreateVisualizationRequest) SetVisualization(ctx context.Context, v CreateVisualizationRequestVisualization) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] - o.Visualization = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Visualization = vs } type CreateVisualizationRequestVisualization struct { @@ -1789,7 +1789,7 @@ type CreateWarehouseRequest struct { // Defaults to 120 mins AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. @@ -1835,7 +1835,7 @@ type CreateWarehouseRequest struct { // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"optional,object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. @@ -1889,10 +1889,8 @@ func (o CreateWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.Obj func (o CreateWarehouseRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_stop_mins": types.Int64Type, - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, + "auto_stop_mins": types.Int64Type, + "channel": Channel{}.Type(ctx), "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, @@ -1902,10 +1900,8 @@ func (o CreateWarehouseRequest) Type(ctx context.Context) attr.Type { "min_num_clusters": types.Int64Type, "name": types.StringType, "spot_instance_policy": types.StringType, - "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), - }, - "warehouse_type": types.StringType, + "tags": EndpointTags{}.Type(ctx), + "warehouse_type": types.StringType, }, } } @@ -1919,7 +1915,10 @@ func (o *CreateWarehouseRequest) GetChannel(ctx context.Context) (Channel, bool) return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1931,9 +1930,8 @@ func (o *CreateWarehouseRequest) GetChannel(ctx context.Context) (Channel, bool) // SetChannel sets the value of the Channel field in CreateWarehouseRequest. func (o *CreateWarehouseRequest) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetTags returns the value of the Tags field in CreateWarehouseRequest as @@ -1945,7 +1943,10 @@ func (o *CreateWarehouseRequest) GetTags(ctx context.Context) (EndpointTags, boo return e, false } var v []EndpointTags - d := o.Tags.ElementsAs(ctx, &v, true) + d := o.Tags.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1957,9 +1958,8 @@ func (o *CreateWarehouseRequest) GetTags(ctx context.Context) (EndpointTags, boo // SetTags sets the value of the Tags field in CreateWarehouseRequest. func (o *CreateWarehouseRequest) SetTags(ctx context.Context, v EndpointTags) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] - o.Tags = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Tags = vs } type CreateWarehouseResponse struct { @@ -2010,7 +2010,7 @@ type CreateWidget struct { // Widget ID returned by :method:dashboardwidgets/create Id types.String `tfsdk:"-"` - Options types.List `tfsdk:"options" tf:"object"` + Options types.Object `tfsdk:"options" tf:"object"` // 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. @@ -2060,11 +2060,9 @@ func (o CreateWidget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { 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": basetypes.ListType{ - ElemType: WidgetOptions{}.Type(ctx), - }, + "dashboard_id": types.StringType, + "id": types.StringType, + "options": WidgetOptions{}.Type(ctx), "text": types.StringType, "visualization_id": types.StringType, "width": types.Int64Type, @@ -2081,7 +2079,10 @@ func (o *CreateWidget) GetOptions(ctx context.Context) (WidgetOptions, bool) { return e, false } var v []WidgetOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2093,9 +2094,8 @@ func (o *CreateWidget) GetOptions(ctx context.Context) (WidgetOptions, bool) { // SetOptions sets the value of the Options field in CreateWidget. func (o *CreateWidget) SetOptions(ctx context.Context, v WidgetOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // A JSON representing a dashboard containing widgets of visualizations and text @@ -2126,7 +2126,7 @@ type Dashboard struct { // the dashboard page. Name types.String `tfsdk:"name" tf:"optional"` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"optional,object"` // The identifier of the workspace folder containing the object. Parent types.String `tfsdk:"parent" tf:"optional"` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * @@ -2140,7 +2140,7 @@ type Dashboard struct { // Timestamp when this dashboard was last updated. UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"optional,object"` // The ID of the user who owns the dashboard. UserId types.Int64 `tfsdk:"user_id" tf:"optional"` @@ -2208,20 +2208,16 @@ func (o Dashboard) Type(ctx context.Context) attr.Type { "is_draft": types.BoolType, "is_favorite": types.BoolType, "name": types.StringType, - "options": basetypes.ListType{ - ElemType: DashboardOptions{}.Type(ctx), - }, - "parent": types.StringType, - "permission_tier": types.StringType, - "slug": types.StringType, + "options": DashboardOptions{}.Type(ctx), + "parent": types.StringType, + "permission_tier": types.StringType, + "slug": types.StringType, "tags": basetypes.ListType{ ElemType: types.StringType, }, "updated_at": types.StringType, - "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), - }, - "user_id": types.Int64Type, + "user": User{}.Type(ctx), + "user_id": types.Int64Type, "widgets": basetypes.ListType{ ElemType: Widget{}.Type(ctx), }, @@ -2238,7 +2234,10 @@ func (o *Dashboard) GetOptions(ctx context.Context) (DashboardOptions, bool) { return e, false } var v []DashboardOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2250,9 +2249,8 @@ func (o *Dashboard) GetOptions(ctx context.Context) (DashboardOptions, bool) { // SetOptions sets the value of the Options field in Dashboard. func (o *Dashboard) SetOptions(ctx context.Context, v DashboardOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // GetTags returns the value of the Tags field in Dashboard as @@ -2290,7 +2288,10 @@ func (o *Dashboard) GetUser(ctx context.Context) (User, bool) { return e, false } var v []User - d := o.User.ElementsAs(ctx, &v, true) + d := o.User.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2302,9 +2303,8 @@ func (o *Dashboard) GetUser(ctx context.Context) (User, bool) { // SetUser sets the value of the User field in Dashboard. func (o *Dashboard) SetUser(ctx context.Context, v User) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] - o.User = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.User = vs } // GetWidgets returns the value of the Widgets field in Dashboard as @@ -2687,7 +2687,7 @@ func (o DateRange) Type(ctx context.Context) attr.Type { type DateRangeValue struct { // Manually specified date-time range value. - DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.Object `tfsdk:"date_range_value" tf:"optional,object"` // Dynamic date-time range value based on current date-time. DynamicDateRangeValue types.String `tfsdk:"dynamic_date_range_value" tf:"optional"` // Date-time precision to format the value into when the query is run. @@ -2734,9 +2734,7 @@ func (o DateRangeValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o DateRangeValue) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "date_range_value": basetypes.ListType{ - ElemType: DateRange{}.Type(ctx), - }, + "date_range_value": DateRange{}.Type(ctx), "dynamic_date_range_value": types.StringType, "precision": types.StringType, "start_day_of_week": types.Int64Type, @@ -2753,7 +2751,10 @@ func (o *DateRangeValue) GetDateRangeValue(ctx context.Context) (DateRange, bool return e, false } var v []DateRange - d := o.DateRangeValue.ElementsAs(ctx, &v, true) + d := o.DateRangeValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2765,9 +2766,8 @@ func (o *DateRangeValue) GetDateRangeValue(ctx context.Context) (DateRange, bool // SetDateRangeValue sets the value of the DateRangeValue field in DateRangeValue. func (o *DateRangeValue) SetDateRangeValue(ctx context.Context, v DateRange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_range_value"] - o.DateRangeValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DateRangeValue = vs } type DateValue struct { @@ -3195,7 +3195,7 @@ type EditAlert struct { // Name of the alert. Name types.String `tfsdk:"name" tf:""` // Alert configuration options. - Options types.List `tfsdk:"options" tf:"object"` + Options types.Object `tfsdk:"options" tf:"object"` // Query ID. QueryId types.String `tfsdk:"query_id" tf:""` // Number of seconds after being triggered before the alert rearms itself @@ -3244,9 +3244,7 @@ func (o EditAlert) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "alert_id": types.StringType, "name": types.StringType, - "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), - }, + "options": AlertOptions{}.Type(ctx), "query_id": types.StringType, "rearm": types.Int64Type, }, @@ -3262,7 +3260,10 @@ func (o *EditAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { return e, false } var v []AlertOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3274,9 +3275,8 @@ func (o *EditAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { // SetOptions sets the value of the Options field in EditAlert. func (o *EditAlert) SetOptions(ctx context.Context, v AlertOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } type EditWarehouseRequest struct { @@ -3288,7 +3288,7 @@ type EditWarehouseRequest struct { // Defaults to 120 mins AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. @@ -3336,7 +3336,7 @@ type EditWarehouseRequest struct { // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"optional,object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. @@ -3391,10 +3391,8 @@ func (o EditWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.Objec func (o EditWarehouseRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_stop_mins": types.Int64Type, - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, + "auto_stop_mins": types.Int64Type, + "channel": Channel{}.Type(ctx), "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, @@ -3405,10 +3403,8 @@ func (o EditWarehouseRequest) Type(ctx context.Context) attr.Type { "min_num_clusters": types.Int64Type, "name": types.StringType, "spot_instance_policy": types.StringType, - "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), - }, - "warehouse_type": types.StringType, + "tags": EndpointTags{}.Type(ctx), + "warehouse_type": types.StringType, }, } } @@ -3422,7 +3418,10 @@ func (o *EditWarehouseRequest) GetChannel(ctx context.Context) (Channel, bool) { return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3434,9 +3433,8 @@ func (o *EditWarehouseRequest) GetChannel(ctx context.Context) (Channel, bool) { // SetChannel sets the value of the Channel field in EditWarehouseRequest. func (o *EditWarehouseRequest) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetTags returns the value of the Tags field in EditWarehouseRequest as @@ -3448,7 +3446,10 @@ func (o *EditWarehouseRequest) GetTags(ctx context.Context) (EndpointTags, bool) return e, false } var v []EndpointTags - d := o.Tags.ElementsAs(ctx, &v, true) + d := o.Tags.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3460,9 +3461,8 @@ func (o *EditWarehouseRequest) GetTags(ctx context.Context) (EndpointTags, bool) // SetTags sets the value of the Tags field in EditWarehouseRequest. func (o *EditWarehouseRequest) SetTags(ctx context.Context, v EndpointTags) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] - o.Tags = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Tags = vs } type EditWarehouseResponse struct { @@ -3589,7 +3589,7 @@ type EndpointHealth struct { Details types.String `tfsdk:"details" tf:"optional"` // The reason for failure to bring up clusters for this warehouse. This is // available when status is 'FAILED' and sometimes when it is DEGRADED. - FailureReason types.List `tfsdk:"failure_reason" tf:"optional,object"` + FailureReason types.Object `tfsdk:"failure_reason" tf:"optional,object"` // Deprecated. split into summary and details for security Message types.String `tfsdk:"message" tf:"optional"` // Health status of the warehouse. @@ -3637,13 +3637,11 @@ func (o EndpointHealth) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o EndpointHealth) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "details": types.StringType, - "failure_reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), - }, - "message": types.StringType, - "status": types.StringType, - "summary": types.StringType, + "details": types.StringType, + "failure_reason": TerminationReason{}.Type(ctx), + "message": types.StringType, + "status": types.StringType, + "summary": types.StringType, }, } } @@ -3657,7 +3655,10 @@ func (o *EndpointHealth) GetFailureReason(ctx context.Context) (TerminationReaso return e, false } var v []TerminationReason - d := o.FailureReason.ElementsAs(ctx, &v, true) + d := o.FailureReason.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3669,9 +3670,8 @@ func (o *EndpointHealth) GetFailureReason(ctx context.Context) (TerminationReaso // SetFailureReason sets the value of the FailureReason field in EndpointHealth. func (o *EndpointHealth) SetFailureReason(ctx context.Context, v TerminationReason) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["failure_reason"] - o.FailureReason = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FailureReason = vs } type EndpointInfo struct { @@ -3683,7 +3683,7 @@ type EndpointInfo struct { // Defaults to 120 mins AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. @@ -3701,7 +3701,7 @@ type EndpointInfo struct { EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // unique identifier for warehouse Id types.String `tfsdk:"id" tf:"optional"` // Deprecated. Instance profile used to pass IAM role to the cluster @@ -3735,7 +3735,7 @@ type EndpointInfo struct { // current number of clusters running for the service NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` // ODBC parameters for the SQL warehouse - OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.Object `tfsdk:"odbc_params" tf:"optional,object"` // Configurations whether the warehouse should use spot instances. SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` // State of the warehouse @@ -3744,7 +3744,7 @@ type EndpointInfo struct { // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"optional,object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. @@ -3807,34 +3807,26 @@ func (o EndpointInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o EndpointInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_stop_mins": types.Int64Type, - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, + "auto_stop_mins": types.Int64Type, + "channel": Channel{}.Type(ctx), "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, "enable_serverless_compute": types.BoolType, - "health": basetypes.ListType{ - ElemType: EndpointHealth{}.Type(ctx), - }, - "id": types.StringType, - "instance_profile_arn": types.StringType, - "jdbc_url": types.StringType, - "max_num_clusters": types.Int64Type, - "min_num_clusters": types.Int64Type, - "name": types.StringType, - "num_active_sessions": types.Int64Type, - "num_clusters": types.Int64Type, - "odbc_params": basetypes.ListType{ - ElemType: OdbcParams{}.Type(ctx), - }, - "spot_instance_policy": types.StringType, - "state": types.StringType, - "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), - }, - "warehouse_type": types.StringType, + "health": EndpointHealth{}.Type(ctx), + "id": types.StringType, + "instance_profile_arn": types.StringType, + "jdbc_url": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "num_active_sessions": types.Int64Type, + "num_clusters": types.Int64Type, + "odbc_params": OdbcParams{}.Type(ctx), + "spot_instance_policy": types.StringType, + "state": types.StringType, + "tags": EndpointTags{}.Type(ctx), + "warehouse_type": types.StringType, }, } } @@ -3848,7 +3840,10 @@ func (o *EndpointInfo) GetChannel(ctx context.Context) (Channel, bool) { return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3860,9 +3855,8 @@ func (o *EndpointInfo) GetChannel(ctx context.Context) (Channel, bool) { // SetChannel sets the value of the Channel field in EndpointInfo. func (o *EndpointInfo) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetHealth returns the value of the Health field in EndpointInfo as @@ -3874,7 +3868,10 @@ func (o *EndpointInfo) GetHealth(ctx context.Context) (EndpointHealth, bool) { return e, false } var v []EndpointHealth - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3886,9 +3883,8 @@ func (o *EndpointInfo) GetHealth(ctx context.Context) (EndpointHealth, bool) { // SetHealth sets the value of the Health field in EndpointInfo. func (o *EndpointInfo) SetHealth(ctx context.Context, v EndpointHealth) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetOdbcParams returns the value of the OdbcParams field in EndpointInfo as @@ -3900,7 +3896,10 @@ func (o *EndpointInfo) GetOdbcParams(ctx context.Context) (OdbcParams, bool) { return e, false } var v []OdbcParams - d := o.OdbcParams.ElementsAs(ctx, &v, true) + d := o.OdbcParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3912,9 +3911,8 @@ func (o *EndpointInfo) GetOdbcParams(ctx context.Context) (OdbcParams, bool) { // SetOdbcParams sets the value of the OdbcParams field in EndpointInfo. func (o *EndpointInfo) SetOdbcParams(ctx context.Context, v OdbcParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["odbc_params"] - o.OdbcParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OdbcParams = vs } // GetTags returns the value of the Tags field in EndpointInfo as @@ -3926,7 +3924,10 @@ func (o *EndpointInfo) GetTags(ctx context.Context) (EndpointTags, bool) { return e, false } var v []EndpointTags - d := o.Tags.ElementsAs(ctx, &v, true) + d := o.Tags.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3938,9 +3939,8 @@ func (o *EndpointInfo) GetTags(ctx context.Context) (EndpointTags, bool) { // SetTags sets the value of the Tags field in EndpointInfo. func (o *EndpointInfo) SetTags(ctx context.Context, v EndpointTags) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] - o.Tags = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Tags = vs } type EndpointTagPair struct { @@ -4063,7 +4063,7 @@ type EnumValue struct { // List of valid query parameter values, newline delimited. EnumOptions types.String `tfsdk:"enum_options" tf:"optional"` // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"optional,object"` // List of selected query parameter values. Values types.List `tfsdk:"values" tf:"optional"` } @@ -4105,10 +4105,8 @@ func (o EnumValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o EnumValue) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "enum_options": types.StringType, - "multi_values_options": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), - }, + "enum_options": types.StringType, + "multi_values_options": MultiValuesOptions{}.Type(ctx), "values": basetypes.ListType{ ElemType: types.StringType, }, @@ -4125,7 +4123,10 @@ func (o *EnumValue) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptio return e, false } var v []MultiValuesOptions - d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + d := o.MultiValuesOptions.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -4137,9 +4138,8 @@ func (o *EnumValue) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptio // SetMultiValuesOptions sets the value of the MultiValuesOptions field in EnumValue. func (o *EnumValue) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multi_values_options"] - o.MultiValuesOptions = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MultiValuesOptions = vs } // GetValues returns the value of the Values field in EnumValue as @@ -5134,7 +5134,7 @@ type GetWarehouseResponse struct { // Defaults to 120 mins AutoStopMins types.Int64 `tfsdk:"auto_stop_mins" tf:"optional"` // Channel Details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Size of the clusters allocated for this warehouse. Increasing the size of // a spark cluster allows you to run larger queries on it. If you want to // increase the number of concurrent queries, please tune max_num_clusters. @@ -5152,7 +5152,7 @@ type GetWarehouseResponse struct { EnableServerlessCompute types.Bool `tfsdk:"enable_serverless_compute" tf:"optional"` // Optional health status. Assume the warehouse is healthy if this field is // not set. - Health types.List `tfsdk:"health" tf:"optional,object"` + Health types.Object `tfsdk:"health" tf:"optional,object"` // unique identifier for warehouse Id types.String `tfsdk:"id" tf:"optional"` // Deprecated. Instance profile used to pass IAM role to the cluster @@ -5186,7 +5186,7 @@ type GetWarehouseResponse struct { // current number of clusters running for the service NumClusters types.Int64 `tfsdk:"num_clusters" tf:"optional"` // ODBC parameters for the SQL warehouse - OdbcParams types.List `tfsdk:"odbc_params" tf:"optional,object"` + OdbcParams types.Object `tfsdk:"odbc_params" tf:"optional,object"` // Configurations whether the warehouse should use spot instances. SpotInstancePolicy types.String `tfsdk:"spot_instance_policy" tf:"optional"` // State of the warehouse @@ -5195,7 +5195,7 @@ type GetWarehouseResponse struct { // instances and EBS volumes) associated with this SQL warehouse. // // Supported values: - Number of tags < 45. - Tags types.List `tfsdk:"tags" tf:"optional,object"` + Tags types.Object `tfsdk:"tags" tf:"optional,object"` // Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless // compute, you must set to `PRO` and also set the field // `enable_serverless_compute` to `true`. @@ -5258,34 +5258,26 @@ func (o GetWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.Objec func (o GetWarehouseResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "auto_stop_mins": types.Int64Type, - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, + "auto_stop_mins": types.Int64Type, + "channel": Channel{}.Type(ctx), "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, "enable_serverless_compute": types.BoolType, - "health": basetypes.ListType{ - ElemType: EndpointHealth{}.Type(ctx), - }, - "id": types.StringType, - "instance_profile_arn": types.StringType, - "jdbc_url": types.StringType, - "max_num_clusters": types.Int64Type, - "min_num_clusters": types.Int64Type, - "name": types.StringType, - "num_active_sessions": types.Int64Type, - "num_clusters": types.Int64Type, - "odbc_params": basetypes.ListType{ - ElemType: OdbcParams{}.Type(ctx), - }, - "spot_instance_policy": types.StringType, - "state": types.StringType, - "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), - }, - "warehouse_type": types.StringType, + "health": EndpointHealth{}.Type(ctx), + "id": types.StringType, + "instance_profile_arn": types.StringType, + "jdbc_url": types.StringType, + "max_num_clusters": types.Int64Type, + "min_num_clusters": types.Int64Type, + "name": types.StringType, + "num_active_sessions": types.Int64Type, + "num_clusters": types.Int64Type, + "odbc_params": OdbcParams{}.Type(ctx), + "spot_instance_policy": types.StringType, + "state": types.StringType, + "tags": EndpointTags{}.Type(ctx), + "warehouse_type": types.StringType, }, } } @@ -5299,7 +5291,10 @@ func (o *GetWarehouseResponse) GetChannel(ctx context.Context) (Channel, bool) { return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5311,9 +5306,8 @@ func (o *GetWarehouseResponse) GetChannel(ctx context.Context) (Channel, bool) { // SetChannel sets the value of the Channel field in GetWarehouseResponse. func (o *GetWarehouseResponse) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetHealth returns the value of the Health field in GetWarehouseResponse as @@ -5325,7 +5319,10 @@ func (o *GetWarehouseResponse) GetHealth(ctx context.Context) (EndpointHealth, b return e, false } var v []EndpointHealth - d := o.Health.ElementsAs(ctx, &v, true) + d := o.Health.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5337,9 +5334,8 @@ func (o *GetWarehouseResponse) GetHealth(ctx context.Context) (EndpointHealth, b // SetHealth sets the value of the Health field in GetWarehouseResponse. func (o *GetWarehouseResponse) SetHealth(ctx context.Context, v EndpointHealth) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["health"] - o.Health = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Health = vs } // GetOdbcParams returns the value of the OdbcParams field in GetWarehouseResponse as @@ -5351,7 +5347,10 @@ func (o *GetWarehouseResponse) GetOdbcParams(ctx context.Context) (OdbcParams, b return e, false } var v []OdbcParams - d := o.OdbcParams.ElementsAs(ctx, &v, true) + d := o.OdbcParams.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5363,9 +5362,8 @@ func (o *GetWarehouseResponse) GetOdbcParams(ctx context.Context) (OdbcParams, b // SetOdbcParams sets the value of the OdbcParams field in GetWarehouseResponse. func (o *GetWarehouseResponse) SetOdbcParams(ctx context.Context, v OdbcParams) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["odbc_params"] - o.OdbcParams = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.OdbcParams = vs } // GetTags returns the value of the Tags field in GetWarehouseResponse as @@ -5377,7 +5375,10 @@ func (o *GetWarehouseResponse) GetTags(ctx context.Context) (EndpointTags, bool) return e, false } var v []EndpointTags - d := o.Tags.ElementsAs(ctx, &v, true) + d := o.Tags.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5389,16 +5390,15 @@ func (o *GetWarehouseResponse) GetTags(ctx context.Context) (EndpointTags, bool) // SetTags sets the value of the Tags field in GetWarehouseResponse. func (o *GetWarehouseResponse) SetTags(ctx context.Context, v EndpointTags) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["tags"] - o.Tags = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Tags = vs } type GetWorkspaceWarehouseConfigResponse struct { // Optional: Channel selection details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.Object `tfsdk:"config_param" tf:"optional,object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` @@ -5410,7 +5410,7 @@ type GetWorkspaceWarehouseConfigResponse struct { // specific type availability in the warehouse create and edit form UI. EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` // Deprecated: Use sql_configuration_parameters - GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.Object `tfsdk:"global_param" tf:"optional,object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` @@ -5419,7 +5419,7 @@ type GetWorkspaceWarehouseConfigResponse struct { // Security policy for warehouses SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` // SQL configuration parameters - SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"optional,object"` } func (newState *GetWorkspaceWarehouseConfigResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceWarehouseConfigResponse) { @@ -5469,27 +5469,19 @@ func (o GetWorkspaceWarehouseConfigResponse) ToObjectValue(ctx context.Context) func (o GetWorkspaceWarehouseConfigResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, - "config_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, + "channel": Channel{}.Type(ctx), + "config_param": RepeatedEndpointConfPairs{}.Type(ctx), "data_access_config": basetypes.ListType{ ElemType: EndpointConfPair{}.Type(ctx), }, "enabled_warehouse_types": basetypes.ListType{ ElemType: WarehouseTypePair{}.Type(ctx), }, - "global_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, - "google_service_account": types.StringType, - "instance_profile_arn": types.StringType, - "security_policy": types.StringType, - "sql_configuration_parameters": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, + "global_param": RepeatedEndpointConfPairs{}.Type(ctx), + "google_service_account": types.StringType, + "instance_profile_arn": types.StringType, + "security_policy": types.StringType, + "sql_configuration_parameters": RepeatedEndpointConfPairs{}.Type(ctx), }, } } @@ -5503,7 +5495,10 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetChannel(ctx context.Context) (C return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5515,9 +5510,8 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetChannel(ctx context.Context) (C // SetChannel sets the value of the Channel field in GetWorkspaceWarehouseConfigResponse. func (o *GetWorkspaceWarehouseConfigResponse) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetConfigParam returns the value of the ConfigParam field in GetWorkspaceWarehouseConfigResponse as @@ -5529,7 +5523,10 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetConfigParam(ctx context.Context return e, false } var v []RepeatedEndpointConfPairs - d := o.ConfigParam.ElementsAs(ctx, &v, true) + d := o.ConfigParam.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5541,9 +5538,8 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetConfigParam(ctx context.Context // SetConfigParam sets the value of the ConfigParam field in GetWorkspaceWarehouseConfigResponse. func (o *GetWorkspaceWarehouseConfigResponse) SetConfigParam(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config_param"] - o.ConfigParam = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConfigParam = vs } // GetDataAccessConfig returns the value of the DataAccessConfig field in GetWorkspaceWarehouseConfigResponse as @@ -5607,7 +5603,10 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetGlobalParam(ctx context.Context return e, false } var v []RepeatedEndpointConfPairs - d := o.GlobalParam.ElementsAs(ctx, &v, true) + d := o.GlobalParam.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5619,9 +5618,8 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetGlobalParam(ctx context.Context // SetGlobalParam sets the value of the GlobalParam field in GetWorkspaceWarehouseConfigResponse. func (o *GetWorkspaceWarehouseConfigResponse) SetGlobalParam(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["global_param"] - o.GlobalParam = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GlobalParam = vs } // GetSqlConfigurationParameters returns the value of the SqlConfigurationParameters field in GetWorkspaceWarehouseConfigResponse as @@ -5633,7 +5631,10 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetSqlConfigurationParameters(ctx return e, false } var v []RepeatedEndpointConfPairs - d := o.SqlConfigurationParameters.ElementsAs(ctx, &v, true) + d := o.SqlConfigurationParameters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5645,9 +5646,8 @@ func (o *GetWorkspaceWarehouseConfigResponse) GetSqlConfigurationParameters(ctx // SetSqlConfigurationParameters sets the value of the SqlConfigurationParameters field in GetWorkspaceWarehouseConfigResponse. func (o *GetWorkspaceWarehouseConfigResponse) SetSqlConfigurationParameters(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_configuration_parameters"] - o.SqlConfigurationParameters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlConfigurationParameters = vs } type LegacyAlert struct { @@ -5660,11 +5660,11 @@ type LegacyAlert struct { // Name of the alert. Name types.String `tfsdk:"name" tf:"optional"` // Alert configuration options. - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"optional,object"` // The identifier of the workspace folder containing the object. Parent types.String `tfsdk:"parent" tf:"optional"` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` // Number of seconds after being triggered before the alert rearms itself // and can be triggered again. If `null`, alert will never be triggered // again. @@ -5676,7 +5676,7 @@ type LegacyAlert struct { // Timestamp when the alert was last updated. UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"optional,object"` } func (newState *LegacyAlert) SyncEffectiveFieldsDuringCreateOrUpdate(plan LegacyAlert) { @@ -5729,19 +5729,13 @@ func (o LegacyAlert) Type(ctx context.Context) attr.Type { "id": types.StringType, "last_triggered_at": types.StringType, "name": types.StringType, - "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), - }, - "parent": types.StringType, - "query": basetypes.ListType{ - ElemType: AlertQuery{}.Type(ctx), - }, - "rearm": types.Int64Type, - "state": types.StringType, - "updated_at": types.StringType, - "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), - }, + "options": AlertOptions{}.Type(ctx), + "parent": types.StringType, + "query": AlertQuery{}.Type(ctx), + "rearm": types.Int64Type, + "state": types.StringType, + "updated_at": types.StringType, + "user": User{}.Type(ctx), }, } } @@ -5755,7 +5749,10 @@ func (o *LegacyAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { return e, false } var v []AlertOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5767,9 +5764,8 @@ func (o *LegacyAlert) GetOptions(ctx context.Context) (AlertOptions, bool) { // SetOptions sets the value of the Options field in LegacyAlert. func (o *LegacyAlert) SetOptions(ctx context.Context, v AlertOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // GetQuery returns the value of the Query field in LegacyAlert as @@ -5781,7 +5777,10 @@ func (o *LegacyAlert) GetQuery(ctx context.Context) (AlertQuery, bool) { return e, false } var v []AlertQuery - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5793,9 +5792,8 @@ func (o *LegacyAlert) GetQuery(ctx context.Context) (AlertQuery, bool) { // SetQuery sets the value of the Query field in LegacyAlert. func (o *LegacyAlert) SetQuery(ctx context.Context, v AlertQuery) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } // GetUser returns the value of the User field in LegacyAlert as @@ -5807,7 +5805,10 @@ func (o *LegacyAlert) GetUser(ctx context.Context) (User, bool) { return e, false } var v []User - d := o.User.ElementsAs(ctx, &v, true) + d := o.User.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -5819,9 +5820,8 @@ func (o *LegacyAlert) GetUser(ctx context.Context) (User, bool) { // SetUser sets the value of the User field in LegacyAlert. func (o *LegacyAlert) SetUser(ctx context.Context, v User) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] - o.User = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.User = vs } type LegacyQuery struct { @@ -5858,7 +5858,7 @@ type LegacyQuery struct { // type parameters are handled safely. IsSafe types.Bool `tfsdk:"is_safe" tf:"optional"` - LastModifiedBy types.List `tfsdk:"last_modified_by" tf:"optional,object"` + LastModifiedBy types.Object `tfsdk:"last_modified_by" tf:"optional,object"` // The ID of the user who last saved changes to this query. LastModifiedById types.Int64 `tfsdk:"last_modified_by_id" tf:"optional"` // If there is a cached result for this query and user, this field includes @@ -5869,7 +5869,7 @@ type LegacyQuery struct { // on the query page. Name types.String `tfsdk:"name" tf:"optional"` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"optional,object"` // The identifier of the workspace folder containing the object. Parent types.String `tfsdk:"parent" tf:"optional"` // * `CAN_VIEW`: Can view the query * `CAN_RUN`: Can run the query * @@ -5888,7 +5888,7 @@ type LegacyQuery struct { // The timestamp at which this query was last updated. UpdatedAt types.String `tfsdk:"updated_at" tf:"optional"` - User types.List `tfsdk:"user" tf:"optional,object"` + User types.Object `tfsdk:"user" tf:"optional,object"` // The ID of the user who owns the query. UserId types.Int64 `tfsdk:"user_id" tf:"optional"` @@ -5956,37 +5956,31 @@ func (o LegacyQuery) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o LegacyQuery) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "can_edit": types.BoolType, - "created_at": types.StringType, - "data_source_id": types.StringType, - "description": types.StringType, - "id": types.StringType, - "is_archived": types.BoolType, - "is_draft": types.BoolType, - "is_favorite": types.BoolType, - "is_safe": types.BoolType, - "last_modified_by": basetypes.ListType{ - ElemType: User{}.Type(ctx), - }, + "can_edit": types.BoolType, + "created_at": types.StringType, + "data_source_id": types.StringType, + "description": types.StringType, + "id": types.StringType, + "is_archived": types.BoolType, + "is_draft": types.BoolType, + "is_favorite": types.BoolType, + "is_safe": types.BoolType, + "last_modified_by": User{}.Type(ctx), "last_modified_by_id": types.Int64Type, "latest_query_data_id": types.StringType, "name": types.StringType, - "options": basetypes.ListType{ - ElemType: QueryOptions{}.Type(ctx), - }, - "parent": types.StringType, - "permission_tier": types.StringType, - "query": types.StringType, - "query_hash": types.StringType, - "run_as_role": types.StringType, + "options": QueryOptions{}.Type(ctx), + "parent": types.StringType, + "permission_tier": types.StringType, + "query": types.StringType, + "query_hash": types.StringType, + "run_as_role": types.StringType, "tags": basetypes.ListType{ ElemType: types.StringType, }, "updated_at": types.StringType, - "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), - }, - "user_id": types.Int64Type, + "user": User{}.Type(ctx), + "user_id": types.Int64Type, "visualizations": basetypes.ListType{ ElemType: LegacyVisualization{}.Type(ctx), }, @@ -6003,7 +5997,10 @@ func (o *LegacyQuery) GetLastModifiedBy(ctx context.Context) (User, bool) { return e, false } var v []User - d := o.LastModifiedBy.ElementsAs(ctx, &v, true) + d := o.LastModifiedBy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6015,9 +6012,8 @@ func (o *LegacyQuery) GetLastModifiedBy(ctx context.Context) (User, bool) { // SetLastModifiedBy sets the value of the LastModifiedBy field in LegacyQuery. func (o *LegacyQuery) SetLastModifiedBy(ctx context.Context, v User) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["last_modified_by"] - o.LastModifiedBy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.LastModifiedBy = vs } // GetOptions returns the value of the Options field in LegacyQuery as @@ -6029,7 +6025,10 @@ func (o *LegacyQuery) GetOptions(ctx context.Context) (QueryOptions, bool) { return e, false } var v []QueryOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6041,9 +6040,8 @@ func (o *LegacyQuery) GetOptions(ctx context.Context) (QueryOptions, bool) { // SetOptions sets the value of the Options field in LegacyQuery. func (o *LegacyQuery) SetOptions(ctx context.Context, v QueryOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // GetTags returns the value of the Tags field in LegacyQuery as @@ -6081,7 +6079,10 @@ func (o *LegacyQuery) GetUser(ctx context.Context) (User, bool) { return e, false } var v []User - d := o.User.ElementsAs(ctx, &v, true) + d := o.User.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6093,9 +6094,8 @@ func (o *LegacyQuery) GetUser(ctx context.Context) (User, bool) { // SetUser sets the value of the User field in LegacyQuery. func (o *LegacyQuery) SetUser(ctx context.Context, v User) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["user"] - o.User = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.User = vs } // GetVisualizations returns the value of the Visualizations field in LegacyQuery as @@ -6144,7 +6144,7 @@ type LegacyVisualization struct { // settings in JSON. Options types.Object `tfsdk:"options" tf:"optional"` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` // The type of visualization: chart, table, pivot table, and so on. Type_ types.String `tfsdk:"type" tf:"optional"` @@ -6197,11 +6197,9 @@ func (o LegacyVisualization) Type(ctx context.Context) attr.Type { "id": types.StringType, "name": types.StringType, "options": types.ObjectType{}, - "query": basetypes.ListType{ - ElemType: LegacyQuery{}.Type(ctx), - }, - "type": types.StringType, - "updated_at": types.StringType, + "query": LegacyQuery{}.Type(ctx), + "type": types.StringType, + "updated_at": types.StringType, }, } } @@ -6215,7 +6213,10 @@ func (o *LegacyVisualization) GetQuery(ctx context.Context) (LegacyQuery, bool) return e, false } var v []LegacyQuery - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6227,9 +6228,8 @@ func (o *LegacyVisualization) GetQuery(ctx context.Context) (LegacyQuery, bool) // SetQuery sets the value of the Query field in LegacyVisualization. func (o *LegacyVisualization) SetQuery(ctx context.Context, v LegacyQuery) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } // List alerts @@ -6355,7 +6355,7 @@ func (o *ListAlertsResponse) SetResults(ctx context.Context, v []ListAlertsRespo type ListAlertsResponseAlert struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"optional,object"` // The timestamp indicating when the alert was created. CreateTime types.String `tfsdk:"create_time" tf:"optional"` // Custom body of alert notification, if it exists. See [here] for custom @@ -6444,9 +6444,7 @@ func (o ListAlertsResponseAlert) ToObjectValue(ctx context.Context) basetypes.Ob func (o ListAlertsResponseAlert) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), - }, + "condition": AlertCondition{}.Type(ctx), "create_time": types.StringType, "custom_body": types.StringType, "custom_subject": types.StringType, @@ -6473,7 +6471,10 @@ func (o *ListAlertsResponseAlert) GetCondition(ctx context.Context) (AlertCondit return e, false } var v []AlertCondition - d := o.Condition.ElementsAs(ctx, &v, true) + d := o.Condition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6485,9 +6486,8 @@ func (o *ListAlertsResponseAlert) GetCondition(ctx context.Context) (AlertCondit // SetCondition sets the value of the Condition field in ListAlertsResponseAlert. func (o *ListAlertsResponseAlert) SetCondition(ctx context.Context, v AlertCondition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] - o.Condition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Condition = vs } // Get dashboard objects @@ -6742,7 +6742,7 @@ func (o *ListQueriesResponse) SetRes(ctx context.Context, v []QueryInfo) { // List Queries type ListQueryHistoryRequest struct { // A filter to limit query history results. This field is optional. - FilterBy types.List `tfsdk:"-"` + FilterBy types.Object `tfsdk:"-"` // Whether to include the query metrics with each query. Only use this for a // small subset of queries (max_results). Defaults to false. IncludeMetrics types.Bool `tfsdk:"-"` @@ -6793,9 +6793,7 @@ func (o ListQueryHistoryRequest) ToObjectValue(ctx context.Context) basetypes.Ob func (o ListQueryHistoryRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "filter_by": basetypes.ListType{ - ElemType: QueryFilter{}.Type(ctx), - }, + "filter_by": QueryFilter{}.Type(ctx), "include_metrics": types.BoolType, "max_results": types.Int64Type, "page_token": types.StringType, @@ -6812,7 +6810,10 @@ func (o *ListQueryHistoryRequest) GetFilterBy(ctx context.Context) (QueryFilter, return e, false } var v []QueryFilter - d := o.FilterBy.ElementsAs(ctx, &v, true) + d := o.FilterBy.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -6824,9 +6825,8 @@ func (o *ListQueryHistoryRequest) GetFilterBy(ctx context.Context) (QueryFilter, // SetFilterBy sets the value of the FilterBy field in ListQueryHistoryRequest. func (o *ListQueryHistoryRequest) SetFilterBy(ctx context.Context, v QueryFilter) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["filter_by"] - o.FilterBy = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.FilterBy = vs } type ListQueryObjectsResponse struct { @@ -7543,7 +7543,7 @@ type Parameter struct { EnumOptions types.String `tfsdk:"enumOptions" tf:"optional"` // If specified, allows multiple values to be selected for this parameter. // Only applies to dropdown list and query-based dropdown list parameters. - MultiValuesOptions types.List `tfsdk:"multiValuesOptions" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multiValuesOptions" tf:"optional,object"` // The literal parameter marker that appears between double curly braces in // the query text. Name types.String `tfsdk:"name" tf:"optional"` @@ -7598,15 +7598,13 @@ func (o Parameter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Parameter) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "enumOptions": types.StringType, - "multiValuesOptions": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), - }, - "name": types.StringType, - "queryId": types.StringType, - "title": types.StringType, - "type": types.StringType, - "value": types.ObjectType{}, + "enumOptions": types.StringType, + "multiValuesOptions": MultiValuesOptions{}.Type(ctx), + "name": types.StringType, + "queryId": types.StringType, + "title": types.StringType, + "type": types.StringType, + "value": types.ObjectType{}, }, } } @@ -7620,7 +7618,10 @@ func (o *Parameter) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptio return e, false } var v []MultiValuesOptions - d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + d := o.MultiValuesOptions.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7632,9 +7633,8 @@ func (o *Parameter) GetMultiValuesOptions(ctx context.Context) (MultiValuesOptio // SetMultiValuesOptions sets the value of the MultiValuesOptions field in Parameter. func (o *Parameter) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multiValuesOptions"] - o.MultiValuesOptions = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MultiValuesOptions = vs } type Query struct { @@ -7806,7 +7806,7 @@ func (o *Query) SetTags(ctx context.Context, v []types.String) { type QueryBackedValue struct { // If specified, allows multiple values to be selected for this parameter. - MultiValuesOptions types.List `tfsdk:"multi_values_options" tf:"optional,object"` + MultiValuesOptions types.Object `tfsdk:"multi_values_options" tf:"optional,object"` // UUID of the query that provides the parameter values. QueryId types.String `tfsdk:"query_id" tf:"optional"` // List of selected query parameter values. @@ -7850,10 +7850,8 @@ func (o QueryBackedValue) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o QueryBackedValue) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "multi_values_options": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), - }, - "query_id": types.StringType, + "multi_values_options": MultiValuesOptions{}.Type(ctx), + "query_id": types.StringType, "values": basetypes.ListType{ ElemType: types.StringType, }, @@ -7870,7 +7868,10 @@ func (o *QueryBackedValue) GetMultiValuesOptions(ctx context.Context) (MultiValu return e, false } var v []MultiValuesOptions - d := o.MultiValuesOptions.ElementsAs(ctx, &v, true) + d := o.MultiValuesOptions.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -7882,9 +7883,8 @@ func (o *QueryBackedValue) GetMultiValuesOptions(ctx context.Context) (MultiValu // SetMultiValuesOptions sets the value of the MultiValuesOptions field in QueryBackedValue. func (o *QueryBackedValue) SetMultiValuesOptions(ctx context.Context, v MultiValuesOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["multi_values_options"] - o.MultiValuesOptions = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.MultiValuesOptions = vs } // GetValues returns the value of the Values field in QueryBackedValue as @@ -8025,7 +8025,7 @@ func (o *QueryEditContent) SetTags(ctx context.Context, v []types.String) { type QueryFilter struct { // A range filter for query submitted time. The time range must be <= 30 // days. - QueryStartTimeRange types.List `tfsdk:"query_start_time_range" tf:"optional,object"` + QueryStartTimeRange types.Object `tfsdk:"query_start_time_range" tf:"optional,object"` // A list of statement IDs. StatementIds types.List `tfsdk:"statement_ids" tf:"optional"` @@ -8078,9 +8078,7 @@ func (o QueryFilter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o QueryFilter) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "query_start_time_range": basetypes.ListType{ - ElemType: TimeRange{}.Type(ctx), - }, + "query_start_time_range": TimeRange{}.Type(ctx), "statement_ids": basetypes.ListType{ ElemType: types.StringType, }, @@ -8106,7 +8104,10 @@ func (o *QueryFilter) GetQueryStartTimeRange(ctx context.Context) (TimeRange, bo return e, false } var v []TimeRange - d := o.QueryStartTimeRange.ElementsAs(ctx, &v, true) + d := o.QueryStartTimeRange.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8118,9 +8119,8 @@ func (o *QueryFilter) GetQueryStartTimeRange(ctx context.Context) (TimeRange, bo // SetQueryStartTimeRange sets the value of the QueryStartTimeRange field in QueryFilter. func (o *QueryFilter) SetQueryStartTimeRange(ctx context.Context, v TimeRange) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_start_time_range"] - o.QueryStartTimeRange = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueryStartTimeRange = vs } // GetStatementIds returns the value of the StatementIds field in QueryFilter as @@ -8229,7 +8229,7 @@ func (o *QueryFilter) SetWarehouseIds(ctx context.Context, v []types.String) { type QueryInfo struct { // SQL Warehouse channel information at the time of query execution - ChannelUsed types.List `tfsdk:"channel_used" tf:"optional,object"` + ChannelUsed types.Object `tfsdk:"channel_used" tf:"optional,object"` // Total execution time of the statement ( excluding result fetch time ). Duration types.Int64 `tfsdk:"duration" tf:"optional"` // Alias for `warehouse_id`. @@ -8248,7 +8248,7 @@ type QueryInfo struct { // A key that can be used to look up query details. LookupKey types.String `tfsdk:"lookup_key" tf:"optional"` // Metrics about query execution. - Metrics types.List `tfsdk:"metrics" tf:"optional,object"` + Metrics types.Object `tfsdk:"metrics" tf:"optional,object"` // Whether plans exist for the execution, or the reason why they are missing PlansState types.String `tfsdk:"plans_state" tf:"optional"` // The time the query ended. @@ -8335,9 +8335,7 @@ func (o QueryInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o QueryInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "channel_used": basetypes.ListType{ - ElemType: ChannelInfo{}.Type(ctx), - }, + "channel_used": ChannelInfo{}.Type(ctx), "duration": types.Int64Type, "endpoint_id": types.StringType, "error_message": types.StringType, @@ -8346,21 +8344,19 @@ func (o QueryInfo) Type(ctx context.Context) attr.Type { "execution_end_time_ms": types.Int64Type, "is_final": types.BoolType, "lookup_key": types.StringType, - "metrics": basetypes.ListType{ - ElemType: QueryMetrics{}.Type(ctx), - }, - "plans_state": types.StringType, - "query_end_time_ms": types.Int64Type, - "query_id": types.StringType, - "query_start_time_ms": types.Int64Type, - "query_text": types.StringType, - "rows_produced": types.Int64Type, - "spark_ui_url": types.StringType, - "statement_type": types.StringType, - "status": types.StringType, - "user_id": types.Int64Type, - "user_name": types.StringType, - "warehouse_id": types.StringType, + "metrics": QueryMetrics{}.Type(ctx), + "plans_state": types.StringType, + "query_end_time_ms": types.Int64Type, + "query_id": types.StringType, + "query_start_time_ms": types.Int64Type, + "query_text": types.StringType, + "rows_produced": types.Int64Type, + "spark_ui_url": types.StringType, + "statement_type": types.StringType, + "status": types.StringType, + "user_id": types.Int64Type, + "user_name": types.StringType, + "warehouse_id": types.StringType, }, } } @@ -8374,7 +8370,10 @@ func (o *QueryInfo) GetChannelUsed(ctx context.Context) (ChannelInfo, bool) { return e, false } var v []ChannelInfo - d := o.ChannelUsed.ElementsAs(ctx, &v, true) + d := o.ChannelUsed.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8386,9 +8385,8 @@ func (o *QueryInfo) GetChannelUsed(ctx context.Context) (ChannelInfo, bool) { // SetChannelUsed sets the value of the ChannelUsed field in QueryInfo. func (o *QueryInfo) SetChannelUsed(ctx context.Context, v ChannelInfo) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel_used"] - o.ChannelUsed = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ChannelUsed = vs } // GetMetrics returns the value of the Metrics field in QueryInfo as @@ -8400,7 +8398,10 @@ func (o *QueryInfo) GetMetrics(ctx context.Context) (QueryMetrics, bool) { return e, false } var v []QueryMetrics - d := o.Metrics.ElementsAs(ctx, &v, true) + d := o.Metrics.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8412,9 +8413,8 @@ func (o *QueryInfo) GetMetrics(ctx context.Context) (QueryMetrics, bool) { // SetMetrics sets the value of the Metrics field in QueryInfo. func (o *QueryInfo) SetMetrics(ctx context.Context, v QueryMetrics) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["metrics"] - o.Metrics = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Metrics = vs } type QueryList struct { @@ -8730,21 +8730,21 @@ func (o *QueryOptions) SetParameters(ctx context.Context, v []Parameter) { type QueryParameter struct { // Date-range query parameter value. Can only specify one of // `dynamic_date_range_value` or `date_range_value`. - DateRangeValue types.List `tfsdk:"date_range_value" tf:"optional,object"` + DateRangeValue types.Object `tfsdk:"date_range_value" tf:"optional,object"` // Date query parameter value. Can only specify one of `dynamic_date_value` // or `date_value`. - DateValue types.List `tfsdk:"date_value" tf:"optional,object"` + DateValue types.Object `tfsdk:"date_value" tf:"optional,object"` // Dropdown query parameter value. - EnumValue types.List `tfsdk:"enum_value" tf:"optional,object"` + EnumValue types.Object `tfsdk:"enum_value" tf:"optional,object"` // Literal parameter marker that appears between double curly braces in the // query text. Name types.String `tfsdk:"name" tf:"optional"` // Numeric query parameter value. - NumericValue types.List `tfsdk:"numeric_value" tf:"optional,object"` + NumericValue types.Object `tfsdk:"numeric_value" tf:"optional,object"` // Query-based dropdown query parameter value. - QueryBackedValue types.List `tfsdk:"query_backed_value" tf:"optional,object"` + QueryBackedValue types.Object `tfsdk:"query_backed_value" tf:"optional,object"` // Text query parameter value. - TextValue types.List `tfsdk:"text_value" tf:"optional,object"` + TextValue types.Object `tfsdk:"text_value" tf:"optional,object"` // Text displayed in the user-facing parameter widget in the UI. Title types.String `tfsdk:"title" tf:"optional"` } @@ -8795,26 +8795,14 @@ func (o QueryParameter) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o QueryParameter) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "date_range_value": basetypes.ListType{ - ElemType: DateRangeValue{}.Type(ctx), - }, - "date_value": basetypes.ListType{ - ElemType: DateValue{}.Type(ctx), - }, - "enum_value": basetypes.ListType{ - ElemType: EnumValue{}.Type(ctx), - }, - "name": types.StringType, - "numeric_value": basetypes.ListType{ - ElemType: NumericValue{}.Type(ctx), - }, - "query_backed_value": basetypes.ListType{ - ElemType: QueryBackedValue{}.Type(ctx), - }, - "text_value": basetypes.ListType{ - ElemType: TextValue{}.Type(ctx), - }, - "title": types.StringType, + "date_range_value": DateRangeValue{}.Type(ctx), + "date_value": DateValue{}.Type(ctx), + "enum_value": EnumValue{}.Type(ctx), + "name": types.StringType, + "numeric_value": NumericValue{}.Type(ctx), + "query_backed_value": QueryBackedValue{}.Type(ctx), + "text_value": TextValue{}.Type(ctx), + "title": types.StringType, }, } } @@ -8828,7 +8816,10 @@ func (o *QueryParameter) GetDateRangeValue(ctx context.Context) (DateRangeValue, return e, false } var v []DateRangeValue - d := o.DateRangeValue.ElementsAs(ctx, &v, true) + d := o.DateRangeValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8840,9 +8831,8 @@ func (o *QueryParameter) GetDateRangeValue(ctx context.Context) (DateRangeValue, // SetDateRangeValue sets the value of the DateRangeValue field in QueryParameter. func (o *QueryParameter) SetDateRangeValue(ctx context.Context, v DateRangeValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_range_value"] - o.DateRangeValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DateRangeValue = vs } // GetDateValue returns the value of the DateValue field in QueryParameter as @@ -8854,7 +8844,10 @@ func (o *QueryParameter) GetDateValue(ctx context.Context) (DateValue, bool) { return e, false } var v []DateValue - d := o.DateValue.ElementsAs(ctx, &v, true) + d := o.DateValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8866,9 +8859,8 @@ func (o *QueryParameter) GetDateValue(ctx context.Context) (DateValue, bool) { // SetDateValue sets the value of the DateValue field in QueryParameter. func (o *QueryParameter) SetDateValue(ctx context.Context, v DateValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["date_value"] - o.DateValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DateValue = vs } // GetEnumValue returns the value of the EnumValue field in QueryParameter as @@ -8880,7 +8872,10 @@ func (o *QueryParameter) GetEnumValue(ctx context.Context) (EnumValue, bool) { return e, false } var v []EnumValue - d := o.EnumValue.ElementsAs(ctx, &v, true) + d := o.EnumValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8892,9 +8887,8 @@ func (o *QueryParameter) GetEnumValue(ctx context.Context) (EnumValue, bool) { // SetEnumValue sets the value of the EnumValue field in QueryParameter. func (o *QueryParameter) SetEnumValue(ctx context.Context, v EnumValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["enum_value"] - o.EnumValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EnumValue = vs } // GetNumericValue returns the value of the NumericValue field in QueryParameter as @@ -8906,7 +8900,10 @@ func (o *QueryParameter) GetNumericValue(ctx context.Context) (NumericValue, boo return e, false } var v []NumericValue - d := o.NumericValue.ElementsAs(ctx, &v, true) + d := o.NumericValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8918,9 +8915,8 @@ func (o *QueryParameter) GetNumericValue(ctx context.Context) (NumericValue, boo // SetNumericValue sets the value of the NumericValue field in QueryParameter. func (o *QueryParameter) SetNumericValue(ctx context.Context, v NumericValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["numeric_value"] - o.NumericValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.NumericValue = vs } // GetQueryBackedValue returns the value of the QueryBackedValue field in QueryParameter as @@ -8932,7 +8928,10 @@ func (o *QueryParameter) GetQueryBackedValue(ctx context.Context) (QueryBackedVa return e, false } var v []QueryBackedValue - d := o.QueryBackedValue.ElementsAs(ctx, &v, true) + d := o.QueryBackedValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8944,9 +8943,8 @@ func (o *QueryParameter) GetQueryBackedValue(ctx context.Context) (QueryBackedVa // SetQueryBackedValue sets the value of the QueryBackedValue field in QueryParameter. func (o *QueryParameter) SetQueryBackedValue(ctx context.Context, v QueryBackedValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_backed_value"] - o.QueryBackedValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.QueryBackedValue = vs } // GetTextValue returns the value of the TextValue field in QueryParameter as @@ -8958,7 +8956,10 @@ func (o *QueryParameter) GetTextValue(ctx context.Context) (TextValue, bool) { return e, false } var v []TextValue - d := o.TextValue.ElementsAs(ctx, &v, true) + d := o.TextValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -8970,9 +8971,8 @@ func (o *QueryParameter) GetTextValue(ctx context.Context) (TextValue, bool) { // SetTextValue sets the value of the TextValue field in QueryParameter. func (o *QueryParameter) SetTextValue(ctx context.Context, v TextValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["text_value"] - o.TextValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.TextValue = vs } type QueryPostContent struct { @@ -9455,7 +9455,7 @@ type ResultManifest struct { Format types.String `tfsdk:"format" tf:"optional"` // The schema is an ordered list of column descriptions. - Schema types.List `tfsdk:"schema" tf:"optional,object"` + Schema types.Object `tfsdk:"schema" tf:"optional,object"` // The total number of bytes in the result set. This field is not available // when using `INLINE` disposition. TotalByteCount types.Int64 `tfsdk:"total_byte_count" tf:"optional"` @@ -9512,10 +9512,8 @@ func (o ResultManifest) Type(ctx context.Context) attr.Type { "chunks": basetypes.ListType{ ElemType: BaseChunkInfo{}.Type(ctx), }, - "format": types.StringType, - "schema": basetypes.ListType{ - ElemType: ResultSchema{}.Type(ctx), - }, + "format": types.StringType, + "schema": ResultSchema{}.Type(ctx), "total_byte_count": types.Int64Type, "total_chunk_count": types.Int64Type, "total_row_count": types.Int64Type, @@ -9559,7 +9557,10 @@ func (o *ResultManifest) GetSchema(ctx context.Context) (ResultSchema, bool) { return e, false } var v []ResultSchema - d := o.Schema.ElementsAs(ctx, &v, true) + d := o.Schema.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9571,9 +9572,8 @@ func (o *ResultManifest) GetSchema(ctx context.Context) (ResultSchema, bool) { // SetSchema sets the value of the Schema field in ResultManifest. func (o *ResultManifest) SetSchema(ctx context.Context, v ResultSchema) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["schema"] - o.Schema = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Schema = vs } // The schema is an ordered list of column descriptions. @@ -9859,9 +9859,9 @@ func (o *SetResponse) SetAccessControlList(ctx context.Context, v []AccessContro type SetWorkspaceWarehouseConfigRequest struct { // Optional: Channel selection details - Channel types.List `tfsdk:"channel" tf:"optional,object"` + Channel types.Object `tfsdk:"channel" tf:"optional,object"` // Deprecated: Use sql_configuration_parameters - ConfigParam types.List `tfsdk:"config_param" tf:"optional,object"` + ConfigParam types.Object `tfsdk:"config_param" tf:"optional,object"` // Spark confs for external hive metastore configuration JSON serialized // size must be less than <= 512K DataAccessConfig types.List `tfsdk:"data_access_config" tf:"optional"` @@ -9873,7 +9873,7 @@ type SetWorkspaceWarehouseConfigRequest struct { // specific type availability in the warehouse create and edit form UI. EnabledWarehouseTypes types.List `tfsdk:"enabled_warehouse_types" tf:"optional"` // Deprecated: Use sql_configuration_parameters - GlobalParam types.List `tfsdk:"global_param" tf:"optional,object"` + GlobalParam types.Object `tfsdk:"global_param" tf:"optional,object"` // GCP only: Google Service Account used to pass to cluster to access Google // Cloud Storage GoogleServiceAccount types.String `tfsdk:"google_service_account" tf:"optional"` @@ -9882,7 +9882,7 @@ type SetWorkspaceWarehouseConfigRequest struct { // Security policy for warehouses SecurityPolicy types.String `tfsdk:"security_policy" tf:"optional"` // SQL configuration parameters - SqlConfigurationParameters types.List `tfsdk:"sql_configuration_parameters" tf:"optional,object"` + SqlConfigurationParameters types.Object `tfsdk:"sql_configuration_parameters" tf:"optional,object"` } func (newState *SetWorkspaceWarehouseConfigRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan SetWorkspaceWarehouseConfigRequest) { @@ -9932,27 +9932,19 @@ func (o SetWorkspaceWarehouseConfigRequest) ToObjectValue(ctx context.Context) b func (o SetWorkspaceWarehouseConfigRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), - }, - "config_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, + "channel": Channel{}.Type(ctx), + "config_param": RepeatedEndpointConfPairs{}.Type(ctx), "data_access_config": basetypes.ListType{ ElemType: EndpointConfPair{}.Type(ctx), }, "enabled_warehouse_types": basetypes.ListType{ ElemType: WarehouseTypePair{}.Type(ctx), }, - "global_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, - "google_service_account": types.StringType, - "instance_profile_arn": types.StringType, - "security_policy": types.StringType, - "sql_configuration_parameters": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), - }, + "global_param": RepeatedEndpointConfPairs{}.Type(ctx), + "google_service_account": types.StringType, + "instance_profile_arn": types.StringType, + "security_policy": types.StringType, + "sql_configuration_parameters": RepeatedEndpointConfPairs{}.Type(ctx), }, } } @@ -9966,7 +9958,10 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetChannel(ctx context.Context) (Ch return e, false } var v []Channel - d := o.Channel.ElementsAs(ctx, &v, true) + d := o.Channel.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -9978,9 +9973,8 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetChannel(ctx context.Context) (Ch // SetChannel sets the value of the Channel field in SetWorkspaceWarehouseConfigRequest. func (o *SetWorkspaceWarehouseConfigRequest) SetChannel(ctx context.Context, v Channel) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["channel"] - o.Channel = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Channel = vs } // GetConfigParam returns the value of the ConfigParam field in SetWorkspaceWarehouseConfigRequest as @@ -9992,7 +9986,10 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetConfigParam(ctx context.Context) return e, false } var v []RepeatedEndpointConfPairs - d := o.ConfigParam.ElementsAs(ctx, &v, true) + d := o.ConfigParam.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10004,9 +10001,8 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetConfigParam(ctx context.Context) // SetConfigParam sets the value of the ConfigParam field in SetWorkspaceWarehouseConfigRequest. func (o *SetWorkspaceWarehouseConfigRequest) SetConfigParam(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["config_param"] - o.ConfigParam = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ConfigParam = vs } // GetDataAccessConfig returns the value of the DataAccessConfig field in SetWorkspaceWarehouseConfigRequest as @@ -10070,7 +10066,10 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetGlobalParam(ctx context.Context) return e, false } var v []RepeatedEndpointConfPairs - d := o.GlobalParam.ElementsAs(ctx, &v, true) + d := o.GlobalParam.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10082,9 +10081,8 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetGlobalParam(ctx context.Context) // SetGlobalParam sets the value of the GlobalParam field in SetWorkspaceWarehouseConfigRequest. func (o *SetWorkspaceWarehouseConfigRequest) SetGlobalParam(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["global_param"] - o.GlobalParam = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.GlobalParam = vs } // GetSqlConfigurationParameters returns the value of the SqlConfigurationParameters field in SetWorkspaceWarehouseConfigRequest as @@ -10096,7 +10094,10 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetSqlConfigurationParameters(ctx c return e, false } var v []RepeatedEndpointConfPairs - d := o.SqlConfigurationParameters.ElementsAs(ctx, &v, true) + d := o.SqlConfigurationParameters.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10108,9 +10109,8 @@ func (o *SetWorkspaceWarehouseConfigRequest) GetSqlConfigurationParameters(ctx c // SetSqlConfigurationParameters sets the value of the SqlConfigurationParameters field in SetWorkspaceWarehouseConfigRequest. func (o *SetWorkspaceWarehouseConfigRequest) SetSqlConfigurationParameters(ctx context.Context, v RepeatedEndpointConfPairs) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sql_configuration_parameters"] - o.SqlConfigurationParameters = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SqlConfigurationParameters = vs } type SetWorkspaceWarehouseConfigResponse struct { @@ -10287,15 +10287,15 @@ func (o StatementParameterListItem) Type(ctx context.Context) attr.Type { type StatementResponse struct { // The result manifest provides schema and metadata for the result set. - Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + Manifest types.Object `tfsdk:"manifest" tf:"optional,object"` - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"optional,object"` // The statement ID is returned upon successfully submitting a SQL // statement, and is a required reference for all subsequent calls. StatementId types.String `tfsdk:"statement_id" tf:"optional"` // The status response includes execution state and if relevant, error // information. - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` } func (newState *StatementResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan StatementResponse) { @@ -10337,16 +10337,10 @@ func (o StatementResponse) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o StatementResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "manifest": basetypes.ListType{ - ElemType: ResultManifest{}.Type(ctx), - }, - "result": basetypes.ListType{ - ElemType: ResultData{}.Type(ctx), - }, + "manifest": ResultManifest{}.Type(ctx), + "result": ResultData{}.Type(ctx), "statement_id": types.StringType, - "status": basetypes.ListType{ - ElemType: StatementStatus{}.Type(ctx), - }, + "status": StatementStatus{}.Type(ctx), }, } } @@ -10360,7 +10354,10 @@ func (o *StatementResponse) GetManifest(ctx context.Context) (ResultManifest, bo return e, false } var v []ResultManifest - d := o.Manifest.ElementsAs(ctx, &v, true) + d := o.Manifest.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10372,9 +10369,8 @@ func (o *StatementResponse) GetManifest(ctx context.Context) (ResultManifest, bo // SetManifest sets the value of the Manifest field in StatementResponse. func (o *StatementResponse) SetManifest(ctx context.Context, v ResultManifest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manifest"] - o.Manifest = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Manifest = vs } // GetResult returns the value of the Result field in StatementResponse as @@ -10386,7 +10382,10 @@ func (o *StatementResponse) GetResult(ctx context.Context) (ResultData, bool) { return e, false } var v []ResultData - d := o.Result.ElementsAs(ctx, &v, true) + d := o.Result.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10398,9 +10397,8 @@ func (o *StatementResponse) GetResult(ctx context.Context) (ResultData, bool) { // SetResult sets the value of the Result field in StatementResponse. func (o *StatementResponse) SetResult(ctx context.Context, v ResultData) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] - o.Result = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Result = vs } // GetStatus returns the value of the Status field in StatementResponse as @@ -10412,7 +10410,10 @@ func (o *StatementResponse) GetStatus(ctx context.Context) (StatementStatus, boo return e, false } var v []StatementStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10424,15 +10425,14 @@ func (o *StatementResponse) GetStatus(ctx context.Context) (StatementStatus, boo // SetStatus sets the value of the Status field in StatementResponse. func (o *StatementResponse) SetStatus(ctx context.Context, v StatementStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } // The status response includes execution state and if relevant, error // information. type StatementStatus struct { - Error types.List `tfsdk:"error" tf:"optional,object"` + Error types.Object `tfsdk:"error" tf:"optional,object"` // Statement execution state: - `PENDING`: waiting for warehouse - // `RUNNING`: running - `SUCCEEDED`: execution was successful, result data // available for fetch - `FAILED`: execution failed; reason for failure @@ -10478,9 +10478,7 @@ func (o StatementStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o StatementStatus) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "error": basetypes.ListType{ - ElemType: ServiceError{}.Type(ctx), - }, + "error": ServiceError{}.Type(ctx), "state": types.StringType, }, } @@ -10495,7 +10493,10 @@ func (o *StatementStatus) GetError(ctx context.Context) (ServiceError, bool) { return e, false } var v []ServiceError - d := o.Error.ElementsAs(ctx, &v, true) + d := o.Error.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10507,9 +10508,8 @@ func (o *StatementStatus) GetError(ctx context.Context) (ServiceError, bool) { // SetError sets the value of the Error field in StatementStatus. func (o *StatementStatus) SetError(ctx context.Context, v ServiceError) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["error"] - o.Error = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Error = vs } // Stop a warehouse @@ -10847,7 +10847,7 @@ type TransferOwnershipRequest struct { // Email address for the new owner, who must exist in the workspace. NewOwner types.String `tfsdk:"new_owner" tf:"optional"` // The ID of the object on which to change ownership. - ObjectId types.List `tfsdk:"-"` + ObjectId types.Object `tfsdk:"-"` // The type of object on which to change ownership. ObjectType types.String `tfsdk:"-"` } @@ -10888,10 +10888,8 @@ func (o TransferOwnershipRequest) ToObjectValue(ctx context.Context) basetypes.O func (o TransferOwnershipRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "new_owner": types.StringType, - "objectId": basetypes.ListType{ - ElemType: TransferOwnershipObjectId{}.Type(ctx), - }, + "new_owner": types.StringType, + "objectId": TransferOwnershipObjectId{}.Type(ctx), "objectType": types.StringType, }, } @@ -10906,7 +10904,10 @@ func (o *TransferOwnershipRequest) GetObjectId(ctx context.Context) (TransferOwn return e, false } var v []TransferOwnershipObjectId - d := o.ObjectId.ElementsAs(ctx, &v, true) + d := o.ObjectId.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -10918,9 +10919,8 @@ func (o *TransferOwnershipRequest) GetObjectId(ctx context.Context) (TransferOwn // SetObjectId sets the value of the ObjectId field in TransferOwnershipRequest. func (o *TransferOwnershipRequest) SetObjectId(ctx context.Context, v TransferOwnershipObjectId) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["objectId"] - o.ObjectId = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ObjectId = vs } // Delete an alert @@ -11008,7 +11008,7 @@ func (o TrashQueryRequest) Type(ctx context.Context) attr.Type { } type UpdateAlertRequest struct { - Alert types.List `tfsdk:"alert" tf:"optional,object"` + Alert types.Object `tfsdk:"alert" tf:"optional,object"` Id types.String `tfsdk:"-"` // Field mask is required to be passed into the PATCH request. Field mask @@ -11054,9 +11054,7 @@ func (o UpdateAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o UpdateAlertRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "alert": basetypes.ListType{ - ElemType: UpdateAlertRequestAlert{}.Type(ctx), - }, + "alert": UpdateAlertRequestAlert{}.Type(ctx), "id": types.StringType, "update_mask": types.StringType, }, @@ -11072,7 +11070,10 @@ func (o *UpdateAlertRequest) GetAlert(ctx context.Context) (UpdateAlertRequestAl return e, false } var v []UpdateAlertRequestAlert - d := o.Alert.ElementsAs(ctx, &v, true) + d := o.Alert.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11084,14 +11085,13 @@ func (o *UpdateAlertRequest) GetAlert(ctx context.Context) (UpdateAlertRequestAl // SetAlert sets the value of the Alert field in UpdateAlertRequest. func (o *UpdateAlertRequest) SetAlert(ctx context.Context, v UpdateAlertRequestAlert) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["alert"] - o.Alert = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Alert = vs } type UpdateAlertRequestAlert struct { // Trigger conditions of the alert. - Condition types.List `tfsdk:"condition" tf:"optional,object"` + Condition types.Object `tfsdk:"condition" tf:"optional,object"` // Custom body of alert notification, if it exists. See [here] for custom // templating instructions. // @@ -11159,9 +11159,7 @@ func (o UpdateAlertRequestAlert) ToObjectValue(ctx context.Context) basetypes.Ob func (o UpdateAlertRequestAlert) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), - }, + "condition": AlertCondition{}.Type(ctx), "custom_body": types.StringType, "custom_subject": types.StringType, "display_name": types.StringType, @@ -11182,7 +11180,10 @@ func (o *UpdateAlertRequestAlert) GetCondition(ctx context.Context) (AlertCondit return e, false } var v []AlertCondition - d := o.Condition.ElementsAs(ctx, &v, true) + d := o.Condition.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11194,15 +11195,14 @@ func (o *UpdateAlertRequestAlert) GetCondition(ctx context.Context) (AlertCondit // SetCondition sets the value of the Condition field in UpdateAlertRequestAlert. func (o *UpdateAlertRequestAlert) SetCondition(ctx context.Context, v AlertCondition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["condition"] - o.Condition = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Condition = vs } type UpdateQueryRequest struct { Id types.String `tfsdk:"-"` - Query types.List `tfsdk:"query" tf:"optional,object"` + Query types.Object `tfsdk:"query" tf:"optional,object"` // Field mask is required to be passed into the PATCH request. Field mask // specifies which fields of the setting payload will be updated. The field // mask needs to be supplied as single string. To specify multiple fields in @@ -11246,10 +11246,8 @@ func (o UpdateQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o UpdateQueryRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "query": basetypes.ListType{ - ElemType: UpdateQueryRequestQuery{}.Type(ctx), - }, + "id": types.StringType, + "query": UpdateQueryRequestQuery{}.Type(ctx), "update_mask": types.StringType, }, } @@ -11264,7 +11262,10 @@ func (o *UpdateQueryRequest) GetQuery(ctx context.Context) (UpdateQueryRequestQu return e, false } var v []UpdateQueryRequestQuery - d := o.Query.ElementsAs(ctx, &v, true) + d := o.Query.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11276,9 +11277,8 @@ func (o *UpdateQueryRequest) GetQuery(ctx context.Context) (UpdateQueryRequestQu // SetQuery sets the value of the Query field in UpdateQueryRequest. func (o *UpdateQueryRequest) SetQuery(ctx context.Context, v UpdateQueryRequestQuery) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query"] - o.Query = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Query = vs } type UpdateQueryRequestQuery struct { @@ -11468,7 +11468,7 @@ type UpdateVisualizationRequest struct { // the field mask, use comma as the separator (no space). UpdateMask types.String `tfsdk:"update_mask" tf:""` - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` } func (newState *UpdateVisualizationRequest) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateVisualizationRequest) { @@ -11507,11 +11507,9 @@ func (o UpdateVisualizationRequest) ToObjectValue(ctx context.Context) basetypes func (o UpdateVisualizationRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "update_mask": types.StringType, - "visualization": basetypes.ListType{ - ElemType: UpdateVisualizationRequestVisualization{}.Type(ctx), - }, + "id": types.StringType, + "update_mask": types.StringType, + "visualization": UpdateVisualizationRequestVisualization{}.Type(ctx), }, } } @@ -11525,7 +11523,10 @@ func (o *UpdateVisualizationRequest) GetVisualization(ctx context.Context) (Upda return e, false } var v []UpdateVisualizationRequestVisualization - d := o.Visualization.ElementsAs(ctx, &v, true) + d := o.Visualization.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11537,9 +11538,8 @@ func (o *UpdateVisualizationRequest) GetVisualization(ctx context.Context) (Upda // SetVisualization sets the value of the Visualization field in UpdateVisualizationRequest. func (o *UpdateVisualizationRequest) SetVisualization(ctx context.Context, v UpdateVisualizationRequestVisualization) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] - o.Visualization = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Visualization = vs } type UpdateVisualizationRequestVisualization struct { @@ -12194,13 +12194,13 @@ type Widget struct { // The unique ID for this widget. Id types.String `tfsdk:"id" tf:"optional"` - Options types.List `tfsdk:"options" tf:"optional,object"` + Options types.Object `tfsdk:"options" tf:"optional,object"` // The visualization description API changes frequently and is unsupported. // You can duplicate a visualization by copying description objects received // _from the API_ and then using them to create a new one with a POST // request to the same endpoint. Databricks does not recommend constructing // ad-hoc visualizations entirely in JSON. - Visualization types.List `tfsdk:"visualization" tf:"optional,object"` + Visualization types.Object `tfsdk:"visualization" tf:"optional,object"` // Unused field. Width types.Int64 `tfsdk:"width" tf:"optional"` } @@ -12243,14 +12243,10 @@ func (o Widget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Widget) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "id": types.StringType, - "options": basetypes.ListType{ - ElemType: WidgetOptions{}.Type(ctx), - }, - "visualization": basetypes.ListType{ - ElemType: LegacyVisualization{}.Type(ctx), - }, - "width": types.Int64Type, + "id": types.StringType, + "options": WidgetOptions{}.Type(ctx), + "visualization": LegacyVisualization{}.Type(ctx), + "width": types.Int64Type, }, } } @@ -12264,7 +12260,10 @@ func (o *Widget) GetOptions(ctx context.Context) (WidgetOptions, bool) { return e, false } var v []WidgetOptions - d := o.Options.ElementsAs(ctx, &v, true) + d := o.Options.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12276,9 +12275,8 @@ func (o *Widget) GetOptions(ctx context.Context) (WidgetOptions, bool) { // SetOptions sets the value of the Options field in Widget. func (o *Widget) SetOptions(ctx context.Context, v WidgetOptions) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["options"] - o.Options = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Options = vs } // GetVisualization returns the value of the Visualization field in Widget as @@ -12290,7 +12288,10 @@ func (o *Widget) GetVisualization(ctx context.Context) (LegacyVisualization, boo return e, false } var v []LegacyVisualization - d := o.Visualization.ElementsAs(ctx, &v, true) + d := o.Visualization.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12302,9 +12303,8 @@ func (o *Widget) GetVisualization(ctx context.Context) (LegacyVisualization, boo // SetVisualization sets the value of the Visualization field in Widget. func (o *Widget) SetVisualization(ctx context.Context, v LegacyVisualization) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["visualization"] - o.Visualization = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Visualization = vs } type WidgetOptions struct { @@ -12320,7 +12320,7 @@ type WidgetOptions struct { ParameterMappings types.Object `tfsdk:"parameterMappings" tf:"optional"` // Coordinates of this widget on a dashboard. This portion of the API // changes frequently and is unsupported. - Position types.List `tfsdk:"position" tf:"optional,object"` + Position types.Object `tfsdk:"position" tf:"optional,object"` // Custom title of the widget Title types.String `tfsdk:"title" tf:"optional"` // Timestamp of the last time this object was updated. @@ -12371,11 +12371,9 @@ func (o WidgetOptions) Type(ctx context.Context) attr.Type { "description": types.StringType, "isHidden": types.BoolType, "parameterMappings": types.ObjectType{}, - "position": basetypes.ListType{ - ElemType: WidgetPosition{}.Type(ctx), - }, - "title": types.StringType, - "updated_at": types.StringType, + "position": WidgetPosition{}.Type(ctx), + "title": types.StringType, + "updated_at": types.StringType, }, } } @@ -12389,7 +12387,10 @@ func (o *WidgetOptions) GetPosition(ctx context.Context) (WidgetPosition, bool) return e, false } var v []WidgetPosition - d := o.Position.ElementsAs(ctx, &v, true) + d := o.Position.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -12401,9 +12402,8 @@ func (o *WidgetOptions) GetPosition(ctx context.Context) (WidgetPosition, bool) // SetPosition sets the value of the Position field in WidgetOptions. func (o *WidgetOptions) SetPosition(ctx context.Context, v WidgetPosition) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["position"] - o.Position = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Position = vs } // Coordinates of this widget on a dashboard. This portion of the API changes diff --git a/internal/service/vectorsearch_tf/legacy_model.go b/internal/service/vectorsearch_tf/legacy_model.go new file mode 100755 index 000000000..8b2d35979 --- /dev/null +++ b/internal/service/vectorsearch_tf/legacy_model.go @@ -0,0 +1,3164 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package vectorsearch_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type ColumnInfo_SdkV2 struct { + // Name of the column. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ColumnInfo_SdkV2) { +} + +func (newState *ColumnInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ColumnInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ColumnInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ColumnInfo_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, ColumnInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo_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 ColumnInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": types.StringType, + }, + } +} + +type CreateEndpoint_SdkV2 struct { + // Type of endpoint. + EndpointType types.String `tfsdk:"endpoint_type" tf:""` + // Name of endpoint + Name types.String `tfsdk:"name" tf:""` +} + +func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateEndpoint_SdkV2) { +} + +func (newState *CreateEndpoint_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateEndpoint_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateEndpoint_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, CreateEndpoint_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateEndpoint_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_type": o.EndpointType, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateEndpoint_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_type": types.StringType, + "name": types.StringType, + }, + } +} + +type CreateVectorIndexRequest_SdkV2 struct { + // Specification for Delta Sync Index. Required if `index_type` is + // `DELTA_SYNC`. + DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + // Specification for Direct Vector Access Index. Required if `index_type` is + // `DIRECT_ACCESS`. + DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + // Name of the endpoint to be used for serving the index + EndpointName types.String `tfsdk:"endpoint_name" tf:""` + // There are 2 types of Vector Search indexes: + // + // - `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" tf:""` + // Name of the index + Name types.String `tfsdk:"name" tf:""` + // Primary key of the index + PrimaryKey types.String `tfsdk:"primary_key" tf:""` +} + +func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexRequest_SdkV2) { +} + +func (newState *CreateVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVectorIndexRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "delta_sync_index_spec": reflect.TypeOf(DeltaSyncVectorIndexSpecRequest_SdkV2{}), + "direct_access_index_spec": reflect.TypeOf(DirectAccessVectorIndexSpec_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, CreateVectorIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVectorIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "delta_sync_index_spec": o.DeltaSyncIndexSpec, + "direct_access_index_spec": o.DirectAccessIndexSpec, + "endpoint_name": o.EndpointName, + "index_type": o.IndexType, + "name": o.Name, + "primary_key": o.PrimaryKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "delta_sync_index_spec": basetypes.ListType{ + ElemType: DeltaSyncVectorIndexSpecRequest{}.Type(ctx), + }, + "direct_access_index_spec": basetypes.ListType{ + ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), + }, + "endpoint_name": types.StringType, + "index_type": types.StringType, + "name": types.StringType, + "primary_key": types.StringType, + }, + } +} + +// GetDeltaSyncIndexSpec returns the value of the DeltaSyncIndexSpec field in CreateVectorIndexRequest_SdkV2 as +// a DeltaSyncVectorIndexSpecRequest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateVectorIndexRequest_SdkV2) GetDeltaSyncIndexSpec(ctx context.Context) (DeltaSyncVectorIndexSpecRequest_SdkV2, bool) { + var e DeltaSyncVectorIndexSpecRequest_SdkV2 + if o.DeltaSyncIndexSpec.IsNull() || o.DeltaSyncIndexSpec.IsUnknown() { + return e, false + } + var v []DeltaSyncVectorIndexSpecRequest_SdkV2 + d := o.DeltaSyncIndexSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeltaSyncIndexSpec sets the value of the DeltaSyncIndexSpec field in CreateVectorIndexRequest_SdkV2. +func (o *CreateVectorIndexRequest_SdkV2) SetDeltaSyncIndexSpec(ctx context.Context, v DeltaSyncVectorIndexSpecRequest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_sync_index_spec"] + o.DeltaSyncIndexSpec = types.ListValueMust(t, vs) +} + +// GetDirectAccessIndexSpec returns the value of the DirectAccessIndexSpec field in CreateVectorIndexRequest_SdkV2 as +// a DirectAccessVectorIndexSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateVectorIndexRequest_SdkV2) GetDirectAccessIndexSpec(ctx context.Context) (DirectAccessVectorIndexSpec_SdkV2, bool) { + var e DirectAccessVectorIndexSpec_SdkV2 + if o.DirectAccessIndexSpec.IsNull() || o.DirectAccessIndexSpec.IsUnknown() { + return e, false + } + var v []DirectAccessVectorIndexSpec_SdkV2 + d := o.DirectAccessIndexSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDirectAccessIndexSpec sets the value of the DirectAccessIndexSpec field in CreateVectorIndexRequest_SdkV2. +func (o *CreateVectorIndexRequest_SdkV2) SetDirectAccessIndexSpec(ctx context.Context, v DirectAccessVectorIndexSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["direct_access_index_spec"] + o.DirectAccessIndexSpec = types.ListValueMust(t, vs) +} + +type CreateVectorIndexResponse_SdkV2 struct { + VectorIndex types.List `tfsdk:"vector_index" tf:"optional,object"` +} + +func (newState *CreateVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexResponse_SdkV2) { +} + +func (newState *CreateVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateVectorIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateVectorIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateVectorIndexResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "vector_index": reflect.TypeOf(VectorIndex_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, CreateVectorIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateVectorIndexResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "vector_index": o.VectorIndex, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "vector_index": basetypes.ListType{ + ElemType: VectorIndex{}.Type(ctx), + }, + }, + } +} + +// GetVectorIndex returns the value of the VectorIndex field in CreateVectorIndexResponse_SdkV2 as +// a VectorIndex_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateVectorIndexResponse_SdkV2) GetVectorIndex(ctx context.Context) (VectorIndex_SdkV2, bool) { + var e VectorIndex_SdkV2 + if o.VectorIndex.IsNull() || o.VectorIndex.IsUnknown() { + return e, false + } + var v []VectorIndex_SdkV2 + d := o.VectorIndex.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetVectorIndex sets the value of the VectorIndex field in CreateVectorIndexResponse_SdkV2. +func (o *CreateVectorIndexResponse_SdkV2) SetVectorIndex(ctx context.Context, v VectorIndex_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vector_index"] + o.VectorIndex = types.ListValueMust(t, vs) +} + +// Result of the upsert or delete operation. +type DeleteDataResult_SdkV2 struct { + // List of primary keys for rows that failed to process. + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + // Count of successfully processed rows. + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` +} + +func (newState *DeleteDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataResult_SdkV2) { +} + +func (newState *DeleteDataResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataResult_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataResult. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDataResult_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "failed_primary_keys": 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, DeleteDataResult_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDataResult_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "failed_primary_keys": o.FailedPrimaryKeys, + "success_row_count": o.SuccessRowCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDataResult_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "failed_primary_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "success_row_count": types.Int64Type, + }, + } +} + +// GetFailedPrimaryKeys returns the value of the FailedPrimaryKeys field in DeleteDataResult_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteDataResult_SdkV2) GetFailedPrimaryKeys(ctx context.Context) ([]types.String, bool) { + if o.FailedPrimaryKeys.IsNull() || o.FailedPrimaryKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FailedPrimaryKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFailedPrimaryKeys sets the value of the FailedPrimaryKeys field in DeleteDataResult_SdkV2. +func (o *DeleteDataResult_SdkV2) SetFailedPrimaryKeys(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["failed_primary_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.FailedPrimaryKeys = types.ListValueMust(t, vs) +} + +// Request payload for deleting data from a vector index. +type DeleteDataVectorIndexRequest_SdkV2 struct { + // Name of the vector index where data is to be deleted. Must be a Direct + // Vector Access Index. + IndexName types.String `tfsdk:"-"` + // List of primary keys for the data to be deleted. + PrimaryKeys types.List `tfsdk:"primary_keys" tf:""` +} + +func (newState *DeleteDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataVectorIndexRequest_SdkV2) { +} + +func (newState *DeleteDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDataVectorIndexRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "primary_keys": 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, DeleteDataVectorIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDataVectorIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + "primary_keys": o.PrimaryKeys, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDataVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + "primary_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPrimaryKeys returns the value of the PrimaryKeys field in DeleteDataVectorIndexRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteDataVectorIndexRequest_SdkV2) GetPrimaryKeys(ctx context.Context) ([]types.String, bool) { + if o.PrimaryKeys.IsNull() || o.PrimaryKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.PrimaryKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPrimaryKeys sets the value of the PrimaryKeys field in DeleteDataVectorIndexRequest_SdkV2. +func (o *DeleteDataVectorIndexRequest_SdkV2) SetPrimaryKeys(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["primary_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.PrimaryKeys = types.ListValueMust(t, vs) +} + +// Response to a delete data vector index request. +type DeleteDataVectorIndexResponse_SdkV2 struct { + // Result of the upsert or delete operation. + Result types.List `tfsdk:"result" tf:"optional,object"` + // Status of the delete operation. + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *DeleteDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteDataVectorIndexResponse_SdkV2) { +} + +func (newState *DeleteDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteDataVectorIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteDataVectorIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteDataVectorIndexResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "result": reflect.TypeOf(DeleteDataResult_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, DeleteDataVectorIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteDataVectorIndexResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "result": o.Result, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteDataVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "result": basetypes.ListType{ + ElemType: DeleteDataResult{}.Type(ctx), + }, + "status": types.StringType, + }, + } +} + +// GetResult returns the value of the Result field in DeleteDataVectorIndexResponse_SdkV2 as +// a DeleteDataResult_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *DeleteDataVectorIndexResponse_SdkV2) GetResult(ctx context.Context) (DeleteDataResult_SdkV2, bool) { + var e DeleteDataResult_SdkV2 + if o.Result.IsNull() || o.Result.IsUnknown() { + return e, false + } + var v []DeleteDataResult_SdkV2 + d := o.Result.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResult sets the value of the Result field in DeleteDataVectorIndexResponse_SdkV2. +func (o *DeleteDataVectorIndexResponse_SdkV2) SetResult(ctx context.Context, v DeleteDataResult_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] + o.Result = types.ListValueMust(t, vs) +} + +// Delete an endpoint +type DeleteEndpointRequest_SdkV2 struct { + // Name of the endpoint + EndpointName types.String `tfsdk:"-"` +} + +func (newState *DeleteEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointRequest_SdkV2) { +} + +func (newState *DeleteEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteEndpointRequest_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, DeleteEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteEndpointRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_name": types.StringType, + }, + } +} + +type DeleteEndpointResponse_SdkV2 struct { +} + +func (newState *DeleteEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteEndpointResponse_SdkV2) { +} + +func (newState *DeleteEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteEndpointResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteEndpointResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteEndpointResponse_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, DeleteEndpointResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteEndpointResponse_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 DeleteEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete an index +type DeleteIndexRequest_SdkV2 struct { + // Name of the index + IndexName types.String `tfsdk:"-"` +} + +func (newState *DeleteIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexRequest_SdkV2) { +} + +func (newState *DeleteIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIndexRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteIndexRequest_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, DeleteIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + }, + } +} + +type DeleteIndexResponse_SdkV2 struct { +} + +func (newState *DeleteIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteIndexResponse_SdkV2) { +} + +func (newState *DeleteIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteIndexResponse_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, DeleteIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteIndexResponse_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 DeleteIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeltaSyncVectorIndexSpecRequest_SdkV2 struct { + // [Optional] Select the columns to sync with the vector index. If you leave + // this field blank, all columns from the source table are synced with the + // index. The primary key column and embedding source column or embedding + // vector column are always synced. + ColumnsToSync types.List `tfsdk:"columns_to_sync" tf:"optional"` + // The columns that contain the embedding source. + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + // The columns that contain the embedding vectors. The format should be + // array[double]. + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + // [Optional] Automatically sync the vector index contents and computed + // embeddings to the specified Delta table. The only supported table name is + // the index name with the suffix `_writeback_table`. + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + // Pipeline execution mode. + // + // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the + // system stops processing after successfully refreshing the source table in + // the pipeline once, ensuring the table is updated based on the data + // available when the update started. - `CONTINUOUS`: If the pipeline uses + // continuous execution, the pipeline processes new data as it arrives in + // the source table to keep vector index fresh. + PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + // The name of the source table. + SourceTable types.String `tfsdk:"source_table" tf:"optional"` +} + +func (newState *DeltaSyncVectorIndexSpecRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecRequest_SdkV2) { +} + +func (newState *DeltaSyncVectorIndexSpecRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeltaSyncVectorIndexSpecRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns_to_sync": reflect.TypeOf(types.String{}), + "embedding_source_columns": reflect.TypeOf(EmbeddingSourceColumn_SdkV2{}), + "embedding_vector_columns": reflect.TypeOf(EmbeddingVectorColumn_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, DeltaSyncVectorIndexSpecRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeltaSyncVectorIndexSpecRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns_to_sync": o.ColumnsToSync, + "embedding_source_columns": o.EmbeddingSourceColumns, + "embedding_vector_columns": o.EmbeddingVectorColumns, + "embedding_writeback_table": o.EmbeddingWritebackTable, + "pipeline_type": o.PipelineType, + "source_table": o.SourceTable, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeltaSyncVectorIndexSpecRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns_to_sync": basetypes.ListType{ + ElemType: types.StringType, + }, + "embedding_source_columns": basetypes.ListType{ + ElemType: EmbeddingSourceColumn{}.Type(ctx), + }, + "embedding_vector_columns": basetypes.ListType{ + ElemType: EmbeddingVectorColumn{}.Type(ctx), + }, + "embedding_writeback_table": types.StringType, + "pipeline_type": types.StringType, + "source_table": types.StringType, + }, + } +} + +// GetColumnsToSync returns the value of the ColumnsToSync field in DeltaSyncVectorIndexSpecRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) GetColumnsToSync(ctx context.Context) ([]types.String, bool) { + if o.ColumnsToSync.IsNull() || o.ColumnsToSync.IsUnknown() { + return nil, false + } + var v []types.String + d := o.ColumnsToSync.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetColumnsToSync sets the value of the ColumnsToSync field in DeltaSyncVectorIndexSpecRequest_SdkV2. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) SetColumnsToSync(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_to_sync"] + t = t.(attr.TypeWithElementType).ElementType() + o.ColumnsToSync = types.ListValueMust(t, vs) +} + +// GetEmbeddingSourceColumns returns the value of the EmbeddingSourceColumns field in DeltaSyncVectorIndexSpecRequest_SdkV2 as +// a slice of EmbeddingSourceColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) GetEmbeddingSourceColumns(ctx context.Context) ([]EmbeddingSourceColumn_SdkV2, bool) { + if o.EmbeddingSourceColumns.IsNull() || o.EmbeddingSourceColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingSourceColumn_SdkV2 + d := o.EmbeddingSourceColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingSourceColumns sets the value of the EmbeddingSourceColumns field in DeltaSyncVectorIndexSpecRequest_SdkV2. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) SetEmbeddingSourceColumns(ctx context.Context, v []EmbeddingSourceColumn_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["embedding_source_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingSourceColumns = types.ListValueMust(t, vs) +} + +// GetEmbeddingVectorColumns returns the value of the EmbeddingVectorColumns field in DeltaSyncVectorIndexSpecRequest_SdkV2 as +// a slice of EmbeddingVectorColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) GetEmbeddingVectorColumns(ctx context.Context) ([]EmbeddingVectorColumn_SdkV2, bool) { + if o.EmbeddingVectorColumns.IsNull() || o.EmbeddingVectorColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingVectorColumn_SdkV2 + d := o.EmbeddingVectorColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingVectorColumns sets the value of the EmbeddingVectorColumns field in DeltaSyncVectorIndexSpecRequest_SdkV2. +func (o *DeltaSyncVectorIndexSpecRequest_SdkV2) SetEmbeddingVectorColumns(ctx context.Context, v []EmbeddingVectorColumn_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["embedding_vector_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingVectorColumns = types.ListValueMust(t, vs) +} + +type DeltaSyncVectorIndexSpecResponse_SdkV2 struct { + // The columns that contain the embedding source. + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + // The columns that contain the embedding vectors. + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + // [Optional] Name of the Delta table to sync the vector index contents and + // computed embeddings to. + EmbeddingWritebackTable types.String `tfsdk:"embedding_writeback_table" tf:"optional"` + // The ID of the pipeline that is used to sync the index. + PipelineId types.String `tfsdk:"pipeline_id" tf:"optional"` + // Pipeline execution mode. + // + // - `TRIGGERED`: If the pipeline uses the triggered execution mode, the + // system stops processing after successfully refreshing the source table in + // the pipeline once, ensuring the table is updated based on the data + // available when the update started. - `CONTINUOUS`: If the pipeline uses + // continuous execution, the pipeline processes new data as it arrives in + // the source table to keep vector index fresh. + PipelineType types.String `tfsdk:"pipeline_type" tf:"optional"` + // The name of the source table. + SourceTable types.String `tfsdk:"source_table" tf:"optional"` +} + +func (newState *DeltaSyncVectorIndexSpecResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeltaSyncVectorIndexSpecResponse_SdkV2) { +} + +func (newState *DeltaSyncVectorIndexSpecResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeltaSyncVectorIndexSpecResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeltaSyncVectorIndexSpecResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeltaSyncVectorIndexSpecResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "embedding_source_columns": reflect.TypeOf(EmbeddingSourceColumn_SdkV2{}), + "embedding_vector_columns": reflect.TypeOf(EmbeddingVectorColumn_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, DeltaSyncVectorIndexSpecResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeltaSyncVectorIndexSpecResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "embedding_source_columns": o.EmbeddingSourceColumns, + "embedding_vector_columns": o.EmbeddingVectorColumns, + "embedding_writeback_table": o.EmbeddingWritebackTable, + "pipeline_id": o.PipelineId, + "pipeline_type": o.PipelineType, + "source_table": o.SourceTable, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeltaSyncVectorIndexSpecResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "embedding_source_columns": basetypes.ListType{ + ElemType: EmbeddingSourceColumn{}.Type(ctx), + }, + "embedding_vector_columns": basetypes.ListType{ + ElemType: EmbeddingVectorColumn{}.Type(ctx), + }, + "embedding_writeback_table": types.StringType, + "pipeline_id": types.StringType, + "pipeline_type": types.StringType, + "source_table": types.StringType, + }, + } +} + +// GetEmbeddingSourceColumns returns the value of the EmbeddingSourceColumns field in DeltaSyncVectorIndexSpecResponse_SdkV2 as +// a slice of EmbeddingSourceColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeltaSyncVectorIndexSpecResponse_SdkV2) GetEmbeddingSourceColumns(ctx context.Context) ([]EmbeddingSourceColumn_SdkV2, bool) { + if o.EmbeddingSourceColumns.IsNull() || o.EmbeddingSourceColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingSourceColumn_SdkV2 + d := o.EmbeddingSourceColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingSourceColumns sets the value of the EmbeddingSourceColumns field in DeltaSyncVectorIndexSpecResponse_SdkV2. +func (o *DeltaSyncVectorIndexSpecResponse_SdkV2) SetEmbeddingSourceColumns(ctx context.Context, v []EmbeddingSourceColumn_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["embedding_source_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingSourceColumns = types.ListValueMust(t, vs) +} + +// GetEmbeddingVectorColumns returns the value of the EmbeddingVectorColumns field in DeltaSyncVectorIndexSpecResponse_SdkV2 as +// a slice of EmbeddingVectorColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DeltaSyncVectorIndexSpecResponse_SdkV2) GetEmbeddingVectorColumns(ctx context.Context) ([]EmbeddingVectorColumn_SdkV2, bool) { + if o.EmbeddingVectorColumns.IsNull() || o.EmbeddingVectorColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingVectorColumn_SdkV2 + d := o.EmbeddingVectorColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingVectorColumns sets the value of the EmbeddingVectorColumns field in DeltaSyncVectorIndexSpecResponse_SdkV2. +func (o *DeltaSyncVectorIndexSpecResponse_SdkV2) SetEmbeddingVectorColumns(ctx context.Context, v []EmbeddingVectorColumn_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["embedding_vector_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingVectorColumns = types.ListValueMust(t, vs) +} + +type DirectAccessVectorIndexSpec_SdkV2 struct { + // Contains the optional model endpoint to use during query time. + EmbeddingSourceColumns types.List `tfsdk:"embedding_source_columns" tf:"optional"` + + EmbeddingVectorColumns types.List `tfsdk:"embedding_vector_columns" tf:"optional"` + // The schema of the index in JSON format. + // + // Supported types are `integer`, `long`, `float`, `double`, `boolean`, + // `string`, `date`, `timestamp`. + // + // Supported types for vector column: `array`, `array`,`. + SchemaJson types.String `tfsdk:"schema_json" tf:"optional"` +} + +func (newState *DirectAccessVectorIndexSpec_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DirectAccessVectorIndexSpec_SdkV2) { +} + +func (newState *DirectAccessVectorIndexSpec_SdkV2) SyncEffectiveFieldsDuringRead(existingState DirectAccessVectorIndexSpec_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DirectAccessVectorIndexSpec. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DirectAccessVectorIndexSpec_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "embedding_source_columns": reflect.TypeOf(EmbeddingSourceColumn_SdkV2{}), + "embedding_vector_columns": reflect.TypeOf(EmbeddingVectorColumn_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, DirectAccessVectorIndexSpec_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DirectAccessVectorIndexSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "embedding_source_columns": o.EmbeddingSourceColumns, + "embedding_vector_columns": o.EmbeddingVectorColumns, + "schema_json": o.SchemaJson, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DirectAccessVectorIndexSpec_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "embedding_source_columns": basetypes.ListType{ + ElemType: EmbeddingSourceColumn{}.Type(ctx), + }, + "embedding_vector_columns": basetypes.ListType{ + ElemType: EmbeddingVectorColumn{}.Type(ctx), + }, + "schema_json": types.StringType, + }, + } +} + +// GetEmbeddingSourceColumns returns the value of the EmbeddingSourceColumns field in DirectAccessVectorIndexSpec_SdkV2 as +// a slice of EmbeddingSourceColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DirectAccessVectorIndexSpec_SdkV2) GetEmbeddingSourceColumns(ctx context.Context) ([]EmbeddingSourceColumn_SdkV2, bool) { + if o.EmbeddingSourceColumns.IsNull() || o.EmbeddingSourceColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingSourceColumn_SdkV2 + d := o.EmbeddingSourceColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingSourceColumns sets the value of the EmbeddingSourceColumns field in DirectAccessVectorIndexSpec_SdkV2. +func (o *DirectAccessVectorIndexSpec_SdkV2) SetEmbeddingSourceColumns(ctx context.Context, v []EmbeddingSourceColumn_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["embedding_source_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingSourceColumns = types.ListValueMust(t, vs) +} + +// GetEmbeddingVectorColumns returns the value of the EmbeddingVectorColumns field in DirectAccessVectorIndexSpec_SdkV2 as +// a slice of EmbeddingVectorColumn_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *DirectAccessVectorIndexSpec_SdkV2) GetEmbeddingVectorColumns(ctx context.Context) ([]EmbeddingVectorColumn_SdkV2, bool) { + if o.EmbeddingVectorColumns.IsNull() || o.EmbeddingVectorColumns.IsUnknown() { + return nil, false + } + var v []EmbeddingVectorColumn_SdkV2 + d := o.EmbeddingVectorColumns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEmbeddingVectorColumns sets the value of the EmbeddingVectorColumns field in DirectAccessVectorIndexSpec_SdkV2. +func (o *DirectAccessVectorIndexSpec_SdkV2) SetEmbeddingVectorColumns(ctx context.Context, v []EmbeddingVectorColumn_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["embedding_vector_columns"] + t = t.(attr.TypeWithElementType).ElementType() + o.EmbeddingVectorColumns = types.ListValueMust(t, vs) +} + +type EmbeddingSourceColumn_SdkV2 struct { + // Name of the embedding model endpoint + EmbeddingModelEndpointName types.String `tfsdk:"embedding_model_endpoint_name" tf:"optional"` + // Name of the column + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *EmbeddingSourceColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingSourceColumn_SdkV2) { +} + +func (newState *EmbeddingSourceColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingSourceColumn_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingSourceColumn. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EmbeddingSourceColumn_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, EmbeddingSourceColumn_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EmbeddingSourceColumn_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "embedding_model_endpoint_name": o.EmbeddingModelEndpointName, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EmbeddingSourceColumn_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "embedding_model_endpoint_name": types.StringType, + "name": types.StringType, + }, + } +} + +type EmbeddingVectorColumn_SdkV2 struct { + // Dimension of the embedding vector + EmbeddingDimension types.Int64 `tfsdk:"embedding_dimension" tf:"optional"` + // Name of the column + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *EmbeddingVectorColumn_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EmbeddingVectorColumn_SdkV2) { +} + +func (newState *EmbeddingVectorColumn_SdkV2) SyncEffectiveFieldsDuringRead(existingState EmbeddingVectorColumn_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EmbeddingVectorColumn. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EmbeddingVectorColumn_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, EmbeddingVectorColumn_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EmbeddingVectorColumn_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "embedding_dimension": o.EmbeddingDimension, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EmbeddingVectorColumn_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "embedding_dimension": types.Int64Type, + "name": types.StringType, + }, + } +} + +type EndpointInfo_SdkV2 struct { + // Timestamp of endpoint creation + CreationTimestamp types.Int64 `tfsdk:"creation_timestamp" tf:"optional"` + // Creator of the endpoint + Creator types.String `tfsdk:"creator" tf:"optional"` + // Current status of the endpoint + EndpointStatus types.List `tfsdk:"endpoint_status" tf:"optional,object"` + // Type of endpoint. + EndpointType types.String `tfsdk:"endpoint_type" tf:"optional"` + // Unique identifier of the endpoint + Id types.String `tfsdk:"id" tf:"optional"` + // Timestamp of last update to the endpoint + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` + // User who last updated the endpoint + LastUpdatedUser types.String `tfsdk:"last_updated_user" tf:"optional"` + // Name of endpoint + Name types.String `tfsdk:"name" tf:"optional"` + // Number of indexes on the endpoint + NumIndexes types.Int64 `tfsdk:"num_indexes" tf:"optional"` +} + +func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointInfo_SdkV2) { +} + +func (newState *EndpointInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "endpoint_status": reflect.TypeOf(EndpointStatus_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, EndpointInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creation_timestamp": o.CreationTimestamp, + "creator": o.Creator, + "endpoint_status": o.EndpointStatus, + "endpoint_type": o.EndpointType, + "id": o.Id, + "last_updated_timestamp": o.LastUpdatedTimestamp, + "last_updated_user": o.LastUpdatedUser, + "name": o.Name, + "num_indexes": o.NumIndexes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "endpoint_status": basetypes.ListType{ + ElemType: EndpointStatus{}.Type(ctx), + }, + "endpoint_type": types.StringType, + "id": types.StringType, + "last_updated_timestamp": types.Int64Type, + "last_updated_user": types.StringType, + "name": types.StringType, + "num_indexes": types.Int64Type, + }, + } +} + +// GetEndpointStatus returns the value of the EndpointStatus field in EndpointInfo_SdkV2 as +// a EndpointStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *EndpointInfo_SdkV2) GetEndpointStatus(ctx context.Context) (EndpointStatus_SdkV2, bool) { + var e EndpointStatus_SdkV2 + if o.EndpointStatus.IsNull() || o.EndpointStatus.IsUnknown() { + return e, false + } + var v []EndpointStatus_SdkV2 + d := o.EndpointStatus.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetEndpointStatus sets the value of the EndpointStatus field in EndpointInfo_SdkV2. +func (o *EndpointInfo_SdkV2) SetEndpointStatus(ctx context.Context, v EndpointStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["endpoint_status"] + o.EndpointStatus = types.ListValueMust(t, vs) +} + +// Status information of an endpoint +type EndpointStatus_SdkV2 struct { + // Additional status message + Message types.String `tfsdk:"message" tf:"optional"` + // Current state of the endpoint + State types.String `tfsdk:"state" tf:"optional"` +} + +func (newState *EndpointStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan EndpointStatus_SdkV2) { +} + +func (newState *EndpointStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState EndpointStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in EndpointStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a EndpointStatus_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, EndpointStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o EndpointStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o EndpointStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "message": types.StringType, + "state": types.StringType, + }, + } +} + +// Get an endpoint +type GetEndpointRequest_SdkV2 struct { + // Name of the endpoint + EndpointName types.String `tfsdk:"-"` +} + +func (newState *GetEndpointRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetEndpointRequest_SdkV2) { +} + +func (newState *GetEndpointRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetEndpointRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetEndpointRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetEndpointRequest_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, GetEndpointRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetEndpointRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_name": types.StringType, + }, + } +} + +// Get an index +type GetIndexRequest_SdkV2 struct { + // Name of the index + IndexName types.String `tfsdk:"-"` +} + +func (newState *GetIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetIndexRequest_SdkV2) { +} + +func (newState *GetIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetIndexRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetIndexRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetIndexRequest_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, GetIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + }, + } +} + +type ListEndpointResponse_SdkV2 struct { + // An array of Endpoint objects + Endpoints types.List `tfsdk:"endpoints" tf:"optional"` + // A token that can be used to get the next page of results. If not present, + // there are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` +} + +func (newState *ListEndpointResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointResponse_SdkV2) { +} + +func (newState *ListEndpointResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListEndpointResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "endpoints": reflect.TypeOf(EndpointInfo_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, ListEndpointResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListEndpointResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoints": o.Endpoints, + "next_page_token": o.NextPageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoints": basetypes.ListType{ + ElemType: EndpointInfo{}.Type(ctx), + }, + "next_page_token": types.StringType, + }, + } +} + +// GetEndpoints returns the value of the Endpoints field in ListEndpointResponse_SdkV2 as +// a slice of EndpointInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListEndpointResponse_SdkV2) GetEndpoints(ctx context.Context) ([]EndpointInfo_SdkV2, bool) { + if o.Endpoints.IsNull() || o.Endpoints.IsUnknown() { + return nil, false + } + var v []EndpointInfo_SdkV2 + d := o.Endpoints.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetEndpoints sets the value of the Endpoints field in ListEndpointResponse_SdkV2. +func (o *ListEndpointResponse_SdkV2) SetEndpoints(ctx context.Context, v []EndpointInfo_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["endpoints"] + t = t.(attr.TypeWithElementType).ElementType() + o.Endpoints = types.ListValueMust(t, vs) +} + +// List all endpoints +type ListEndpointsRequest_SdkV2 struct { + // Token for pagination + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListEndpointsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListEndpointsRequest_SdkV2) { +} + +func (newState *ListEndpointsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListEndpointsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListEndpointsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListEndpointsRequest_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, ListEndpointsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListEndpointsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListEndpointsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_token": types.StringType, + }, + } +} + +// List indexes +type ListIndexesRequest_SdkV2 struct { + // Name of the endpoint + EndpointName types.String `tfsdk:"-"` + // Token for pagination + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListIndexesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListIndexesRequest_SdkV2) { +} + +func (newState *ListIndexesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListIndexesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListIndexesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListIndexesRequest_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, ListIndexesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListIndexesRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListIndexesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_name": types.StringType, + "page_token": types.StringType, + }, + } +} + +type ListValue_SdkV2 struct { + Values types.List `tfsdk:"values" tf:"optional"` +} + +func (newState *ListValue_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListValue_SdkV2) { +} + +func (newState *ListValue_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListValue_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListValue. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListValue_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "values": reflect.TypeOf(Value_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, ListValue_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListValue_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "values": o.Values, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListValue_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "values": basetypes.ListType{ + ElemType: Value{}.Type(ctx), + }, + }, + } +} + +// GetValues returns the value of the Values field in ListValue_SdkV2 as +// a slice of Value_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListValue_SdkV2) GetValues(ctx context.Context) ([]Value_SdkV2, bool) { + if o.Values.IsNull() || o.Values.IsUnknown() { + return nil, false + } + var v []Value_SdkV2 + d := o.Values.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetValues sets the value of the Values field in ListValue_SdkV2. +func (o *ListValue_SdkV2) SetValues(ctx context.Context, v []Value_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["values"] + t = t.(attr.TypeWithElementType).ElementType() + o.Values = types.ListValueMust(t, vs) +} + +type ListVectorIndexesResponse_SdkV2 struct { + // A token that can be used to get the next page of results. If not present, + // there are no more results to show. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + VectorIndexes types.List `tfsdk:"vector_indexes" tf:"optional"` +} + +func (newState *ListVectorIndexesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListVectorIndexesResponse_SdkV2) { +} + +func (newState *ListVectorIndexesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListVectorIndexesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListVectorIndexesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListVectorIndexesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "vector_indexes": reflect.TypeOf(MiniVectorIndex_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, ListVectorIndexesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListVectorIndexesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "vector_indexes": o.VectorIndexes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListVectorIndexesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "vector_indexes": basetypes.ListType{ + ElemType: MiniVectorIndex{}.Type(ctx), + }, + }, + } +} + +// GetVectorIndexes returns the value of the VectorIndexes field in ListVectorIndexesResponse_SdkV2 as +// a slice of MiniVectorIndex_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListVectorIndexesResponse_SdkV2) GetVectorIndexes(ctx context.Context) ([]MiniVectorIndex_SdkV2, bool) { + if o.VectorIndexes.IsNull() || o.VectorIndexes.IsUnknown() { + return nil, false + } + var v []MiniVectorIndex_SdkV2 + d := o.VectorIndexes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetVectorIndexes sets the value of the VectorIndexes field in ListVectorIndexesResponse_SdkV2. +func (o *ListVectorIndexesResponse_SdkV2) SetVectorIndexes(ctx context.Context, v []MiniVectorIndex_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["vector_indexes"] + t = t.(attr.TypeWithElementType).ElementType() + o.VectorIndexes = types.ListValueMust(t, vs) +} + +// Key-value pair. +type MapStringValueEntry_SdkV2 struct { + // Column name. + Key types.String `tfsdk:"key" tf:"optional"` + // Column value, nullable. + Value types.List `tfsdk:"value" tf:"optional,object"` +} + +func (newState *MapStringValueEntry_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MapStringValueEntry_SdkV2) { +} + +func (newState *MapStringValueEntry_SdkV2) SyncEffectiveFieldsDuringRead(existingState MapStringValueEntry_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MapStringValueEntry. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MapStringValueEntry_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "value": reflect.TypeOf(Value_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, MapStringValueEntry_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MapStringValueEntry_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 MapStringValueEntry_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": basetypes.ListType{ + ElemType: Value{}.Type(ctx), + }, + }, + } +} + +// GetValue returns the value of the Value field in MapStringValueEntry_SdkV2 as +// a Value_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *MapStringValueEntry_SdkV2) GetValue(ctx context.Context) (Value_SdkV2, bool) { + var e Value_SdkV2 + if o.Value.IsNull() || o.Value.IsUnknown() { + return e, false + } + var v []Value_SdkV2 + d := o.Value.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetValue sets the value of the Value field in MapStringValueEntry_SdkV2. +func (o *MapStringValueEntry_SdkV2) SetValue(ctx context.Context, v Value_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] + o.Value = types.ListValueMust(t, vs) +} + +type MiniVectorIndex_SdkV2 struct { + // The user who created the index. + Creator types.String `tfsdk:"creator" tf:"optional"` + // Name of the endpoint associated with the index + EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + // 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" tf:"optional"` + // Name of the index + Name types.String `tfsdk:"name" tf:"optional"` + // Primary key of the index + PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` +} + +func (newState *MiniVectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MiniVectorIndex_SdkV2) { +} + +func (newState *MiniVectorIndex_SdkV2) SyncEffectiveFieldsDuringRead(existingState MiniVectorIndex_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MiniVectorIndex. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MiniVectorIndex_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, MiniVectorIndex_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MiniVectorIndex_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creator": o.Creator, + "endpoint_name": o.EndpointName, + "index_type": o.IndexType, + "name": o.Name, + "primary_key": o.PrimaryKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o MiniVectorIndex_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creator": types.StringType, + "endpoint_name": types.StringType, + "index_type": types.StringType, + "name": types.StringType, + "primary_key": types.StringType, + }, + } +} + +// Request payload for getting next page of results. +type QueryVectorIndexNextPageRequest_SdkV2 struct { + // Name of the endpoint. + EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + // Name of the vector index to query. + IndexName types.String `tfsdk:"-"` + // Page token returned from previous `QueryVectorIndex` or + // `QueryVectorIndexNextPage` API. + PageToken types.String `tfsdk:"page_token" tf:"optional"` +} + +func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexNextPageRequest_SdkV2) { +} + +func (newState *QueryVectorIndexNextPageRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexNextPageRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryVectorIndexNextPageRequest_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, QueryVectorIndexNextPageRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexNextPageRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + "index_name": o.IndexName, + "page_token": o.PageToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryVectorIndexNextPageRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "endpoint_name": types.StringType, + "index_name": types.StringType, + "page_token": types.StringType, + }, + } +} + +type QueryVectorIndexRequest_SdkV2 struct { + // List of column names to include in the response. + Columns types.List `tfsdk:"columns" tf:""` + // JSON string representing query filters. + // + // Example filters: - `{"id <": 5}`: Filter for id less than 5. - `{"id >": + // 5}`: Filter for id greater than 5. - `{"id <=": 5}`: Filter for id less + // than equal to 5. - `{"id >=": 5}`: Filter for id greater than equal to 5. + // - `{"id": 5}`: Filter for id equal to 5. + FiltersJson types.String `tfsdk:"filters_json" tf:"optional"` + // Name of the vector index to query. + IndexName types.String `tfsdk:"-"` + // Number of results to return. Defaults to 10. + NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` + // Query text. Required for Delta Sync Index using model endpoint. + QueryText types.String `tfsdk:"query_text" tf:"optional"` + // The query type to use. Choices are `ANN` and `HYBRID`. Defaults to `ANN`. + QueryType types.String `tfsdk:"query_type" tf:"optional"` + // Query vector. Required for Direct Vector Access Index and Delta Sync + // Index using self-managed vectors. + QueryVector types.List `tfsdk:"query_vector" tf:"optional"` + // Threshold for the approximate nearest neighbor search. Defaults to 0.0. + ScoreThreshold types.Float64 `tfsdk:"score_threshold" tf:"optional"` +} + +func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexRequest_SdkV2) { +} + +func (newState *QueryVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryVectorIndexRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(types.String{}), + "query_vector": reflect.TypeOf(types.Float64{}), + } +} + +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, QueryVectorIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "columns": o.Columns, + "filters_json": o.FiltersJson, + "index_name": o.IndexName, + "num_results": o.NumResults, + "query_text": o.QueryText, + "query_type": o.QueryType, + "query_vector": o.QueryVector, + "score_threshold": o.ScoreThreshold, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "columns": basetypes.ListType{ + ElemType: types.StringType, + }, + "filters_json": types.StringType, + "index_name": types.StringType, + "num_results": types.Int64Type, + "query_text": types.StringType, + "query_type": types.StringType, + "query_vector": basetypes.ListType{ + ElemType: types.Float64Type, + }, + "score_threshold": types.Float64Type, + }, + } +} + +// GetColumns returns the value of the Columns field in QueryVectorIndexRequest_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryVectorIndexRequest_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 QueryVectorIndexRequest_SdkV2. +func (o *QueryVectorIndexRequest_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) +} + +// GetQueryVector returns the value of the QueryVector field in QueryVectorIndexRequest_SdkV2 as +// a slice of types.Float64 values. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryVectorIndexRequest_SdkV2) GetQueryVector(ctx context.Context) ([]types.Float64, bool) { + if o.QueryVector.IsNull() || o.QueryVector.IsUnknown() { + return nil, false + } + var v []types.Float64 + d := o.QueryVector.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetQueryVector sets the value of the QueryVector field in QueryVectorIndexRequest_SdkV2. +func (o *QueryVectorIndexRequest_SdkV2) SetQueryVector(ctx context.Context, v []types.Float64) { + vs := make([]attr.Value, 0, len(v)) + for _, e := range v { + vs = append(vs, e) + } + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["query_vector"] + t = t.(attr.TypeWithElementType).ElementType() + o.QueryVector = types.ListValueMust(t, vs) +} + +type QueryVectorIndexResponse_SdkV2 struct { + // Metadata about the result set. + Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + // [Optional] Token that can be used in `QueryVectorIndexNextPage` API to + // get next page of results. If more than 1000 results satisfy the query, + // they are returned in groups of 1000. Empty value means no more results. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // Data returned in the query result. + Result types.List `tfsdk:"result" tf:"optional,object"` +} + +func (newState *QueryVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexResponse_SdkV2) { +} + +func (newState *QueryVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState QueryVectorIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in QueryVectorIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueryVectorIndexResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "manifest": reflect.TypeOf(ResultManifest_SdkV2{}), + "result": reflect.TypeOf(ResultData_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, QueryVectorIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "manifest": o.Manifest, + "next_page_token": o.NextPageToken, + "result": o.Result, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o QueryVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "manifest": basetypes.ListType{ + ElemType: ResultManifest{}.Type(ctx), + }, + "next_page_token": types.StringType, + "result": basetypes.ListType{ + ElemType: ResultData{}.Type(ctx), + }, + }, + } +} + +// GetManifest returns the value of the Manifest field in QueryVectorIndexResponse_SdkV2 as +// a ResultManifest_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryVectorIndexResponse_SdkV2) GetManifest(ctx context.Context) (ResultManifest_SdkV2, bool) { + var e ResultManifest_SdkV2 + if o.Manifest.IsNull() || o.Manifest.IsUnknown() { + return e, false + } + var v []ResultManifest_SdkV2 + d := o.Manifest.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetManifest sets the value of the Manifest field in QueryVectorIndexResponse_SdkV2. +func (o *QueryVectorIndexResponse_SdkV2) SetManifest(ctx context.Context, v ResultManifest_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manifest"] + o.Manifest = types.ListValueMust(t, vs) +} + +// GetResult returns the value of the Result field in QueryVectorIndexResponse_SdkV2 as +// a ResultData_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *QueryVectorIndexResponse_SdkV2) GetResult(ctx context.Context) (ResultData_SdkV2, bool) { + var e ResultData_SdkV2 + if o.Result.IsNull() || o.Result.IsUnknown() { + return e, false + } + var v []ResultData_SdkV2 + d := o.Result.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResult sets the value of the Result field in QueryVectorIndexResponse_SdkV2. +func (o *QueryVectorIndexResponse_SdkV2) SetResult(ctx context.Context, v ResultData_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] + o.Result = types.ListValueMust(t, vs) +} + +// Data returned in the query result. +type ResultData_SdkV2 struct { + // Data rows returned in the query. + DataArray types.List `tfsdk:"data_array" tf:"optional"` + // Number of rows in the result set. + RowCount types.Int64 `tfsdk:"row_count" tf:"optional"` +} + +func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultData_SdkV2) { +} + +func (newState *ResultData_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultData_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultData. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResultData_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data_array": 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, ResultData_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResultData_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data_array": o.DataArray, + "row_count": o.RowCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResultData_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data_array": basetypes.ListType{ + ElemType: basetypes.ListType{ + ElemType: types.StringType, + }, + }, + "row_count": types.Int64Type, + }, + } +} + +// GetDataArray returns the value of the DataArray field in ResultData_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultData_SdkV2) GetDataArray(ctx context.Context) ([]types.String, bool) { + if o.DataArray.IsNull() || o.DataArray.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DataArray.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDataArray sets the value of the DataArray field in ResultData_SdkV2. +func (o *ResultData_SdkV2) SetDataArray(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["data_array"] + t = t.(attr.TypeWithElementType).ElementType() + o.DataArray = types.ListValueMust(t, vs) +} + +// Metadata about the result set. +type ResultManifest_SdkV2 struct { + // Number of columns in the result set. + ColumnCount types.Int64 `tfsdk:"column_count" tf:"optional"` + // Information about each column in the result set. + Columns types.List `tfsdk:"columns" tf:"optional"` +} + +func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ResultManifest_SdkV2) { +} + +func (newState *ResultManifest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ResultManifest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ResultManifest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ResultManifest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "columns": reflect.TypeOf(ColumnInfo_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, ResultManifest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ResultManifest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "column_count": o.ColumnCount, + "columns": o.Columns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ResultManifest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "column_count": types.Int64Type, + "columns": basetypes.ListType{ + ElemType: ColumnInfo{}.Type(ctx), + }, + }, + } +} + +// GetColumns returns the value of the Columns field in ResultManifest_SdkV2 as +// a slice of ColumnInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ResultManifest_SdkV2) GetColumns(ctx context.Context) ([]ColumnInfo_SdkV2, bool) { + if o.Columns.IsNull() || o.Columns.IsUnknown() { + return nil, false + } + var v []ColumnInfo_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 ResultManifest_SdkV2. +func (o *ResultManifest_SdkV2) SetColumns(ctx context.Context, v []ColumnInfo_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) +} + +// Request payload for scanning data from a vector index. +type ScanVectorIndexRequest_SdkV2 struct { + // Name of the vector index to scan. + IndexName types.String `tfsdk:"-"` + // Primary key of the last entry returned in the previous scan. + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` + // Number of results to return. Defaults to 10. + NumResults types.Int64 `tfsdk:"num_results" tf:"optional"` +} + +func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexRequest_SdkV2) { +} + +func (newState *ScanVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ScanVectorIndexRequest_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, ScanVectorIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ScanVectorIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + "last_primary_key": o.LastPrimaryKey, + "num_results": o.NumResults, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ScanVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + "last_primary_key": types.StringType, + "num_results": types.Int64Type, + }, + } +} + +// Response to a scan vector index request. +type ScanVectorIndexResponse_SdkV2 struct { + // List of data entries + Data types.List `tfsdk:"data" tf:"optional"` + // Primary key of the last entry. + LastPrimaryKey types.String `tfsdk:"last_primary_key" tf:"optional"` +} + +func (newState *ScanVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ScanVectorIndexResponse_SdkV2) { +} + +func (newState *ScanVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ScanVectorIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ScanVectorIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ScanVectorIndexResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "data": reflect.TypeOf(Struct_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, ScanVectorIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ScanVectorIndexResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "data": o.Data, + "last_primary_key": o.LastPrimaryKey, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ScanVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "data": basetypes.ListType{ + ElemType: Struct{}.Type(ctx), + }, + "last_primary_key": types.StringType, + }, + } +} + +// GetData returns the value of the Data field in ScanVectorIndexResponse_SdkV2 as +// a slice of Struct_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ScanVectorIndexResponse_SdkV2) GetData(ctx context.Context) ([]Struct_SdkV2, bool) { + if o.Data.IsNull() || o.Data.IsUnknown() { + return nil, false + } + var v []Struct_SdkV2 + d := o.Data.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetData sets the value of the Data field in ScanVectorIndexResponse_SdkV2. +func (o *ScanVectorIndexResponse_SdkV2) SetData(ctx context.Context, v []Struct_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["data"] + t = t.(attr.TypeWithElementType).ElementType() + o.Data = types.ListValueMust(t, vs) +} + +type Struct_SdkV2 struct { + // Data entry, corresponding to a row in a vector index. + Fields types.List `tfsdk:"fields" tf:"optional"` +} + +func (newState *Struct_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Struct_SdkV2) { +} + +func (newState *Struct_SdkV2) SyncEffectiveFieldsDuringRead(existingState Struct_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Struct. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Struct_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "fields": reflect.TypeOf(MapStringValueEntry_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, Struct_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Struct_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "fields": o.Fields, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Struct_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "fields": basetypes.ListType{ + ElemType: MapStringValueEntry{}.Type(ctx), + }, + }, + } +} + +// GetFields returns the value of the Fields field in Struct_SdkV2 as +// a slice of MapStringValueEntry_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *Struct_SdkV2) GetFields(ctx context.Context) ([]MapStringValueEntry_SdkV2, bool) { + if o.Fields.IsNull() || o.Fields.IsUnknown() { + return nil, false + } + var v []MapStringValueEntry_SdkV2 + d := o.Fields.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFields sets the value of the Fields field in Struct_SdkV2. +func (o *Struct_SdkV2) SetFields(ctx context.Context, v []MapStringValueEntry_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["fields"] + t = t.(attr.TypeWithElementType).ElementType() + o.Fields = types.ListValueMust(t, vs) +} + +// Synchronize an index +type SyncIndexRequest_SdkV2 struct { + // Name of the vector index to synchronize. Must be a Delta Sync Index. + IndexName types.String `tfsdk:"-"` +} + +func (newState *SyncIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexRequest_SdkV2) { +} + +func (newState *SyncIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState SyncIndexRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SyncIndexRequest_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, SyncIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SyncIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SyncIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + }, + } +} + +type SyncIndexResponse_SdkV2 struct { +} + +func (newState *SyncIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SyncIndexResponse_SdkV2) { +} + +func (newState *SyncIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState SyncIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SyncIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SyncIndexResponse_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, SyncIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SyncIndexResponse_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 SyncIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Result of the upsert or delete operation. +type UpsertDataResult_SdkV2 struct { + // List of primary keys for rows that failed to process. + FailedPrimaryKeys types.List `tfsdk:"failed_primary_keys" tf:"optional"` + // Count of successfully processed rows. + SuccessRowCount types.Int64 `tfsdk:"success_row_count" tf:"optional"` +} + +func (newState *UpsertDataResult_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataResult_SdkV2) { +} + +func (newState *UpsertDataResult_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataResult_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataResult. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpsertDataResult_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "failed_primary_keys": 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, UpsertDataResult_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpsertDataResult_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "failed_primary_keys": o.FailedPrimaryKeys, + "success_row_count": o.SuccessRowCount, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpsertDataResult_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "failed_primary_keys": basetypes.ListType{ + ElemType: types.StringType, + }, + "success_row_count": types.Int64Type, + }, + } +} + +// GetFailedPrimaryKeys returns the value of the FailedPrimaryKeys field in UpsertDataResult_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *UpsertDataResult_SdkV2) GetFailedPrimaryKeys(ctx context.Context) ([]types.String, bool) { + if o.FailedPrimaryKeys.IsNull() || o.FailedPrimaryKeys.IsUnknown() { + return nil, false + } + var v []types.String + d := o.FailedPrimaryKeys.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetFailedPrimaryKeys sets the value of the FailedPrimaryKeys field in UpsertDataResult_SdkV2. +func (o *UpsertDataResult_SdkV2) SetFailedPrimaryKeys(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["failed_primary_keys"] + t = t.(attr.TypeWithElementType).ElementType() + o.FailedPrimaryKeys = types.ListValueMust(t, vs) +} + +// Request payload for upserting data into a vector index. +type UpsertDataVectorIndexRequest_SdkV2 struct { + // Name of the vector index where data is to be upserted. Must be a Direct + // Vector Access Index. + IndexName types.String `tfsdk:"-"` + // JSON string representing the data to be upserted. + InputsJson types.String `tfsdk:"inputs_json" tf:""` +} + +func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexRequest_SdkV2) { +} + +func (newState *UpsertDataVectorIndexRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpsertDataVectorIndexRequest_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, UpsertDataVectorIndexRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpsertDataVectorIndexRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_name": o.IndexName, + "inputs_json": o.InputsJson, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpsertDataVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_name": types.StringType, + "inputs_json": types.StringType, + }, + } +} + +// Response to an upsert data vector index request. +type UpsertDataVectorIndexResponse_SdkV2 struct { + // Result of the upsert or delete operation. + Result types.List `tfsdk:"result" tf:"optional,object"` + // Status of the upsert operation. + Status types.String `tfsdk:"status" tf:"optional"` +} + +func (newState *UpsertDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpsertDataVectorIndexResponse_SdkV2) { +} + +func (newState *UpsertDataVectorIndexResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpsertDataVectorIndexResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpsertDataVectorIndexResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpsertDataVectorIndexResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "result": reflect.TypeOf(UpsertDataResult_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, UpsertDataVectorIndexResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpsertDataVectorIndexResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "result": o.Result, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpsertDataVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "result": basetypes.ListType{ + ElemType: UpsertDataResult{}.Type(ctx), + }, + "status": types.StringType, + }, + } +} + +// GetResult returns the value of the Result field in UpsertDataVectorIndexResponse_SdkV2 as +// a UpsertDataResult_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpsertDataVectorIndexResponse_SdkV2) GetResult(ctx context.Context) (UpsertDataResult_SdkV2, bool) { + var e UpsertDataResult_SdkV2 + if o.Result.IsNull() || o.Result.IsUnknown() { + return e, false + } + var v []UpsertDataResult_SdkV2 + d := o.Result.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetResult sets the value of the Result field in UpsertDataVectorIndexResponse_SdkV2. +func (o *UpsertDataVectorIndexResponse_SdkV2) SetResult(ctx context.Context, v UpsertDataResult_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] + o.Result = types.ListValueMust(t, vs) +} + +type Value_SdkV2 struct { + BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` + + ListValue types.List `tfsdk:"list_value" tf:"optional,object"` + + NullValue types.String `tfsdk:"null_value" tf:"optional"` + + NumberValue types.Float64 `tfsdk:"number_value" tf:"optional"` + + StringValue types.String `tfsdk:"string_value" tf:"optional"` + + StructValue types.List `tfsdk:"struct_value" tf:"optional,object"` +} + +func (newState *Value_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value_SdkV2) { +} + +func (newState *Value_SdkV2) SyncEffectiveFieldsDuringRead(existingState Value_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in Value. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Value_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "list_value": reflect.TypeOf(ListValue_SdkV2{}), + "struct_value": reflect.TypeOf(Struct_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, Value_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Value_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bool_value": o.BoolValue, + "list_value": o.ListValue, + "null_value": o.NullValue, + "number_value": o.NumberValue, + "string_value": o.StringValue, + "struct_value": o.StructValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Value_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bool_value": types.BoolType, + "list_value": basetypes.ListType{ + ElemType: ListValue{}.Type(ctx), + }, + "null_value": types.StringType, + "number_value": types.Float64Type, + "string_value": types.StringType, + "struct_value": basetypes.ListType{ + ElemType: Struct{}.Type(ctx), + }, + }, + } +} + +// GetListValue returns the value of the ListValue field in Value_SdkV2 as +// a ListValue_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Value_SdkV2) GetListValue(ctx context.Context) (ListValue_SdkV2, bool) { + var e ListValue_SdkV2 + if o.ListValue.IsNull() || o.ListValue.IsUnknown() { + return e, false + } + var v []ListValue_SdkV2 + d := o.ListValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetListValue sets the value of the ListValue field in Value_SdkV2. +func (o *Value_SdkV2) SetListValue(ctx context.Context, v ListValue_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["list_value"] + o.ListValue = types.ListValueMust(t, vs) +} + +// GetStructValue returns the value of the StructValue field in Value_SdkV2 as +// a Struct_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Value_SdkV2) GetStructValue(ctx context.Context) (Struct_SdkV2, bool) { + var e Struct_SdkV2 + if o.StructValue.IsNull() || o.StructValue.IsUnknown() { + return e, false + } + var v []Struct_SdkV2 + d := o.StructValue.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStructValue sets the value of the StructValue field in Value_SdkV2. +func (o *Value_SdkV2) SetStructValue(ctx context.Context, v Struct_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["struct_value"] + o.StructValue = types.ListValueMust(t, vs) +} + +type VectorIndex_SdkV2 struct { + // The user who created the index. + Creator types.String `tfsdk:"creator" tf:"optional"` + + DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + + DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + // Name of the endpoint associated with the index + EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` + // 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" tf:"optional"` + // Name of the index + Name types.String `tfsdk:"name" tf:"optional"` + // Primary key of the index + PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` + + Status types.List `tfsdk:"status" tf:"optional,object"` +} + +func (newState *VectorIndex_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndex_SdkV2) { +} + +func (newState *VectorIndex_SdkV2) SyncEffectiveFieldsDuringRead(existingState VectorIndex_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndex. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a VectorIndex_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "delta_sync_index_spec": reflect.TypeOf(DeltaSyncVectorIndexSpecResponse_SdkV2{}), + "direct_access_index_spec": reflect.TypeOf(DirectAccessVectorIndexSpec_SdkV2{}), + "status": reflect.TypeOf(VectorIndexStatus_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, VectorIndex_SdkV2 +// only implements ToObjectValue() and Type(). +func (o VectorIndex_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "creator": o.Creator, + "delta_sync_index_spec": o.DeltaSyncIndexSpec, + "direct_access_index_spec": o.DirectAccessIndexSpec, + "endpoint_name": o.EndpointName, + "index_type": o.IndexType, + "name": o.Name, + "primary_key": o.PrimaryKey, + "status": o.Status, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o VectorIndex_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "creator": types.StringType, + "delta_sync_index_spec": basetypes.ListType{ + ElemType: DeltaSyncVectorIndexSpecResponse{}.Type(ctx), + }, + "direct_access_index_spec": basetypes.ListType{ + ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), + }, + "endpoint_name": types.StringType, + "index_type": types.StringType, + "name": types.StringType, + "primary_key": types.StringType, + "status": basetypes.ListType{ + ElemType: VectorIndexStatus{}.Type(ctx), + }, + }, + } +} + +// GetDeltaSyncIndexSpec returns the value of the DeltaSyncIndexSpec field in VectorIndex_SdkV2 as +// a DeltaSyncVectorIndexSpecResponse_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *VectorIndex_SdkV2) GetDeltaSyncIndexSpec(ctx context.Context) (DeltaSyncVectorIndexSpecResponse_SdkV2, bool) { + var e DeltaSyncVectorIndexSpecResponse_SdkV2 + if o.DeltaSyncIndexSpec.IsNull() || o.DeltaSyncIndexSpec.IsUnknown() { + return e, false + } + var v []DeltaSyncVectorIndexSpecResponse_SdkV2 + d := o.DeltaSyncIndexSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDeltaSyncIndexSpec sets the value of the DeltaSyncIndexSpec field in VectorIndex_SdkV2. +func (o *VectorIndex_SdkV2) SetDeltaSyncIndexSpec(ctx context.Context, v DeltaSyncVectorIndexSpecResponse_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_sync_index_spec"] + o.DeltaSyncIndexSpec = types.ListValueMust(t, vs) +} + +// GetDirectAccessIndexSpec returns the value of the DirectAccessIndexSpec field in VectorIndex_SdkV2 as +// a DirectAccessVectorIndexSpec_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *VectorIndex_SdkV2) GetDirectAccessIndexSpec(ctx context.Context) (DirectAccessVectorIndexSpec_SdkV2, bool) { + var e DirectAccessVectorIndexSpec_SdkV2 + if o.DirectAccessIndexSpec.IsNull() || o.DirectAccessIndexSpec.IsUnknown() { + return e, false + } + var v []DirectAccessVectorIndexSpec_SdkV2 + d := o.DirectAccessIndexSpec.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetDirectAccessIndexSpec sets the value of the DirectAccessIndexSpec field in VectorIndex_SdkV2. +func (o *VectorIndex_SdkV2) SetDirectAccessIndexSpec(ctx context.Context, v DirectAccessVectorIndexSpec_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["direct_access_index_spec"] + o.DirectAccessIndexSpec = types.ListValueMust(t, vs) +} + +// GetStatus returns the value of the Status field in VectorIndex_SdkV2 as +// a VectorIndexStatus_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *VectorIndex_SdkV2) GetStatus(ctx context.Context) (VectorIndexStatus_SdkV2, bool) { + var e VectorIndexStatus_SdkV2 + if o.Status.IsNull() || o.Status.IsUnknown() { + return e, false + } + var v []VectorIndexStatus_SdkV2 + d := o.Status.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetStatus sets the value of the Status field in VectorIndex_SdkV2. +func (o *VectorIndex_SdkV2) SetStatus(ctx context.Context, v VectorIndexStatus_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] + o.Status = types.ListValueMust(t, vs) +} + +type VectorIndexStatus_SdkV2 struct { + // Index API Url to be used to perform operations on the index + IndexUrl types.String `tfsdk:"index_url" tf:"optional"` + // Number of rows indexed + IndexedRowCount types.Int64 `tfsdk:"indexed_row_count" tf:"optional"` + // Message associated with the index status + Message types.String `tfsdk:"message" tf:"optional"` + // Whether the index is ready for search + Ready types.Bool `tfsdk:"ready" tf:"optional"` +} + +func (newState *VectorIndexStatus_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndexStatus_SdkV2) { +} + +func (newState *VectorIndexStatus_SdkV2) SyncEffectiveFieldsDuringRead(existingState VectorIndexStatus_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in VectorIndexStatus. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a VectorIndexStatus_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, VectorIndexStatus_SdkV2 +// only implements ToObjectValue() and Type(). +func (o VectorIndexStatus_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "index_url": o.IndexUrl, + "indexed_row_count": o.IndexedRowCount, + "message": o.Message, + "ready": o.Ready, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o VectorIndexStatus_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "index_url": types.StringType, + "indexed_row_count": types.Int64Type, + "message": types.StringType, + "ready": types.BoolType, + }, + } +} diff --git a/internal/service/vectorsearch_tf/model.go b/internal/service/vectorsearch_tf/model.go index e54058ff9..ae0141c7f 100755 --- a/internal/service/vectorsearch_tf/model.go +++ b/internal/service/vectorsearch_tf/model.go @@ -112,10 +112,10 @@ func (o CreateEndpoint) Type(ctx context.Context) attr.Type { type CreateVectorIndexRequest struct { // Specification for Delta Sync Index. Required if `index_type` is // `DELTA_SYNC`. - DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"optional,object"` // Specification for Direct Vector Access Index. Required if `index_type` is // `DIRECT_ACCESS`. - DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"optional,object"` // Name of the endpoint to be used for serving the index EndpointName types.String `tfsdk:"endpoint_name" tf:""` // There are 2 types of Vector Search indexes: @@ -172,16 +172,12 @@ func (o CreateVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.O func (o CreateVectorIndexRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "delta_sync_index_spec": basetypes.ListType{ - ElemType: DeltaSyncVectorIndexSpecRequest{}.Type(ctx), - }, - "direct_access_index_spec": basetypes.ListType{ - ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), - }, - "endpoint_name": types.StringType, - "index_type": types.StringType, - "name": types.StringType, - "primary_key": types.StringType, + "delta_sync_index_spec": DeltaSyncVectorIndexSpecRequest{}.Type(ctx), + "direct_access_index_spec": DirectAccessVectorIndexSpec{}.Type(ctx), + "endpoint_name": types.StringType, + "index_type": types.StringType, + "name": types.StringType, + "primary_key": types.StringType, }, } } @@ -195,7 +191,10 @@ func (o *CreateVectorIndexRequest) GetDeltaSyncIndexSpec(ctx context.Context) (D return e, false } var v []DeltaSyncVectorIndexSpecRequest - d := o.DeltaSyncIndexSpec.ElementsAs(ctx, &v, true) + d := o.DeltaSyncIndexSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -207,9 +206,8 @@ func (o *CreateVectorIndexRequest) GetDeltaSyncIndexSpec(ctx context.Context) (D // SetDeltaSyncIndexSpec sets the value of the DeltaSyncIndexSpec field in CreateVectorIndexRequest. func (o *CreateVectorIndexRequest) SetDeltaSyncIndexSpec(ctx context.Context, v DeltaSyncVectorIndexSpecRequest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_sync_index_spec"] - o.DeltaSyncIndexSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DeltaSyncIndexSpec = vs } // GetDirectAccessIndexSpec returns the value of the DirectAccessIndexSpec field in CreateVectorIndexRequest as @@ -221,7 +219,10 @@ func (o *CreateVectorIndexRequest) GetDirectAccessIndexSpec(ctx context.Context) return e, false } var v []DirectAccessVectorIndexSpec - d := o.DirectAccessIndexSpec.ElementsAs(ctx, &v, true) + d := o.DirectAccessIndexSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -233,13 +234,12 @@ func (o *CreateVectorIndexRequest) GetDirectAccessIndexSpec(ctx context.Context) // SetDirectAccessIndexSpec sets the value of the DirectAccessIndexSpec field in CreateVectorIndexRequest. func (o *CreateVectorIndexRequest) SetDirectAccessIndexSpec(ctx context.Context, v DirectAccessVectorIndexSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["direct_access_index_spec"] - o.DirectAccessIndexSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DirectAccessIndexSpec = vs } type CreateVectorIndexResponse struct { - VectorIndex types.List `tfsdk:"vector_index" tf:"optional,object"` + VectorIndex types.Object `tfsdk:"vector_index" tf:"optional,object"` } func (newState *CreateVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateVectorIndexResponse) { @@ -276,9 +276,7 @@ func (o CreateVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes. func (o CreateVectorIndexResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "vector_index": basetypes.ListType{ - ElemType: VectorIndex{}.Type(ctx), - }, + "vector_index": VectorIndex{}.Type(ctx), }, } } @@ -292,7 +290,10 @@ func (o *CreateVectorIndexResponse) GetVectorIndex(ctx context.Context) (VectorI return e, false } var v []VectorIndex - d := o.VectorIndex.ElementsAs(ctx, &v, true) + d := o.VectorIndex.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -304,9 +305,8 @@ func (o *CreateVectorIndexResponse) GetVectorIndex(ctx context.Context) (VectorI // SetVectorIndex sets the value of the VectorIndex field in CreateVectorIndexResponse. func (o *CreateVectorIndexResponse) SetVectorIndex(ctx context.Context, v VectorIndex) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["vector_index"] - o.VectorIndex = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.VectorIndex = vs } // Result of the upsert or delete operation. @@ -467,7 +467,7 @@ func (o *DeleteDataVectorIndexRequest) SetPrimaryKeys(ctx context.Context, v []t // Response to a delete data vector index request. type DeleteDataVectorIndexResponse struct { // Result of the upsert or delete operation. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"optional,object"` // Status of the delete operation. Status types.String `tfsdk:"status" tf:"optional"` } @@ -507,9 +507,7 @@ func (o DeleteDataVectorIndexResponse) ToObjectValue(ctx context.Context) basety func (o DeleteDataVectorIndexResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "result": basetypes.ListType{ - ElemType: DeleteDataResult{}.Type(ctx), - }, + "result": DeleteDataResult{}.Type(ctx), "status": types.StringType, }, } @@ -524,7 +522,10 @@ func (o *DeleteDataVectorIndexResponse) GetResult(ctx context.Context) (DeleteDa return e, false } var v []DeleteDataResult - d := o.Result.ElementsAs(ctx, &v, true) + d := o.Result.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -536,9 +537,8 @@ func (o *DeleteDataVectorIndexResponse) GetResult(ctx context.Context) (DeleteDa // SetResult sets the value of the Result field in DeleteDataVectorIndexResponse. func (o *DeleteDataVectorIndexResponse) SetResult(ctx context.Context, v DeleteDataResult) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] - o.Result = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Result = vs } // Delete an endpoint @@ -1203,7 +1203,7 @@ type EndpointInfo struct { // Creator of the endpoint Creator types.String `tfsdk:"creator" tf:"optional"` // Current status of the endpoint - EndpointStatus types.List `tfsdk:"endpoint_status" tf:"optional,object"` + EndpointStatus types.Object `tfsdk:"endpoint_status" tf:"optional,object"` // Type of endpoint. EndpointType types.String `tfsdk:"endpoint_type" tf:"optional"` // Unique identifier of the endpoint @@ -1260,11 +1260,9 @@ func (o EndpointInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o EndpointInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "creation_timestamp": types.Int64Type, - "creator": types.StringType, - "endpoint_status": basetypes.ListType{ - ElemType: EndpointStatus{}.Type(ctx), - }, + "creation_timestamp": types.Int64Type, + "creator": types.StringType, + "endpoint_status": EndpointStatus{}.Type(ctx), "endpoint_type": types.StringType, "id": types.StringType, "last_updated_timestamp": types.Int64Type, @@ -1284,7 +1282,10 @@ func (o *EndpointInfo) GetEndpointStatus(ctx context.Context) (EndpointStatus, b return e, false } var v []EndpointStatus - d := o.EndpointStatus.ElementsAs(ctx, &v, true) + d := o.EndpointStatus.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1296,9 +1297,8 @@ func (o *EndpointInfo) GetEndpointStatus(ctx context.Context) (EndpointStatus, b // SetEndpointStatus sets the value of the EndpointStatus field in EndpointInfo. func (o *EndpointInfo) SetEndpointStatus(ctx context.Context, v EndpointStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["endpoint_status"] - o.EndpointStatus = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.EndpointStatus = vs } // Status information of an endpoint @@ -1754,7 +1754,7 @@ type MapStringValueEntry struct { // Column name. Key types.String `tfsdk:"key" tf:"optional"` // Column value, nullable. - Value types.List `tfsdk:"value" tf:"optional,object"` + Value types.Object `tfsdk:"value" tf:"optional,object"` } func (newState *MapStringValueEntry) SyncEffectiveFieldsDuringCreateOrUpdate(plan MapStringValueEntry) { @@ -1792,10 +1792,8 @@ func (o MapStringValueEntry) ToObjectValue(ctx context.Context) basetypes.Object func (o MapStringValueEntry) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "key": types.StringType, - "value": basetypes.ListType{ - ElemType: Value{}.Type(ctx), - }, + "key": types.StringType, + "value": Value{}.Type(ctx), }, } } @@ -1809,7 +1807,10 @@ func (o *MapStringValueEntry) GetValue(ctx context.Context) (Value, bool) { return e, false } var v []Value - d := o.Value.ElementsAs(ctx, &v, true) + d := o.Value.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1821,9 +1822,8 @@ func (o *MapStringValueEntry) GetValue(ctx context.Context) (Value, bool) { // SetValue sets the value of the Value field in MapStringValueEntry. func (o *MapStringValueEntry) SetValue(ctx context.Context, v Value) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["value"] - o.Value = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Value = vs } type MiniVectorIndex struct { @@ -2079,13 +2079,13 @@ func (o *QueryVectorIndexRequest) SetQueryVector(ctx context.Context, v []types. type QueryVectorIndexResponse struct { // Metadata about the result set. - Manifest types.List `tfsdk:"manifest" tf:"optional,object"` + Manifest types.Object `tfsdk:"manifest" tf:"optional,object"` // [Optional] Token that can be used in `QueryVectorIndexNextPage` API to // get next page of results. If more than 1000 results satisfy the query, // they are returned in groups of 1000. Empty value means no more results. NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` // Data returned in the query result. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"optional,object"` } func (newState *QueryVectorIndexResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan QueryVectorIndexResponse) { @@ -2125,13 +2125,9 @@ func (o QueryVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.O func (o QueryVectorIndexResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "manifest": basetypes.ListType{ - ElemType: ResultManifest{}.Type(ctx), - }, + "manifest": ResultManifest{}.Type(ctx), "next_page_token": types.StringType, - "result": basetypes.ListType{ - ElemType: ResultData{}.Type(ctx), - }, + "result": ResultData{}.Type(ctx), }, } } @@ -2145,7 +2141,10 @@ func (o *QueryVectorIndexResponse) GetManifest(ctx context.Context) (ResultManif return e, false } var v []ResultManifest - d := o.Manifest.ElementsAs(ctx, &v, true) + d := o.Manifest.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2157,9 +2156,8 @@ func (o *QueryVectorIndexResponse) GetManifest(ctx context.Context) (ResultManif // SetManifest sets the value of the Manifest field in QueryVectorIndexResponse. func (o *QueryVectorIndexResponse) SetManifest(ctx context.Context, v ResultManifest) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["manifest"] - o.Manifest = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Manifest = vs } // GetResult returns the value of the Result field in QueryVectorIndexResponse as @@ -2171,7 +2169,10 @@ func (o *QueryVectorIndexResponse) GetResult(ctx context.Context) (ResultData, b return e, false } var v []ResultData - d := o.Result.ElementsAs(ctx, &v, true) + d := o.Result.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2183,9 +2184,8 @@ func (o *QueryVectorIndexResponse) GetResult(ctx context.Context) (ResultData, b // SetResult sets the value of the Result field in QueryVectorIndexResponse. func (o *QueryVectorIndexResponse) SetResult(ctx context.Context, v ResultData) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] - o.Result = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Result = vs } // Data returned in the query result. @@ -2751,7 +2751,7 @@ func (o UpsertDataVectorIndexRequest) Type(ctx context.Context) attr.Type { // Response to an upsert data vector index request. type UpsertDataVectorIndexResponse struct { // Result of the upsert or delete operation. - Result types.List `tfsdk:"result" tf:"optional,object"` + Result types.Object `tfsdk:"result" tf:"optional,object"` // Status of the upsert operation. Status types.String `tfsdk:"status" tf:"optional"` } @@ -2791,9 +2791,7 @@ func (o UpsertDataVectorIndexResponse) ToObjectValue(ctx context.Context) basety func (o UpsertDataVectorIndexResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "result": basetypes.ListType{ - ElemType: UpsertDataResult{}.Type(ctx), - }, + "result": UpsertDataResult{}.Type(ctx), "status": types.StringType, }, } @@ -2808,7 +2806,10 @@ func (o *UpsertDataVectorIndexResponse) GetResult(ctx context.Context) (UpsertDa return e, false } var v []UpsertDataResult - d := o.Result.ElementsAs(ctx, &v, true) + d := o.Result.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2820,15 +2821,14 @@ func (o *UpsertDataVectorIndexResponse) GetResult(ctx context.Context) (UpsertDa // SetResult sets the value of the Result field in UpsertDataVectorIndexResponse. func (o *UpsertDataVectorIndexResponse) SetResult(ctx context.Context, v UpsertDataResult) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["result"] - o.Result = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Result = vs } type Value struct { BoolValue types.Bool `tfsdk:"bool_value" tf:"optional"` - ListValue types.List `tfsdk:"list_value" tf:"optional,object"` + ListValue types.Object `tfsdk:"list_value" tf:"optional,object"` NullValue types.String `tfsdk:"null_value" tf:"optional"` @@ -2836,7 +2836,7 @@ type Value struct { StringValue types.String `tfsdk:"string_value" tf:"optional"` - StructValue types.List `tfsdk:"struct_value" tf:"optional,object"` + StructValue types.Object `tfsdk:"struct_value" tf:"optional,object"` } func (newState *Value) SyncEffectiveFieldsDuringCreateOrUpdate(plan Value) { @@ -2879,16 +2879,12 @@ func (o Value) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Value) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "bool_value": types.BoolType, - "list_value": basetypes.ListType{ - ElemType: ListValue{}.Type(ctx), - }, + "bool_value": types.BoolType, + "list_value": ListValue{}.Type(ctx), "null_value": types.StringType, "number_value": types.Float64Type, "string_value": types.StringType, - "struct_value": basetypes.ListType{ - ElemType: Struct{}.Type(ctx), - }, + "struct_value": Struct{}.Type(ctx), }, } } @@ -2902,7 +2898,10 @@ func (o *Value) GetListValue(ctx context.Context) (ListValue, bool) { return e, false } var v []ListValue - d := o.ListValue.ElementsAs(ctx, &v, true) + d := o.ListValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2914,9 +2913,8 @@ func (o *Value) GetListValue(ctx context.Context) (ListValue, bool) { // SetListValue sets the value of the ListValue field in Value. func (o *Value) SetListValue(ctx context.Context, v ListValue) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["list_value"] - o.ListValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.ListValue = vs } // GetStructValue returns the value of the StructValue field in Value as @@ -2928,7 +2926,10 @@ func (o *Value) GetStructValue(ctx context.Context) (Struct, bool) { return e, false } var v []Struct - d := o.StructValue.ElementsAs(ctx, &v, true) + d := o.StructValue.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -2940,18 +2941,17 @@ func (o *Value) GetStructValue(ctx context.Context) (Struct, bool) { // SetStructValue sets the value of the StructValue field in Value. func (o *Value) SetStructValue(ctx context.Context, v Struct) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["struct_value"] - o.StructValue = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.StructValue = vs } type VectorIndex struct { // The user who created the index. Creator types.String `tfsdk:"creator" tf:"optional"` - DeltaSyncIndexSpec types.List `tfsdk:"delta_sync_index_spec" tf:"optional,object"` + DeltaSyncIndexSpec types.Object `tfsdk:"delta_sync_index_spec" tf:"optional,object"` - DirectAccessIndexSpec types.List `tfsdk:"direct_access_index_spec" tf:"optional,object"` + DirectAccessIndexSpec types.Object `tfsdk:"direct_access_index_spec" tf:"optional,object"` // Name of the endpoint associated with the index EndpointName types.String `tfsdk:"endpoint_name" tf:"optional"` // There are 2 types of Vector Search indexes: @@ -2967,7 +2967,7 @@ type VectorIndex struct { // Primary key of the index PrimaryKey types.String `tfsdk:"primary_key" tf:"optional"` - Status types.List `tfsdk:"status" tf:"optional,object"` + Status types.Object `tfsdk:"status" tf:"optional,object"` } func (newState *VectorIndex) SyncEffectiveFieldsDuringCreateOrUpdate(plan VectorIndex) { @@ -3013,20 +3013,14 @@ func (o VectorIndex) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o VectorIndex) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "creator": types.StringType, - "delta_sync_index_spec": basetypes.ListType{ - ElemType: DeltaSyncVectorIndexSpecResponse{}.Type(ctx), - }, - "direct_access_index_spec": basetypes.ListType{ - ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), - }, - "endpoint_name": types.StringType, - "index_type": types.StringType, - "name": types.StringType, - "primary_key": types.StringType, - "status": basetypes.ListType{ - ElemType: VectorIndexStatus{}.Type(ctx), - }, + "creator": types.StringType, + "delta_sync_index_spec": DeltaSyncVectorIndexSpecResponse{}.Type(ctx), + "direct_access_index_spec": DirectAccessVectorIndexSpec{}.Type(ctx), + "endpoint_name": types.StringType, + "index_type": types.StringType, + "name": types.StringType, + "primary_key": types.StringType, + "status": VectorIndexStatus{}.Type(ctx), }, } } @@ -3040,7 +3034,10 @@ func (o *VectorIndex) GetDeltaSyncIndexSpec(ctx context.Context) (DeltaSyncVecto return e, false } var v []DeltaSyncVectorIndexSpecResponse - d := o.DeltaSyncIndexSpec.ElementsAs(ctx, &v, true) + d := o.DeltaSyncIndexSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3052,9 +3049,8 @@ func (o *VectorIndex) GetDeltaSyncIndexSpec(ctx context.Context) (DeltaSyncVecto // SetDeltaSyncIndexSpec sets the value of the DeltaSyncIndexSpec field in VectorIndex. func (o *VectorIndex) SetDeltaSyncIndexSpec(ctx context.Context, v DeltaSyncVectorIndexSpecResponse) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["delta_sync_index_spec"] - o.DeltaSyncIndexSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DeltaSyncIndexSpec = vs } // GetDirectAccessIndexSpec returns the value of the DirectAccessIndexSpec field in VectorIndex as @@ -3066,7 +3062,10 @@ func (o *VectorIndex) GetDirectAccessIndexSpec(ctx context.Context) (DirectAcces return e, false } var v []DirectAccessVectorIndexSpec - d := o.DirectAccessIndexSpec.ElementsAs(ctx, &v, true) + d := o.DirectAccessIndexSpec.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3078,9 +3077,8 @@ func (o *VectorIndex) GetDirectAccessIndexSpec(ctx context.Context) (DirectAcces // SetDirectAccessIndexSpec sets the value of the DirectAccessIndexSpec field in VectorIndex. func (o *VectorIndex) SetDirectAccessIndexSpec(ctx context.Context, v DirectAccessVectorIndexSpec) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["direct_access_index_spec"] - o.DirectAccessIndexSpec = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.DirectAccessIndexSpec = vs } // GetStatus returns the value of the Status field in VectorIndex as @@ -3092,7 +3090,10 @@ func (o *VectorIndex) GetStatus(ctx context.Context) (VectorIndexStatus, bool) { return e, false } var v []VectorIndexStatus - d := o.Status.ElementsAs(ctx, &v, true) + d := o.Status.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3104,9 +3105,8 @@ func (o *VectorIndex) GetStatus(ctx context.Context) (VectorIndexStatus, bool) { // SetStatus sets the value of the Status field in VectorIndex. func (o *VectorIndex) SetStatus(ctx context.Context, v VectorIndexStatus) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["status"] - o.Status = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.Status = vs } type VectorIndexStatus struct { diff --git a/internal/service/workspace_tf/legacy_model.go b/internal/service/workspace_tf/legacy_model.go new file mode 100755 index 000000000..5f1ca09c1 --- /dev/null +++ b/internal/service/workspace_tf/legacy_model.go @@ -0,0 +1,4435 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +/* +These generated types are for terraform plugin framework to interact with the terraform state conveniently. + +These types follow the same structure as the types in go-sdk. +The only difference is that the primitive types are no longer using the go-native types, but with tfsdk types. +Plus the json tags get converted into tfsdk tags. +We use go-native types for lists and maps intentionally for the ease for converting these types into the go-sdk types. +*/ + +package workspace_tf + +import ( + "context" + "reflect" + + pluginfwcommon "github.com/databricks/terraform-provider-databricks/internal/providers/pluginfw/common" + + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +type AclItem_SdkV2 struct { + // The permission level applied to the principal. + Permission types.String `tfsdk:"permission" tf:""` + // The principal in which the permission is applied. + Principal types.String `tfsdk:"principal" tf:""` +} + +func (newState *AclItem_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AclItem_SdkV2) { +} + +func (newState *AclItem_SdkV2) SyncEffectiveFieldsDuringRead(existingState AclItem_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AclItem. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AclItem_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, AclItem_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AclItem_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission": o.Permission, + "principal": o.Principal, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AclItem_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission": types.StringType, + "principal": types.StringType, + }, + } +} + +type AzureKeyVaultSecretScopeMetadata_SdkV2 struct { + // The DNS of the KeyVault + DnsName types.String `tfsdk:"dns_name" tf:""` + // The resource id of the azure KeyVault that user wants to associate the + // scope with. + ResourceId types.String `tfsdk:"resource_id" tf:""` +} + +func (newState *AzureKeyVaultSecretScopeMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan AzureKeyVaultSecretScopeMetadata_SdkV2) { +} + +func (newState *AzureKeyVaultSecretScopeMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState AzureKeyVaultSecretScopeMetadata_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in AzureKeyVaultSecretScopeMetadata. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a AzureKeyVaultSecretScopeMetadata_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, AzureKeyVaultSecretScopeMetadata_SdkV2 +// only implements ToObjectValue() and Type(). +func (o AzureKeyVaultSecretScopeMetadata_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dns_name": o.DnsName, + "resource_id": o.ResourceId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o AzureKeyVaultSecretScopeMetadata_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dns_name": types.StringType, + "resource_id": types.StringType, + }, + } +} + +type CreateCredentialsRequest_SdkV2 struct { + // Git provider. This field is case-insensitive. The available Git providers + // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, + // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and + // `awsCodeCommit`. + GitProvider types.String `tfsdk:"git_provider" tf:""` + // The username or email provided with your Git provider account, depending + // on which provider you are using. For GitHub, GitHub Enterprise Server, or + // Azure DevOps Services, either email or username may be used. For GitLab, + // GitLab Enterprise Edition, email must be used. For AWS CodeCommit, + // BitBucket or BitBucket Server, username must be used. For all other + // providers please see your provider's Personal Access Token authentication + // documentation to see what is supported. + GitUsername types.String `tfsdk:"git_username" tf:"optional"` + // The personal access token used to authenticate to the corresponding Git + // provider. For certain providers, support may exist for other types of + // scoped access tokens. [Learn more]. + // + // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` +} + +func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsRequest_SdkV2) { +} + +func (newState *CreateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialsRequest_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, CreateCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + "personal_access_token": o.PersonalAccessToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "git_provider": types.StringType, + "git_username": types.StringType, + "personal_access_token": types.StringType, + }, + } +} + +type CreateCredentialsResponse_SdkV2 struct { + // ID of the credential object in the workspace. + CredentialId types.Int64 `tfsdk:"credential_id" tf:""` + // The Git provider associated with the credential. + GitProvider types.String `tfsdk:"git_provider" tf:""` + // The username or email provided with your Git provider account and + // associated with the credential. + GitUsername types.String `tfsdk:"git_username" tf:"optional"` +} + +func (newState *CreateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateCredentialsResponse_SdkV2) { +} + +func (newState *CreateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateCredentialsResponse_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, CreateCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + "git_provider": types.StringType, + "git_username": types.StringType, + }, + } +} + +type CreateRepoRequest_SdkV2 struct { + // Desired path for the repo in the workspace. Almost any path in the + // workspace can be chosen. If repo is created in `/Repos`, path must be in + // the format `/Repos/{folder}/{repo-name}`. + Path types.String `tfsdk:"path" tf:"optional"` + // Git provider. This field is case-insensitive. The available Git providers + // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, + // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and + // `awsCodeCommit`. + Provider types.String `tfsdk:"provider" tf:""` + // If specified, the repo will be created with sparse checkout enabled. You + // cannot enable/disable sparse checkout after the repo is created. + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + // URL of the Git repository to be linked. + Url types.String `tfsdk:"url" tf:""` +} + +func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoRequest_SdkV2) { +} + +func (newState *CreateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRepoRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRepoRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sparse_checkout": reflect.TypeOf(SparseCheckout_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, CreateRepoRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRepoRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + "provider": o.Provider, + "sparse_checkout": o.SparseCheckout, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": basetypes.ListType{ + ElemType: SparseCheckout{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetSparseCheckout returns the value of the SparseCheckout field in CreateRepoRequest_SdkV2 as +// a SparseCheckout_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRepoRequest_SdkV2) GetSparseCheckout(ctx context.Context) (SparseCheckout_SdkV2, bool) { + var e SparseCheckout_SdkV2 + if o.SparseCheckout.IsNull() || o.SparseCheckout.IsUnknown() { + return e, false + } + var v []SparseCheckout_SdkV2 + d := o.SparseCheckout.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparseCheckout sets the value of the SparseCheckout field in CreateRepoRequest_SdkV2. +func (o *CreateRepoRequest_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckout_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] + o.SparseCheckout = types.ListValueMust(t, vs) +} + +type CreateRepoResponse_SdkV2 struct { + // Branch that the Git folder (repo) is checked out to. + Branch types.String `tfsdk:"branch" tf:"optional"` + // SHA-1 hash representing the commit ID of the current HEAD of the Git + // folder (repo). + HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + // ID of the Git folder (repo) object in the workspace. + Id types.Int64 `tfsdk:"id" tf:"optional"` + // Path of the Git folder (repo) in the workspace. + Path types.String `tfsdk:"path" tf:"optional"` + // Git provider of the linked Git repository. + Provider types.String `tfsdk:"provider" tf:"optional"` + // Sparse checkout settings for the Git folder (repo). + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + // URL of the linked Git repository. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *CreateRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateRepoResponse_SdkV2) { +} + +func (newState *CreateRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateRepoResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateRepoResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateRepoResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sparse_checkout": reflect.TypeOf(SparseCheckout_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, CreateRepoResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateRepoResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch": o.Branch, + "head_commit_id": o.HeadCommitId, + "id": o.Id, + "path": o.Path, + "provider": o.Provider, + "sparse_checkout": o.SparseCheckout, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": basetypes.ListType{ + ElemType: SparseCheckout{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetSparseCheckout returns the value of the SparseCheckout field in CreateRepoResponse_SdkV2 as +// a SparseCheckout_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateRepoResponse_SdkV2) GetSparseCheckout(ctx context.Context) (SparseCheckout_SdkV2, bool) { + var e SparseCheckout_SdkV2 + if o.SparseCheckout.IsNull() || o.SparseCheckout.IsUnknown() { + return e, false + } + var v []SparseCheckout_SdkV2 + d := o.SparseCheckout.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparseCheckout sets the value of the SparseCheckout field in CreateRepoResponse_SdkV2. +func (o *CreateRepoResponse_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckout_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] + o.SparseCheckout = types.ListValueMust(t, vs) +} + +type CreateScope_SdkV2 struct { + // The metadata for the secret scope if the type is `AZURE_KEYVAULT` + BackendAzureKeyvault types.List `tfsdk:"backend_azure_keyvault" tf:"optional,object"` + // The principal that is initially granted `MANAGE` permission to the + // created scope. + InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:"optional"` + // Scope name requested by the user. Scope names are unique. + Scope types.String `tfsdk:"scope" tf:""` + // The backend type the scope will be created with. If not specified, will + // default to `DATABRICKS` + ScopeBackendType types.String `tfsdk:"scope_backend_type" tf:"optional"` +} + +func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScope_SdkV2) { +} + +func (newState *CreateScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScope_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateScope_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "backend_azure_keyvault": reflect.TypeOf(AzureKeyVaultSecretScopeMetadata_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, CreateScope_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateScope_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "backend_azure_keyvault": o.BackendAzureKeyvault, + "initial_manage_principal": o.InitialManagePrincipal, + "scope": o.Scope, + "scope_backend_type": o.ScopeBackendType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateScope_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "backend_azure_keyvault": basetypes.ListType{ + ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), + }, + "initial_manage_principal": types.StringType, + "scope": types.StringType, + "scope_backend_type": types.StringType, + }, + } +} + +// GetBackendAzureKeyvault returns the value of the BackendAzureKeyvault field in CreateScope_SdkV2 as +// a AzureKeyVaultSecretScopeMetadata_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateScope_SdkV2) GetBackendAzureKeyvault(ctx context.Context) (AzureKeyVaultSecretScopeMetadata_SdkV2, bool) { + var e AzureKeyVaultSecretScopeMetadata_SdkV2 + if o.BackendAzureKeyvault.IsNull() || o.BackendAzureKeyvault.IsUnknown() { + return e, false + } + var v []AzureKeyVaultSecretScopeMetadata_SdkV2 + d := o.BackendAzureKeyvault.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetBackendAzureKeyvault sets the value of the BackendAzureKeyvault field in CreateScope_SdkV2. +func (o *CreateScope_SdkV2) SetBackendAzureKeyvault(ctx context.Context, v AzureKeyVaultSecretScopeMetadata_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["backend_azure_keyvault"] + o.BackendAzureKeyvault = types.ListValueMust(t, vs) +} + +type CreateScopeResponse_SdkV2 struct { +} + +func (newState *CreateScopeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateScopeResponse_SdkV2) { +} + +func (newState *CreateScopeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateScopeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateScopeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateScopeResponse_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, CreateScopeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateScopeResponse_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 CreateScopeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type CredentialInfo_SdkV2 struct { + // ID of the credential object in the workspace. + CredentialId types.Int64 `tfsdk:"credential_id" tf:""` + // The Git provider associated with the credential. + GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + // The username or email provided with your Git provider account and + // associated with the credential. + GitUsername types.String `tfsdk:"git_username" tf:"optional"` +} + +func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CredentialInfo_SdkV2) { +} + +func (newState *CredentialInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState CredentialInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CredentialInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CredentialInfo_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, CredentialInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CredentialInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + "git_provider": types.StringType, + "git_username": types.StringType, + }, + } +} + +type Delete_SdkV2 struct { + // The absolute path of the notebook or directory. + Path types.String `tfsdk:"path" tf:""` + // The flag that specifies whether to delete the object recursively. It is + // `false` by default. Please note this deleting directory is not atomic. If + // it fails in the middle, some of objects under this directory may be + // deleted and cannot be undone. + Recursive types.Bool `tfsdk:"recursive" tf:"optional"` +} + +func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Delete_SdkV2) { +} + +func (newState *Delete_SdkV2) SyncEffectiveFieldsDuringRead(existingState Delete_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Delete_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, Delete_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Delete_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + "recursive": o.Recursive, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Delete_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + "recursive": types.BoolType, + }, + } +} + +type DeleteAcl_SdkV2 struct { + // The principal to remove an existing ACL from. + Principal types.String `tfsdk:"principal" tf:""` + // The name of the scope to remove permissions from. + Scope types.String `tfsdk:"scope" tf:""` +} + +func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAcl_SdkV2) { +} + +func (newState *DeleteAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAcl_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAcl_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, DeleteAcl_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAcl_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal": o.Principal, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAcl_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal": types.StringType, + "scope": types.StringType, + }, + } +} + +type DeleteAclResponse_SdkV2 struct { +} + +func (newState *DeleteAclResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAclResponse_SdkV2) { +} + +func (newState *DeleteAclResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAclResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAclResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAclResponse_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, DeleteAclResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAclResponse_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 DeleteAclResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a credential +type DeleteCredentialsRequest_SdkV2 struct { + // The ID for the corresponding credential to access. + CredentialId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialsRequest_SdkV2) { +} + +func (newState *DeleteCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCredentialsRequest_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, DeleteCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + }, + } +} + +type DeleteCredentialsResponse_SdkV2 struct { +} + +func (newState *DeleteCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteCredentialsResponse_SdkV2) { +} + +func (newState *DeleteCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteCredentialsResponse_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, DeleteCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialsResponse_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 DeleteCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Delete a repo +type DeleteRepoRequest_SdkV2 struct { + // The ID for the corresponding repo to delete. + RepoId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRepoRequest_SdkV2) { +} + +func (newState *DeleteRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRepoRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRepoRequest_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, DeleteRepoRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRepoRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repo_id": o.RepoId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repo_id": types.Int64Type, + }, + } +} + +type DeleteRepoResponse_SdkV2 struct { +} + +func (newState *DeleteRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteRepoResponse_SdkV2) { +} + +func (newState *DeleteRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteRepoResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteRepoResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteRepoResponse_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, DeleteRepoResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteRepoResponse_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 DeleteRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeleteResponse_SdkV2 struct { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteResponse_SdkV2) { +} + +func (newState *DeleteResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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 DeleteScope_SdkV2 struct { + // Name of the scope to delete. + Scope types.String `tfsdk:"scope" tf:""` +} + +func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScope_SdkV2) { +} + +func (newState *DeleteScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScope_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteScope_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, DeleteScope_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteScope_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteScope_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scope": types.StringType, + }, + } +} + +type DeleteScopeResponse_SdkV2 struct { +} + +func (newState *DeleteScopeResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteScopeResponse_SdkV2) { +} + +func (newState *DeleteScopeResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteScopeResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteScopeResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteScopeResponse_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, DeleteScopeResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteScopeResponse_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 DeleteScopeResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type DeleteSecret_SdkV2 struct { + // Name of the secret to delete. + Key types.String `tfsdk:"key" tf:""` + // The name of the scope that contains the secret to delete. + Scope types.String `tfsdk:"scope" tf:""` +} + +func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSecret_SdkV2) { +} + +func (newState *DeleteSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSecret_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteSecret_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, DeleteSecret_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteSecret_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteSecret_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "scope": types.StringType, + }, + } +} + +type DeleteSecretResponse_SdkV2 struct { +} + +func (newState *DeleteSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteSecretResponse_SdkV2) { +} + +func (newState *DeleteSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteSecretResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteSecretResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteSecretResponse_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, DeleteSecretResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteSecretResponse_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 DeleteSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Export a workspace object +type ExportRequest_SdkV2 struct { + // This specifies the format of the exported file. By default, this is + // `SOURCE`. + // + // The value is case sensitive. + // + // - `SOURCE`: The notebook is exported as source code. Directory exports + // will not include non-notebook entries. - `HTML`: The notebook is exported + // as an HTML file. - `JUPYTER`: The notebook is exported as a + // Jupyter/IPython Notebook file. - `DBC`: The notebook is exported in + // Databricks archive format. Directory exports will not include + // non-notebook entries. - `R_MARKDOWN`: The notebook is exported to R + // Markdown format. - `AUTO`: The object or directory is exported depending + // on the objects type. Directory exports will include notebooks and + // workspace files. + Format types.String `tfsdk:"-"` + // The absolute path of the object or directory. Exporting a directory is + // only supported for the `DBC`, `SOURCE`, and `AUTO` format. + Path types.String `tfsdk:"-"` +} + +func (newState *ExportRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportRequest_SdkV2) { +} + +func (newState *ExportRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportRequest_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, ExportRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "format": o.Format, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExportRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "format": types.StringType, + "path": types.StringType, + }, + } +} + +type ExportResponse_SdkV2 struct { + // The base64-encoded content. If the limit (10MB) is exceeded, exception + // with error code **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. + Content types.String `tfsdk:"content" tf:"optional"` + // The file type of the exported file. + FileType types.String `tfsdk:"file_type" tf:"optional"` +} + +func (newState *ExportResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportResponse_SdkV2) { +} + +func (newState *ExportResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ExportResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ExportResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ExportResponse_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, ExportResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ExportResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "file_type": o.FileType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ExportResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "file_type": types.StringType, + }, + } +} + +// Get secret ACL details +type GetAclRequest_SdkV2 struct { + // The principal to fetch ACL information for. + Principal types.String `tfsdk:"-"` + // The name of the scope to fetch ACL information from. + Scope types.String `tfsdk:"-"` +} + +func (newState *GetAclRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAclRequest_SdkV2) { +} + +func (newState *GetAclRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAclRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAclRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAclRequest_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, GetAclRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAclRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "principal": o.Principal, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAclRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "principal": types.StringType, + "scope": types.StringType, + }, + } +} + +// Get a credential entry +type GetCredentialsRequest_SdkV2 struct { + // The ID for the corresponding credential to access. + CredentialId types.Int64 `tfsdk:"-"` +} + +func (newState *GetCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsRequest_SdkV2) { +} + +func (newState *GetCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCredentialsRequest_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, GetCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + }, + } +} + +type GetCredentialsResponse_SdkV2 struct { + // ID of the credential object in the workspace. + CredentialId types.Int64 `tfsdk:"credential_id" tf:""` + // The Git provider associated with the credential. + GitProvider types.String `tfsdk:"git_provider" tf:"optional"` + // The username or email provided with your Git provider account and + // associated with the credential. + GitUsername types.String `tfsdk:"git_username" tf:"optional"` +} + +func (newState *GetCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetCredentialsResponse_SdkV2) { +} + +func (newState *GetCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetCredentialsResponse_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, GetCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + "git_provider": types.StringType, + "git_username": types.StringType, + }, + } +} + +// Get repo permission levels +type GetRepoPermissionLevelsRequest_SdkV2 struct { + // The repo for which to get or manage permissions. + RepoId types.String `tfsdk:"-"` +} + +func (newState *GetRepoPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetRepoPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRepoPermissionLevelsRequest_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, GetRepoPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repo_id": o.RepoId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRepoPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repo_id": types.StringType, + }, + } +} + +type GetRepoPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetRepoPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetRepoPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRepoPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(RepoPermissionsDescription_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, GetRepoPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRepoPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: RepoPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetRepoPermissionLevelsResponse_SdkV2 as +// a slice of RepoPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetRepoPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]RepoPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []RepoPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetRepoPermissionLevelsResponse_SdkV2. +func (o *GetRepoPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []RepoPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get repo permissions +type GetRepoPermissionsRequest_SdkV2 struct { + // The repo for which to get or manage permissions. + RepoId types.String `tfsdk:"-"` +} + +func (newState *GetRepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoPermissionsRequest_SdkV2) { +} + +func (newState *GetRepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRepoPermissionsRequest_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, GetRepoPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repo_id": o.RepoId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRepoPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repo_id": types.StringType, + }, + } +} + +// Get a repo +type GetRepoRequest_SdkV2 struct { + // ID of the Git folder (repo) object in the workspace. + RepoId types.Int64 `tfsdk:"-"` +} + +func (newState *GetRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoRequest_SdkV2) { +} + +func (newState *GetRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRepoRequest_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, GetRepoRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRepoRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "repo_id": o.RepoId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "repo_id": types.Int64Type, + }, + } +} + +type GetRepoResponse_SdkV2 struct { + // Branch that the local version of the repo is checked out to. + Branch types.String `tfsdk:"branch" tf:"optional"` + // SHA-1 hash representing the commit ID of the current HEAD of the repo. + HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + // ID of the Git folder (repo) object in the workspace. + Id types.Int64 `tfsdk:"id" tf:"optional"` + // Path of the Git folder (repo) in the workspace. + Path types.String `tfsdk:"path" tf:"optional"` + // Git provider of the linked Git repository. + Provider types.String `tfsdk:"provider" tf:"optional"` + // Sparse checkout settings for the Git folder (repo). + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + // URL of the linked Git repository. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *GetRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetRepoResponse_SdkV2) { +} + +func (newState *GetRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetRepoResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetRepoResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetRepoResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sparse_checkout": reflect.TypeOf(SparseCheckout_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, GetRepoResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetRepoResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch": o.Branch, + "head_commit_id": o.HeadCommitId, + "id": o.Id, + "path": o.Path, + "provider": o.Provider, + "sparse_checkout": o.SparseCheckout, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": basetypes.ListType{ + ElemType: SparseCheckout{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetSparseCheckout returns the value of the SparseCheckout field in GetRepoResponse_SdkV2 as +// a SparseCheckout_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *GetRepoResponse_SdkV2) GetSparseCheckout(ctx context.Context) (SparseCheckout_SdkV2, bool) { + var e SparseCheckout_SdkV2 + if o.SparseCheckout.IsNull() || o.SparseCheckout.IsUnknown() { + return e, false + } + var v []SparseCheckout_SdkV2 + d := o.SparseCheckout.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparseCheckout sets the value of the SparseCheckout field in GetRepoResponse_SdkV2. +func (o *GetRepoResponse_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckout_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] + o.SparseCheckout = types.ListValueMust(t, vs) +} + +// Get a secret +type GetSecretRequest_SdkV2 struct { + // The key to fetch secret for. + Key types.String `tfsdk:"-"` + // The name of the scope to fetch secret information from. + Scope types.String `tfsdk:"-"` +} + +func (newState *GetSecretRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretRequest_SdkV2) { +} + +func (newState *GetSecretRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSecretRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetSecretRequest_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, GetSecretRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetSecretRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetSecretRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "scope": types.StringType, + }, + } +} + +type GetSecretResponse_SdkV2 struct { + // A unique name to identify the secret. + Key types.String `tfsdk:"key" tf:"optional"` + // The value of the secret in its byte representation. + Value types.String `tfsdk:"value" tf:"optional"` +} + +func (newState *GetSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetSecretResponse_SdkV2) { +} + +func (newState *GetSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetSecretResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetSecretResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetSecretResponse_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, GetSecretResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetSecretResponse_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 GetSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "value": types.StringType, + }, + } +} + +// Get status +type GetStatusRequest_SdkV2 struct { + // The absolute path of the notebook or directory. + Path types.String `tfsdk:"-"` +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetStatusRequest_SdkV2) { +} + +func (newState *GetStatusRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetStatusRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetStatusRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetStatusRequest_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, GetStatusRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetStatusRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +// Get workspace object permission levels +type GetWorkspaceObjectPermissionLevelsRequest_SdkV2 struct { + // The workspace object for which to get or manage permissions. + WorkspaceObjectId types.String `tfsdk:"-"` + // The workspace object type for which to get or manage permissions. + WorkspaceObjectType types.String `tfsdk:"-"` +} + +func (newState *GetWorkspaceObjectPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsRequest_SdkV2) { +} + +func (newState *GetWorkspaceObjectPermissionLevelsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceObjectPermissionLevelsRequest_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, GetWorkspaceObjectPermissionLevelsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionLevelsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceObjectPermissionLevelsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_object_id": types.StringType, + "workspace_object_type": types.StringType, + }, + } +} + +type GetWorkspaceObjectPermissionLevelsResponse_SdkV2 struct { + // Specific permission levels + PermissionLevels types.List `tfsdk:"permission_levels" tf:"optional"` +} + +func (newState *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionLevelsResponse_SdkV2) { +} + +func (newState *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionLevelsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionLevelsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceObjectPermissionLevelsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "permission_levels": reflect.TypeOf(WorkspaceObjectPermissionsDescription_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, GetWorkspaceObjectPermissionLevelsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionLevelsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceObjectPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission_levels": basetypes.ListType{ + ElemType: WorkspaceObjectPermissionsDescription{}.Type(ctx), + }, + }, + } +} + +// GetPermissionLevels returns the value of the PermissionLevels field in GetWorkspaceObjectPermissionLevelsResponse_SdkV2 as +// a slice of WorkspaceObjectPermissionsDescription_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) GetPermissionLevels(ctx context.Context) ([]WorkspaceObjectPermissionsDescription_SdkV2, bool) { + if o.PermissionLevels.IsNull() || o.PermissionLevels.IsUnknown() { + return nil, false + } + var v []WorkspaceObjectPermissionsDescription_SdkV2 + d := o.PermissionLevels.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPermissionLevels sets the value of the PermissionLevels field in GetWorkspaceObjectPermissionLevelsResponse_SdkV2. +func (o *GetWorkspaceObjectPermissionLevelsResponse_SdkV2) SetPermissionLevels(ctx context.Context, v []WorkspaceObjectPermissionsDescription_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["permission_levels"] + t = t.(attr.TypeWithElementType).ElementType() + o.PermissionLevels = types.ListValueMust(t, vs) +} + +// Get workspace object permissions +type GetWorkspaceObjectPermissionsRequest_SdkV2 struct { + // The workspace object for which to get or manage permissions. + WorkspaceObjectId types.String `tfsdk:"-"` + // The workspace object type for which to get or manage permissions. + WorkspaceObjectType types.String `tfsdk:"-"` +} + +func (newState *GetWorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetWorkspaceObjectPermissionsRequest_SdkV2) { +} + +func (newState *GetWorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetWorkspaceObjectPermissionsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetWorkspaceObjectPermissionsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetWorkspaceObjectPermissionsRequest_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, GetWorkspaceObjectPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetWorkspaceObjectPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "workspace_object_id": types.StringType, + "workspace_object_type": types.StringType, + }, + } +} + +type Import_SdkV2 struct { + // The base64-encoded content. This has a limit of 10 MB. + // + // If the limit (10MB) is exceeded, exception with error code + // **MAX_NOTEBOOK_SIZE_EXCEEDED** is thrown. This parameter might be absent, + // and instead a posted file is used. + Content types.String `tfsdk:"content" tf:"optional"` + // This specifies the format of the file to be imported. + // + // The value is case sensitive. + // + // - `AUTO`: The item is imported depending on an analysis of the item's + // extension and the header content provided in the request. If the item is + // imported as a notebook, then the item's extension is automatically + // removed. - `SOURCE`: The notebook or directory is imported as source + // code. - `HTML`: The notebook is imported as an HTML file. - `JUPYTER`: + // The notebook is imported as a Jupyter/IPython Notebook file. - `DBC`: The + // notebook is imported in Databricks archive format. Required for + // directories. - `R_MARKDOWN`: The notebook is imported from R Markdown + // format. + Format types.String `tfsdk:"format" tf:"optional"` + // The language of the object. This value is set only if the object type is + // `NOTEBOOK`. + Language types.String `tfsdk:"language" tf:"optional"` + // The flag that specifies whether to overwrite existing object. It is + // `false` by default. For `DBC` format, `overwrite` is not supported since + // it may contain a directory. + Overwrite types.Bool `tfsdk:"overwrite" tf:"optional"` + // The absolute path of the object or directory. Importing a directory is + // only supported for the `DBC` and `SOURCE` formats. + Path types.String `tfsdk:"path" tf:""` +} + +func (newState *Import_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Import_SdkV2) { +} + +func (newState *Import_SdkV2) SyncEffectiveFieldsDuringRead(existingState Import_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Import_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, Import_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Import_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "content": o.Content, + "format": o.Format, + "language": o.Language, + "overwrite": o.Overwrite, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Import_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "content": types.StringType, + "format": types.StringType, + "language": types.StringType, + "overwrite": types.BoolType, + "path": types.StringType, + }, + } +} + +type ImportResponse_SdkV2 struct { +} + +func (newState *ImportResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ImportResponse_SdkV2) { +} + +func (newState *ImportResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ImportResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ImportResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ImportResponse_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, ImportResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ImportResponse_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 ImportResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +// Lists ACLs +type ListAclsRequest_SdkV2 struct { + // The name of the scope to fetch ACL information from. + Scope types.String `tfsdk:"-"` +} + +func (newState *ListAclsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsRequest_SdkV2) { +} + +func (newState *ListAclsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAclsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAclsRequest_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, ListAclsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAclsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAclsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scope": types.StringType, + }, + } +} + +type ListAclsResponse_SdkV2 struct { + // The associated ACLs rule applied to principals in the given scope. + Items types.List `tfsdk:"items" tf:"optional"` +} + +func (newState *ListAclsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAclsResponse_SdkV2) { +} + +func (newState *ListAclsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAclsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAclsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAclsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "items": reflect.TypeOf(AclItem_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, ListAclsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAclsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "items": o.Items, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListAclsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "items": basetypes.ListType{ + ElemType: AclItem{}.Type(ctx), + }, + }, + } +} + +// GetItems returns the value of the Items field in ListAclsResponse_SdkV2 as +// a slice of AclItem_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListAclsResponse_SdkV2) GetItems(ctx context.Context) ([]AclItem_SdkV2, bool) { + if o.Items.IsNull() || o.Items.IsUnknown() { + return nil, false + } + var v []AclItem_SdkV2 + d := o.Items.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetItems sets the value of the Items field in ListAclsResponse_SdkV2. +func (o *ListAclsResponse_SdkV2) SetItems(ctx context.Context, v []AclItem_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["items"] + t = t.(attr.TypeWithElementType).ElementType() + o.Items = types.ListValueMust(t, vs) +} + +type ListCredentialsResponse_SdkV2 struct { + // List of credentials. + Credentials types.List `tfsdk:"credentials" tf:"optional"` +} + +func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCredentialsResponse_SdkV2) { +} + +func (newState *ListCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCredentialsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "credentials": reflect.TypeOf(CredentialInfo_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, ListCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credentials": o.Credentials, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credentials": basetypes.ListType{ + ElemType: CredentialInfo{}.Type(ctx), + }, + }, + } +} + +// GetCredentials returns the value of the Credentials field in ListCredentialsResponse_SdkV2 as +// a slice of CredentialInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListCredentialsResponse_SdkV2) GetCredentials(ctx context.Context) ([]CredentialInfo_SdkV2, bool) { + if o.Credentials.IsNull() || o.Credentials.IsUnknown() { + return nil, false + } + var v []CredentialInfo_SdkV2 + d := o.Credentials.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetCredentials sets the value of the Credentials field in ListCredentialsResponse_SdkV2. +func (o *ListCredentialsResponse_SdkV2) SetCredentials(ctx context.Context, v []CredentialInfo_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["credentials"] + t = t.(attr.TypeWithElementType).ElementType() + o.Credentials = types.ListValueMust(t, vs) +} + +// Get repos +type ListReposRequest_SdkV2 struct { + // Token used to get the next page of results. If not specified, returns the + // first page of results as well as a next page token if there are more + // results. + NextPageToken types.String `tfsdk:"-"` + // Filters repos that have paths starting with the given path prefix. If not + // provided or when provided an effectively empty prefix (`/` or + // `/Workspace`) Git folders (repos) from `/Workspace/Repos` will be served. + PathPrefix types.String `tfsdk:"-"` +} + +func (newState *ListReposRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposRequest_SdkV2) { +} + +func (newState *ListReposRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListReposRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListReposRequest_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, ListReposRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListReposRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "path_prefix": o.PathPrefix, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListReposRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "path_prefix": types.StringType, + }, + } +} + +type ListReposResponse_SdkV2 struct { + // Token that can be specified as a query parameter to the `GET /repos` + // endpoint to retrieve the next page of results. + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + // List of Git folders (repos). + Repos types.List `tfsdk:"repos" tf:"optional"` +} + +func (newState *ListReposResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListReposResponse_SdkV2) { +} + +func (newState *ListReposResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListReposResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListReposResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListReposResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "repos": reflect.TypeOf(RepoInfo_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, ListReposResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListReposResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "repos": o.Repos, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListReposResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "repos": basetypes.ListType{ + ElemType: RepoInfo{}.Type(ctx), + }, + }, + } +} + +// GetRepos returns the value of the Repos field in ListReposResponse_SdkV2 as +// a slice of RepoInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListReposResponse_SdkV2) GetRepos(ctx context.Context) ([]RepoInfo_SdkV2, bool) { + if o.Repos.IsNull() || o.Repos.IsUnknown() { + return nil, false + } + var v []RepoInfo_SdkV2 + d := o.Repos.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetRepos sets the value of the Repos field in ListReposResponse_SdkV2. +func (o *ListReposResponse_SdkV2) SetRepos(ctx context.Context, v []RepoInfo_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["repos"] + t = t.(attr.TypeWithElementType).ElementType() + o.Repos = types.ListValueMust(t, vs) +} + +type ListResponse_SdkV2 struct { + // List of objects. + Objects types.List `tfsdk:"objects" tf:"optional"` +} + +func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListResponse_SdkV2) { +} + +func (newState *ListResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "objects": reflect.TypeOf(ObjectInfo_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, ListResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "objects": o.Objects, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "objects": basetypes.ListType{ + ElemType: ObjectInfo{}.Type(ctx), + }, + }, + } +} + +// GetObjects returns the value of the Objects field in ListResponse_SdkV2 as +// a slice of ObjectInfo_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListResponse_SdkV2) GetObjects(ctx context.Context) ([]ObjectInfo_SdkV2, bool) { + if o.Objects.IsNull() || o.Objects.IsUnknown() { + return nil, false + } + var v []ObjectInfo_SdkV2 + d := o.Objects.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetObjects sets the value of the Objects field in ListResponse_SdkV2. +func (o *ListResponse_SdkV2) SetObjects(ctx context.Context, v []ObjectInfo_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["objects"] + t = t.(attr.TypeWithElementType).ElementType() + o.Objects = types.ListValueMust(t, vs) +} + +type ListScopesResponse_SdkV2 struct { + // The available secret scopes. + Scopes types.List `tfsdk:"scopes" tf:"optional"` +} + +func (newState *ListScopesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListScopesResponse_SdkV2) { +} + +func (newState *ListScopesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListScopesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListScopesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListScopesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "scopes": reflect.TypeOf(SecretScope_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, ListScopesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListScopesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scopes": o.Scopes, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListScopesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scopes": basetypes.ListType{ + ElemType: SecretScope{}.Type(ctx), + }, + }, + } +} + +// GetScopes returns the value of the Scopes field in ListScopesResponse_SdkV2 as +// a slice of SecretScope_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListScopesResponse_SdkV2) GetScopes(ctx context.Context) ([]SecretScope_SdkV2, bool) { + if o.Scopes.IsNull() || o.Scopes.IsUnknown() { + return nil, false + } + var v []SecretScope_SdkV2 + d := o.Scopes.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetScopes sets the value of the Scopes field in ListScopesResponse_SdkV2. +func (o *ListScopesResponse_SdkV2) SetScopes(ctx context.Context, v []SecretScope_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["scopes"] + t = t.(attr.TypeWithElementType).ElementType() + o.Scopes = types.ListValueMust(t, vs) +} + +// List secret keys +type ListSecretsRequest_SdkV2 struct { + // The name of the scope to list secrets within. + Scope types.String `tfsdk:"-"` +} + +func (newState *ListSecretsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsRequest_SdkV2) { +} + +func (newState *ListSecretsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSecretsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSecretsRequest_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, ListSecretsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSecretsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSecretsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "scope": types.StringType, + }, + } +} + +type ListSecretsResponse_SdkV2 struct { + // Metadata information of all secrets contained within the given scope. + Secrets types.List `tfsdk:"secrets" tf:"optional"` +} + +func (newState *ListSecretsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListSecretsResponse_SdkV2) { +} + +func (newState *ListSecretsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListSecretsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListSecretsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListSecretsResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "secrets": reflect.TypeOf(SecretMetadata_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, ListSecretsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListSecretsResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "secrets": o.Secrets, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListSecretsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "secrets": basetypes.ListType{ + ElemType: SecretMetadata{}.Type(ctx), + }, + }, + } +} + +// GetSecrets returns the value of the Secrets field in ListSecretsResponse_SdkV2 as +// a slice of SecretMetadata_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListSecretsResponse_SdkV2) GetSecrets(ctx context.Context) ([]SecretMetadata_SdkV2, bool) { + if o.Secrets.IsNull() || o.Secrets.IsUnknown() { + return nil, false + } + var v []SecretMetadata_SdkV2 + d := o.Secrets.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetSecrets sets the value of the Secrets field in ListSecretsResponse_SdkV2. +func (o *ListSecretsResponse_SdkV2) SetSecrets(ctx context.Context, v []SecretMetadata_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["secrets"] + t = t.(attr.TypeWithElementType).ElementType() + o.Secrets = types.ListValueMust(t, vs) +} + +// List contents +type ListWorkspaceRequest_SdkV2 struct { + // UTC timestamp in milliseconds + NotebooksModifiedAfter types.Int64 `tfsdk:"-"` + // The absolute path of the notebook or directory. + Path types.String `tfsdk:"-"` +} + +func (newState *ListWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListWorkspaceRequest_SdkV2) { +} + +func (newState *ListWorkspaceRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListWorkspaceRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListWorkspaceRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListWorkspaceRequest_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, ListWorkspaceRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListWorkspaceRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "notebooks_modified_after": o.NotebooksModifiedAfter, + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "notebooks_modified_after": types.Int64Type, + "path": types.StringType, + }, + } +} + +type Mkdirs_SdkV2 struct { + // The absolute path of the directory. If the parent directories do not + // exist, it will also create them. If the directory already exists, this + // command will do nothing and succeed. + Path types.String `tfsdk:"path" tf:""` +} + +func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan Mkdirs_SdkV2) { +} + +func (newState *Mkdirs_SdkV2) SyncEffectiveFieldsDuringRead(existingState Mkdirs_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a Mkdirs_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, Mkdirs_SdkV2 +// only implements ToObjectValue() and Type(). +func (o Mkdirs_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "path": o.Path, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o Mkdirs_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "path": types.StringType, + }, + } +} + +type MkdirsResponse_SdkV2 struct { +} + +func (newState *MkdirsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MkdirsResponse_SdkV2) { +} + +func (newState *MkdirsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState MkdirsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in MkdirsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a MkdirsResponse_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, MkdirsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o MkdirsResponse_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 MkdirsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type ObjectInfo_SdkV2 struct { + // Only applicable to files. The creation UTC timestamp. + CreatedAt types.Int64 `tfsdk:"created_at" tf:"optional"` + // The language of the object. This value is set only if the object type is + // `NOTEBOOK`. + Language types.String `tfsdk:"language" tf:"optional"` + // Only applicable to files, the last modified UTC timestamp. + ModifiedAt types.Int64 `tfsdk:"modified_at" tf:"optional"` + // Unique identifier for the object. + ObjectId types.Int64 `tfsdk:"object_id" tf:"optional"` + // The type of the object in workspace. + // + // - `NOTEBOOK`: document that contains runnable code, visualizations, and + // explanatory text. - `DIRECTORY`: directory - `LIBRARY`: library - `FILE`: + // file - `REPO`: repository - `DASHBOARD`: Lakeview dashboard + ObjectType types.String `tfsdk:"object_type" tf:"optional"` + // The absolute path of the object. + Path types.String `tfsdk:"path" tf:"optional"` + // A unique identifier for the object that is consistent across all + // Databricks APIs. + ResourceId types.String `tfsdk:"resource_id" tf:"optional"` + // Only applicable to files. The file size in bytes can be returned. + Size types.Int64 `tfsdk:"size" tf:"optional"` +} + +func (newState *ObjectInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ObjectInfo_SdkV2) { +} + +func (newState *ObjectInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState ObjectInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ObjectInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ObjectInfo_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, ObjectInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ObjectInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "created_at": o.CreatedAt, + "language": o.Language, + "modified_at": o.ModifiedAt, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + "path": o.Path, + "resource_id": o.ResourceId, + "size": o.Size, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ObjectInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "created_at": types.Int64Type, + "language": types.StringType, + "modified_at": types.Int64Type, + "object_id": types.Int64Type, + "object_type": types.StringType, + "path": types.StringType, + "resource_id": types.StringType, + "size": types.Int64Type, + }, + } +} + +type PutAcl_SdkV2 struct { + // The permission level applied to the principal. + Permission types.String `tfsdk:"permission" tf:""` + // The principal in which the permission is applied. + Principal types.String `tfsdk:"principal" tf:""` + // The name of the scope to apply permissions to. + Scope types.String `tfsdk:"scope" tf:""` +} + +func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAcl_SdkV2) { +} + +func (newState *PutAcl_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAcl_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutAcl_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, PutAcl_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutAcl_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "permission": o.Permission, + "principal": o.Principal, + "scope": o.Scope, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutAcl_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "permission": types.StringType, + "principal": types.StringType, + "scope": types.StringType, + }, + } +} + +type PutAclResponse_SdkV2 struct { +} + +func (newState *PutAclResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutAclResponse_SdkV2) { +} + +func (newState *PutAclResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutAclResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PutAclResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutAclResponse_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, PutAclResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutAclResponse_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 PutAclResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type PutSecret_SdkV2 struct { + // If specified, value will be stored as bytes. + BytesValue types.String `tfsdk:"bytes_value" tf:"optional"` + // A unique name to identify the secret. + Key types.String `tfsdk:"key" tf:""` + // The name of the scope to which the secret will be associated with. + Scope types.String `tfsdk:"scope" tf:""` + // If specified, note that the value will be stored in UTF-8 (MB4) form. + StringValue types.String `tfsdk:"string_value" tf:"optional"` +} + +func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecret_SdkV2) { +} + +func (newState *PutSecret_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutSecret_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutSecret_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, PutSecret_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutSecret_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "bytes_value": o.BytesValue, + "key": o.Key, + "scope": o.Scope, + "string_value": o.StringValue, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o PutSecret_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "bytes_value": types.StringType, + "key": types.StringType, + "scope": types.StringType, + "string_value": types.StringType, + }, + } +} + +type PutSecretResponse_SdkV2 struct { +} + +func (newState *PutSecretResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan PutSecretResponse_SdkV2) { +} + +func (newState *PutSecretResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState PutSecretResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in PutSecretResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a PutSecretResponse_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, PutSecretResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o PutSecretResponse_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 PutSecretResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type RepoAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *RepoAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlRequest_SdkV2) { +} + +func (newState *RepoAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoAccessControlRequest_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, RepoAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type RepoAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *RepoAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoAccessControlResponse_SdkV2) { +} + +func (newState *RepoAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(RepoPermission_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, RepoAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: RepoPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in RepoAccessControlResponse_SdkV2 as +// a slice of RepoPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepoAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]RepoPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []RepoPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in RepoAccessControlResponse_SdkV2. +func (o *RepoAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []RepoPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +// Git folder (repo) information. +type RepoInfo_SdkV2 struct { + // Name of the current git branch of the git folder (repo). + Branch types.String `tfsdk:"branch" tf:"optional"` + // Current git commit id of the git folder (repo). + HeadCommitId types.String `tfsdk:"head_commit_id" tf:"optional"` + // Id of the git folder (repo) in the Workspace. + Id types.Int64 `tfsdk:"id" tf:"optional"` + // Root path of the git folder (repo) in the Workspace. + Path types.String `tfsdk:"path" tf:"optional"` + // Git provider of the remote git repository, e.g. `gitHub`. + Provider types.String `tfsdk:"provider" tf:"optional"` + // Sparse checkout config for the git folder (repo). + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + // URL of the remote git repository. + Url types.String `tfsdk:"url" tf:"optional"` +} + +func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoInfo_SdkV2) { +} + +func (newState *RepoInfo_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoInfo_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoInfo. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoInfo_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sparse_checkout": reflect.TypeOf(SparseCheckout_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, RepoInfo_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoInfo_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch": o.Branch, + "head_commit_id": o.HeadCommitId, + "id": o.Id, + "path": o.Path, + "provider": o.Provider, + "sparse_checkout": o.SparseCheckout, + "url": o.Url, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoInfo_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": basetypes.ListType{ + ElemType: SparseCheckout{}.Type(ctx), + }, + "url": types.StringType, + }, + } +} + +// GetSparseCheckout returns the value of the SparseCheckout field in RepoInfo_SdkV2 as +// a SparseCheckout_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RepoInfo_SdkV2) GetSparseCheckout(ctx context.Context) (SparseCheckout_SdkV2, bool) { + var e SparseCheckout_SdkV2 + if o.SparseCheckout.IsNull() || o.SparseCheckout.IsUnknown() { + return e, false + } + var v []SparseCheckout_SdkV2 + d := o.SparseCheckout.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparseCheckout sets the value of the SparseCheckout field in RepoInfo_SdkV2. +func (o *RepoInfo_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckout_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] + o.SparseCheckout = types.ListValueMust(t, vs) +} + +type RepoPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *RepoPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermission_SdkV2) { +} + +func (newState *RepoPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, RepoPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in RepoPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepoPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in RepoPermission_SdkV2. +func (o *RepoPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type RepoPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *RepoPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissions_SdkV2) { +} + +func (newState *RepoPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(RepoAccessControlResponse_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, RepoPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: RepoAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in RepoPermissions_SdkV2 as +// a slice of RepoAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepoPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]RepoAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []RepoAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in RepoPermissions_SdkV2. +func (o *RepoPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []RepoAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type RepoPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *RepoPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsDescription_SdkV2) { +} + +func (newState *RepoPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in RepoPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoPermissionsDescription_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, RepoPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type RepoPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The repo for which to get or manage permissions. + RepoId types.String `tfsdk:"-"` +} + +func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan RepoPermissionsRequest_SdkV2) { +} + +func (newState *RepoPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState RepoPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a RepoPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(RepoAccessControlRequest_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, RepoPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o RepoPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "repo_id": o.RepoId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o RepoPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: RepoAccessControlRequest{}.Type(ctx), + }, + "repo_id": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in RepoPermissionsRequest_SdkV2 as +// a slice of RepoAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *RepoPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]RepoAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []RepoAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in RepoPermissionsRequest_SdkV2. +func (o *RepoPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []RepoAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type SecretMetadata_SdkV2 struct { + // A unique name to identify the secret. + Key types.String `tfsdk:"key" tf:"optional"` + // The last updated timestamp (in milliseconds) for the secret. + LastUpdatedTimestamp types.Int64 `tfsdk:"last_updated_timestamp" tf:"optional"` +} + +func (newState *SecretMetadata_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretMetadata_SdkV2) { +} + +func (newState *SecretMetadata_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretMetadata_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretMetadata. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SecretMetadata_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, SecretMetadata_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SecretMetadata_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "key": o.Key, + "last_updated_timestamp": o.LastUpdatedTimestamp, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecretMetadata_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "key": types.StringType, + "last_updated_timestamp": types.Int64Type, + }, + } +} + +type SecretScope_SdkV2 struct { + // The type of secret scope backend. + BackendType types.String `tfsdk:"backend_type" tf:"optional"` + // The metadata for the secret scope if the type is `AZURE_KEYVAULT` + KeyvaultMetadata types.List `tfsdk:"keyvault_metadata" tf:"optional,object"` + // A unique name to identify the secret scope. + Name types.String `tfsdk:"name" tf:"optional"` +} + +func (newState *SecretScope_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SecretScope_SdkV2) { +} + +func (newState *SecretScope_SdkV2) SyncEffectiveFieldsDuringRead(existingState SecretScope_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SecretScope. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SecretScope_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "keyvault_metadata": reflect.TypeOf(AzureKeyVaultSecretScopeMetadata_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, SecretScope_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SecretScope_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "backend_type": o.BackendType, + "keyvault_metadata": o.KeyvaultMetadata, + "name": o.Name, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SecretScope_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "backend_type": types.StringType, + "keyvault_metadata": basetypes.ListType{ + ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), + }, + "name": types.StringType, + }, + } +} + +// GetKeyvaultMetadata returns the value of the KeyvaultMetadata field in SecretScope_SdkV2 as +// a AzureKeyVaultSecretScopeMetadata_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SecretScope_SdkV2) GetKeyvaultMetadata(ctx context.Context) (AzureKeyVaultSecretScopeMetadata_SdkV2, bool) { + var e AzureKeyVaultSecretScopeMetadata_SdkV2 + if o.KeyvaultMetadata.IsNull() || o.KeyvaultMetadata.IsUnknown() { + return e, false + } + var v []AzureKeyVaultSecretScopeMetadata_SdkV2 + d := o.KeyvaultMetadata.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetKeyvaultMetadata sets the value of the KeyvaultMetadata field in SecretScope_SdkV2. +func (o *SecretScope_SdkV2) SetKeyvaultMetadata(ctx context.Context, v AzureKeyVaultSecretScopeMetadata_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["keyvault_metadata"] + o.KeyvaultMetadata = types.ListValueMust(t, vs) +} + +// Sparse checkout configuration, it contains options like cone patterns. +type SparseCheckout_SdkV2 struct { + // List of sparse checkout cone patterns, see [cone mode handling] for + // details. + // + // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling + Patterns types.List `tfsdk:"patterns" tf:"optional"` +} + +func (newState *SparseCheckout_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckout_SdkV2) { +} + +func (newState *SparseCheckout_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparseCheckout_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckout. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparseCheckout_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "patterns": 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, SparseCheckout_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparseCheckout_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "patterns": o.Patterns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparseCheckout_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "patterns": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPatterns returns the value of the Patterns field in SparseCheckout_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SparseCheckout_SdkV2) GetPatterns(ctx context.Context) ([]types.String, bool) { + if o.Patterns.IsNull() || o.Patterns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Patterns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPatterns sets the value of the Patterns field in SparseCheckout_SdkV2. +func (o *SparseCheckout_SdkV2) SetPatterns(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["patterns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Patterns = types.ListValueMust(t, vs) +} + +// Sparse checkout configuration, it contains options like cone patterns. +type SparseCheckoutUpdate_SdkV2 struct { + // List of sparse checkout cone patterns, see [cone mode handling] for + // details. + // + // [cone mode handling]: https://git-scm.com/docs/git-sparse-checkout#_internalscone_mode_handling + Patterns types.List `tfsdk:"patterns" tf:"optional"` +} + +func (newState *SparseCheckoutUpdate_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan SparseCheckoutUpdate_SdkV2) { +} + +func (newState *SparseCheckoutUpdate_SdkV2) SyncEffectiveFieldsDuringRead(existingState SparseCheckoutUpdate_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in SparseCheckoutUpdate. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a SparseCheckoutUpdate_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "patterns": 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, SparseCheckoutUpdate_SdkV2 +// only implements ToObjectValue() and Type(). +func (o SparseCheckoutUpdate_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "patterns": o.Patterns, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o SparseCheckoutUpdate_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "patterns": basetypes.ListType{ + ElemType: types.StringType, + }, + }, + } +} + +// GetPatterns returns the value of the Patterns field in SparseCheckoutUpdate_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *SparseCheckoutUpdate_SdkV2) GetPatterns(ctx context.Context) ([]types.String, bool) { + if o.Patterns.IsNull() || o.Patterns.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Patterns.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPatterns sets the value of the Patterns field in SparseCheckoutUpdate_SdkV2. +func (o *SparseCheckoutUpdate_SdkV2) SetPatterns(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["patterns"] + t = t.(attr.TypeWithElementType).ElementType() + o.Patterns = types.ListValueMust(t, vs) +} + +type UpdateCredentialsRequest_SdkV2 struct { + // The ID for the corresponding credential to access. + CredentialId types.Int64 `tfsdk:"-"` + // Git provider. This field is case-insensitive. The available Git providers + // are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, + // `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and + // `awsCodeCommit`. + GitProvider types.String `tfsdk:"git_provider" tf:""` + // The username or email provided with your Git provider account, depending + // on which provider you are using. For GitHub, GitHub Enterprise Server, or + // Azure DevOps Services, either email or username may be used. For GitLab, + // GitLab Enterprise Edition, email must be used. For AWS CodeCommit, + // BitBucket or BitBucket Server, username must be used. For all other + // providers please see your provider's Personal Access Token authentication + // documentation to see what is supported. + GitUsername types.String `tfsdk:"git_username" tf:"optional"` + // The personal access token used to authenticate to the corresponding Git + // provider. For certain providers, support may exist for other types of + // scoped access tokens. [Learn more]. + // + // [Learn more]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html + PersonalAccessToken types.String `tfsdk:"personal_access_token" tf:"optional"` +} + +func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsRequest_SdkV2) { +} + +func (newState *UpdateCredentialsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCredentialsRequest_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, UpdateCredentialsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + "personal_access_token": o.PersonalAccessToken, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateCredentialsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "credential_id": types.Int64Type, + "git_provider": types.StringType, + "git_username": types.StringType, + "personal_access_token": types.StringType, + }, + } +} + +type UpdateCredentialsResponse_SdkV2 struct { +} + +func (newState *UpdateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateCredentialsResponse_SdkV2) { +} + +func (newState *UpdateCredentialsResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateCredentialsResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateCredentialsResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateCredentialsResponse_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, UpdateCredentialsResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialsResponse_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 UpdateCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type UpdateRepoRequest_SdkV2 struct { + // Branch that the local version of the repo is checked out to. + Branch types.String `tfsdk:"branch" tf:"optional"` + // ID of the Git folder (repo) object in the workspace. + RepoId types.Int64 `tfsdk:"-"` + // If specified, update the sparse checkout settings. The update will fail + // if sparse checkout is not enabled for the repo. + SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + // Tag that the local version of the repo is checked out to. Updating the + // repo to a tag puts the repo in a detached HEAD state. Before committing + // new changes, you must update the repo to a branch instead of the detached + // HEAD. + Tag types.String `tfsdk:"tag" tf:"optional"` +} + +func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoRequest_SdkV2) { +} + +func (newState *UpdateRepoRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRepoRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRepoRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sparse_checkout": reflect.TypeOf(SparseCheckoutUpdate_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, UpdateRepoRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRepoRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "branch": o.Branch, + "repo_id": o.RepoId, + "sparse_checkout": o.SparseCheckout, + "tag": o.Tag, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "branch": types.StringType, + "repo_id": types.Int64Type, + "sparse_checkout": basetypes.ListType{ + ElemType: SparseCheckoutUpdate{}.Type(ctx), + }, + "tag": types.StringType, + }, + } +} + +// GetSparseCheckout returns the value of the SparseCheckout field in UpdateRepoRequest_SdkV2 as +// a SparseCheckoutUpdate_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateRepoRequest_SdkV2) GetSparseCheckout(ctx context.Context) (SparseCheckoutUpdate_SdkV2, bool) { + var e SparseCheckoutUpdate_SdkV2 + if o.SparseCheckout.IsNull() || o.SparseCheckout.IsUnknown() { + return e, false + } + var v []SparseCheckoutUpdate_SdkV2 + d := o.SparseCheckout.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetSparseCheckout sets the value of the SparseCheckout field in UpdateRepoRequest_SdkV2. +func (o *UpdateRepoRequest_SdkV2) SetSparseCheckout(ctx context.Context, v SparseCheckoutUpdate_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] + o.SparseCheckout = types.ListValueMust(t, vs) +} + +type UpdateRepoResponse_SdkV2 struct { +} + +func (newState *UpdateRepoResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateRepoResponse_SdkV2) { +} + +func (newState *UpdateRepoResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateRepoResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateRepoResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateRepoResponse_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, UpdateRepoResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateRepoResponse_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 UpdateRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } +} + +type WorkspaceObjectAccessControlRequest_SdkV2 struct { + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` + // application ID of a service principal + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *WorkspaceObjectAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlRequest_SdkV2) { +} + +func (newState *WorkspaceObjectAccessControlRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectAccessControlRequest_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, WorkspaceObjectAccessControlRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectAccessControlRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectAccessControlRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "group_name": types.StringType, + "permission_level": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +type WorkspaceObjectAccessControlResponse_SdkV2 struct { + // All permissions. + AllPermissions types.List `tfsdk:"all_permissions" tf:"optional"` + // Display name of the user or service principal. + DisplayName types.String `tfsdk:"display_name" tf:"optional"` + // name of the group + GroupName types.String `tfsdk:"group_name" tf:"optional"` + // Name of the service principal. + ServicePrincipalName types.String `tfsdk:"service_principal_name" tf:"optional"` + // name of the user + UserName types.String `tfsdk:"user_name" tf:"optional"` +} + +func (newState *WorkspaceObjectAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectAccessControlResponse_SdkV2) { +} + +func (newState *WorkspaceObjectAccessControlResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectAccessControlResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectAccessControlResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectAccessControlResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "all_permissions": reflect.TypeOf(WorkspaceObjectPermission_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, WorkspaceObjectAccessControlResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectAccessControlResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "all_permissions": o.AllPermissions, + "display_name": o.DisplayName, + "group_name": o.GroupName, + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "all_permissions": basetypes.ListType{ + ElemType: WorkspaceObjectPermission{}.Type(ctx), + }, + "display_name": types.StringType, + "group_name": types.StringType, + "service_principal_name": types.StringType, + "user_name": types.StringType, + }, + } +} + +// GetAllPermissions returns the value of the AllPermissions field in WorkspaceObjectAccessControlResponse_SdkV2 as +// a slice of WorkspaceObjectPermission_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspaceObjectAccessControlResponse_SdkV2) GetAllPermissions(ctx context.Context) ([]WorkspaceObjectPermission_SdkV2, bool) { + if o.AllPermissions.IsNull() || o.AllPermissions.IsUnknown() { + return nil, false + } + var v []WorkspaceObjectPermission_SdkV2 + d := o.AllPermissions.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAllPermissions sets the value of the AllPermissions field in WorkspaceObjectAccessControlResponse_SdkV2. +func (o *WorkspaceObjectAccessControlResponse_SdkV2) SetAllPermissions(ctx context.Context, v []WorkspaceObjectPermission_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["all_permissions"] + t = t.(attr.TypeWithElementType).ElementType() + o.AllPermissions = types.ListValueMust(t, vs) +} + +type WorkspaceObjectPermission_SdkV2 struct { + Inherited types.Bool `tfsdk:"inherited" tf:"optional"` + + InheritedFromObject types.List `tfsdk:"inherited_from_object" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *WorkspaceObjectPermission_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermission_SdkV2) { +} + +func (newState *WorkspaceObjectPermission_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermission_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermission. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectPermission_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "inherited_from_object": 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, WorkspaceObjectPermission_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermission_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectPermission_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "inherited": types.BoolType, + "inherited_from_object": basetypes.ListType{ + ElemType: types.StringType, + }, + "permission_level": types.StringType, + }, + } +} + +// GetInheritedFromObject returns the value of the InheritedFromObject field in WorkspaceObjectPermission_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspaceObjectPermission_SdkV2) GetInheritedFromObject(ctx context.Context) ([]types.String, bool) { + if o.InheritedFromObject.IsNull() || o.InheritedFromObject.IsUnknown() { + return nil, false + } + var v []types.String + d := o.InheritedFromObject.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetInheritedFromObject sets the value of the InheritedFromObject field in WorkspaceObjectPermission_SdkV2. +func (o *WorkspaceObjectPermission_SdkV2) SetInheritedFromObject(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["inherited_from_object"] + t = t.(attr.TypeWithElementType).ElementType() + o.InheritedFromObject = types.ListValueMust(t, vs) +} + +type WorkspaceObjectPermissions_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + + ObjectId types.String `tfsdk:"object_id" tf:"optional"` + + ObjectType types.String `tfsdk:"object_type" tf:"optional"` +} + +func (newState *WorkspaceObjectPermissions_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissions_SdkV2) { +} + +func (newState *WorkspaceObjectPermissions_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissions_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissions. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectPermissions_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(WorkspaceObjectAccessControlResponse_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, WorkspaceObjectPermissions_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissions_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectPermissions_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: WorkspaceObjectAccessControlResponse{}.Type(ctx), + }, + "object_id": types.StringType, + "object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in WorkspaceObjectPermissions_SdkV2 as +// a slice of WorkspaceObjectAccessControlResponse_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspaceObjectPermissions_SdkV2) GetAccessControlList(ctx context.Context) ([]WorkspaceObjectAccessControlResponse_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []WorkspaceObjectAccessControlResponse_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in WorkspaceObjectPermissions_SdkV2. +func (o *WorkspaceObjectPermissions_SdkV2) SetAccessControlList(ctx context.Context, v []WorkspaceObjectAccessControlResponse_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} + +type WorkspaceObjectPermissionsDescription_SdkV2 struct { + Description types.String `tfsdk:"description" tf:"optional"` + // Permission level + PermissionLevel types.String `tfsdk:"permission_level" tf:"optional"` +} + +func (newState *WorkspaceObjectPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsDescription_SdkV2) { +} + +func (newState *WorkspaceObjectPermissionsDescription_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsDescription_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in WorkspaceObjectPermissionsDescription. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectPermissionsDescription_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, WorkspaceObjectPermissionsDescription_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissionsDescription_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectPermissionsDescription_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "description": types.StringType, + "permission_level": types.StringType, + }, + } +} + +type WorkspaceObjectPermissionsRequest_SdkV2 struct { + AccessControlList types.List `tfsdk:"access_control_list" tf:"optional"` + // The workspace object for which to get or manage permissions. + WorkspaceObjectId types.String `tfsdk:"-"` + // The workspace object type for which to get or manage permissions. + WorkspaceObjectType types.String `tfsdk:"-"` +} + +func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan WorkspaceObjectPermissionsRequest_SdkV2) { +} + +func (newState *WorkspaceObjectPermissionsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState WorkspaceObjectPermissionsRequest_SdkV2) { +} + +// 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 +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a WorkspaceObjectPermissionsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(WorkspaceObjectAccessControlRequest_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, WorkspaceObjectPermissionsRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissionsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o WorkspaceObjectPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "access_control_list": basetypes.ListType{ + ElemType: WorkspaceObjectAccessControlRequest{}.Type(ctx), + }, + "workspace_object_id": types.StringType, + "workspace_object_type": types.StringType, + }, + } +} + +// GetAccessControlList returns the value of the AccessControlList field in WorkspaceObjectPermissionsRequest_SdkV2 as +// a slice of WorkspaceObjectAccessControlRequest_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *WorkspaceObjectPermissionsRequest_SdkV2) GetAccessControlList(ctx context.Context) ([]WorkspaceObjectAccessControlRequest_SdkV2, bool) { + if o.AccessControlList.IsNull() || o.AccessControlList.IsUnknown() { + return nil, false + } + var v []WorkspaceObjectAccessControlRequest_SdkV2 + d := o.AccessControlList.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAccessControlList sets the value of the AccessControlList field in WorkspaceObjectPermissionsRequest_SdkV2. +func (o *WorkspaceObjectPermissionsRequest_SdkV2) SetAccessControlList(ctx context.Context, v []WorkspaceObjectAccessControlRequest_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["access_control_list"] + t = t.(attr.TypeWithElementType).ElementType() + o.AccessControlList = types.ListValueMust(t, vs) +} diff --git a/internal/service/workspace_tf/model.go b/internal/service/workspace_tf/model.go index ea6811069..17d354dc5 100755 --- a/internal/service/workspace_tf/model.go +++ b/internal/service/workspace_tf/model.go @@ -240,7 +240,7 @@ type CreateRepoRequest struct { Provider types.String `tfsdk:"provider" tf:""` // If specified, the repo will be created with sparse checkout enabled. You // cannot enable/disable sparse checkout after the repo is created. - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` // URL of the Git repository to be linked. Url types.String `tfsdk:"url" tf:""` } @@ -282,12 +282,10 @@ func (o CreateRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o CreateRepoRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "path": types.StringType, - "provider": types.StringType, - "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), - }, - "url": types.StringType, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": SparseCheckout{}.Type(ctx), + "url": types.StringType, }, } } @@ -301,7 +299,10 @@ func (o *CreateRepoRequest) GetSparseCheckout(ctx context.Context) (SparseChecko return e, false } var v []SparseCheckout - d := o.SparseCheckout.ElementsAs(ctx, &v, true) + d := o.SparseCheckout.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -313,9 +314,8 @@ func (o *CreateRepoRequest) GetSparseCheckout(ctx context.Context) (SparseChecko // SetSparseCheckout sets the value of the SparseCheckout field in CreateRepoRequest. func (o *CreateRepoRequest) SetSparseCheckout(ctx context.Context, v SparseCheckout) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] - o.SparseCheckout = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparseCheckout = vs } type CreateRepoResponse struct { @@ -331,7 +331,7 @@ type CreateRepoResponse struct { // Git provider of the linked Git repository. Provider types.String `tfsdk:"provider" tf:"optional"` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` // URL of the linked Git repository. Url types.String `tfsdk:"url" tf:"optional"` } @@ -376,15 +376,13 @@ func (o CreateRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectV func (o CreateRepoResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "branch": types.StringType, - "head_commit_id": types.StringType, - "id": types.Int64Type, - "path": types.StringType, - "provider": types.StringType, - "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), - }, - "url": types.StringType, + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": SparseCheckout{}.Type(ctx), + "url": types.StringType, }, } } @@ -398,7 +396,10 @@ func (o *CreateRepoResponse) GetSparseCheckout(ctx context.Context) (SparseCheck return e, false } var v []SparseCheckout - d := o.SparseCheckout.ElementsAs(ctx, &v, true) + d := o.SparseCheckout.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -410,14 +411,13 @@ func (o *CreateRepoResponse) GetSparseCheckout(ctx context.Context) (SparseCheck // SetSparseCheckout sets the value of the SparseCheckout field in CreateRepoResponse. func (o *CreateRepoResponse) SetSparseCheckout(ctx context.Context, v SparseCheckout) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] - o.SparseCheckout = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparseCheckout = vs } type CreateScope struct { // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - BackendAzureKeyvault types.List `tfsdk:"backend_azure_keyvault" tf:"optional,object"` + BackendAzureKeyvault types.Object `tfsdk:"backend_azure_keyvault" tf:"optional,object"` // The principal that is initially granted `MANAGE` permission to the // created scope. InitialManagePrincipal types.String `tfsdk:"initial_manage_principal" tf:"optional"` @@ -465,9 +465,7 @@ func (o CreateScope) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o CreateScope) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "backend_azure_keyvault": basetypes.ListType{ - ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), - }, + "backend_azure_keyvault": AzureKeyVaultSecretScopeMetadata{}.Type(ctx), "initial_manage_principal": types.StringType, "scope": types.StringType, "scope_backend_type": types.StringType, @@ -484,7 +482,10 @@ func (o *CreateScope) GetBackendAzureKeyvault(ctx context.Context) (AzureKeyVaul return e, false } var v []AzureKeyVaultSecretScopeMetadata - d := o.BackendAzureKeyvault.ElementsAs(ctx, &v, true) + d := o.BackendAzureKeyvault.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -496,9 +497,8 @@ func (o *CreateScope) GetBackendAzureKeyvault(ctx context.Context) (AzureKeyVaul // SetBackendAzureKeyvault sets the value of the BackendAzureKeyvault field in CreateScope. func (o *CreateScope) SetBackendAzureKeyvault(ctx context.Context, v AzureKeyVaultSecretScopeMetadata) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["backend_azure_keyvault"] - o.BackendAzureKeyvault = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.BackendAzureKeyvault = vs } type CreateScopeResponse struct { @@ -1535,7 +1535,7 @@ type GetRepoResponse struct { // Git provider of the linked Git repository. Provider types.String `tfsdk:"provider" tf:"optional"` // Sparse checkout settings for the Git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` // URL of the linked Git repository. Url types.String `tfsdk:"url" tf:"optional"` } @@ -1580,15 +1580,13 @@ func (o GetRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValu func (o GetRepoResponse) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "branch": types.StringType, - "head_commit_id": types.StringType, - "id": types.Int64Type, - "path": types.StringType, - "provider": types.StringType, - "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), - }, - "url": types.StringType, + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": SparseCheckout{}.Type(ctx), + "url": types.StringType, }, } } @@ -1602,7 +1600,10 @@ func (o *GetRepoResponse) GetSparseCheckout(ctx context.Context) (SparseCheckout return e, false } var v []SparseCheckout - d := o.SparseCheckout.ElementsAs(ctx, &v, true) + d := o.SparseCheckout.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -1614,9 +1615,8 @@ func (o *GetRepoResponse) GetSparseCheckout(ctx context.Context) (SparseCheckout // SetSparseCheckout sets the value of the SparseCheckout field in GetRepoResponse. func (o *GetRepoResponse) SetSparseCheckout(ctx context.Context, v SparseCheckout) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] - o.SparseCheckout = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparseCheckout = vs } // Get a secret @@ -3143,7 +3143,7 @@ type RepoInfo struct { // Git provider of the remote git repository, e.g. `gitHub`. Provider types.String `tfsdk:"provider" tf:"optional"` // Sparse checkout config for the git folder (repo). - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` // URL of the remote git repository. Url types.String `tfsdk:"url" tf:"optional"` } @@ -3188,15 +3188,13 @@ func (o RepoInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o RepoInfo) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "branch": types.StringType, - "head_commit_id": types.StringType, - "id": types.Int64Type, - "path": types.StringType, - "provider": types.StringType, - "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), - }, - "url": types.StringType, + "branch": types.StringType, + "head_commit_id": types.StringType, + "id": types.Int64Type, + "path": types.StringType, + "provider": types.StringType, + "sparse_checkout": SparseCheckout{}.Type(ctx), + "url": types.StringType, }, } } @@ -3210,7 +3208,10 @@ func (o *RepoInfo) GetSparseCheckout(ctx context.Context) (SparseCheckout, bool) return e, false } var v []SparseCheckout - d := o.SparseCheckout.ElementsAs(ctx, &v, true) + d := o.SparseCheckout.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3222,9 +3223,8 @@ func (o *RepoInfo) GetSparseCheckout(ctx context.Context) (SparseCheckout, bool) // SetSparseCheckout sets the value of the SparseCheckout field in RepoInfo. func (o *RepoInfo) SetSparseCheckout(ctx context.Context, v SparseCheckout) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] - o.SparseCheckout = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparseCheckout = vs } type RepoPermission struct { @@ -3555,7 +3555,7 @@ type SecretScope struct { // The type of secret scope backend. BackendType types.String `tfsdk:"backend_type" tf:"optional"` // The metadata for the secret scope if the type is `AZURE_KEYVAULT` - KeyvaultMetadata types.List `tfsdk:"keyvault_metadata" tf:"optional,object"` + KeyvaultMetadata types.Object `tfsdk:"keyvault_metadata" tf:"optional,object"` // A unique name to identify the secret scope. Name types.String `tfsdk:"name" tf:"optional"` } @@ -3596,11 +3596,9 @@ func (o SecretScope) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SecretScope) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "backend_type": types.StringType, - "keyvault_metadata": basetypes.ListType{ - ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), - }, - "name": types.StringType, + "backend_type": types.StringType, + "keyvault_metadata": AzureKeyVaultSecretScopeMetadata{}.Type(ctx), + "name": types.StringType, }, } } @@ -3614,7 +3612,10 @@ func (o *SecretScope) GetKeyvaultMetadata(ctx context.Context) (AzureKeyVaultSec return e, false } var v []AzureKeyVaultSecretScopeMetadata - d := o.KeyvaultMetadata.ElementsAs(ctx, &v, true) + d := o.KeyvaultMetadata.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3626,9 +3627,8 @@ func (o *SecretScope) GetKeyvaultMetadata(ctx context.Context) (AzureKeyVaultSec // SetKeyvaultMetadata sets the value of the KeyvaultMetadata field in SecretScope. func (o *SecretScope) SetKeyvaultMetadata(ctx context.Context, v AzureKeyVaultSecretScopeMetadata) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["keyvault_metadata"] - o.KeyvaultMetadata = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.KeyvaultMetadata = vs } // Sparse checkout configuration, it contains options like cone patterns. @@ -3893,7 +3893,7 @@ type UpdateRepoRequest struct { RepoId types.Int64 `tfsdk:"-"` // If specified, update the sparse checkout settings. The update will fail // if sparse checkout is not enabled for the repo. - SparseCheckout types.List `tfsdk:"sparse_checkout" tf:"optional,object"` + SparseCheckout types.Object `tfsdk:"sparse_checkout" tf:"optional,object"` // Tag that the local version of the repo is checked out to. Updating the // repo to a tag puts the repo in a detached HEAD state. Before committing // new changes, you must update the repo to a branch instead of the detached @@ -3938,12 +3938,10 @@ func (o UpdateRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectVa func (o UpdateRepoRequest) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "branch": types.StringType, - "repo_id": types.Int64Type, - "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckoutUpdate{}.Type(ctx), - }, - "tag": types.StringType, + "branch": types.StringType, + "repo_id": types.Int64Type, + "sparse_checkout": SparseCheckoutUpdate{}.Type(ctx), + "tag": types.StringType, }, } } @@ -3957,7 +3955,10 @@ func (o *UpdateRepoRequest) GetSparseCheckout(ctx context.Context) (SparseChecko return e, false } var v []SparseCheckoutUpdate - d := o.SparseCheckout.ElementsAs(ctx, &v, true) + d := o.SparseCheckout.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -3969,9 +3970,8 @@ func (o *UpdateRepoRequest) GetSparseCheckout(ctx context.Context) (SparseChecko // SetSparseCheckout sets the value of the SparseCheckout field in UpdateRepoRequest. func (o *UpdateRepoRequest) SetSparseCheckout(ctx context.Context, v SparseCheckoutUpdate) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["sparse_checkout"] - o.SparseCheckout = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.SparseCheckout = vs } type UpdateRepoResponse struct { From dc8fddd2c9542d5de7d68c555b11c0ecd4ee293e Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 13:30:43 +0100 Subject: [PATCH 2/7] regenerate --- internal/service/compute_tf/legacy_model.go | 228 ++++- internal/service/compute_tf/model.go | 40 +- .../service/dashboards_tf/legacy_model.go | 18 +- internal/service/jobs_tf/legacy_model.go | 452 ++++++--- internal/service/jobs_tf/model.go | 74 +- internal/service/oauth2_tf/legacy_model.go | 897 +++++++++++++++++- internal/service/pipelines_tf/legacy_model.go | 36 +- 7 files changed, 1511 insertions(+), 234 deletions(-) diff --git a/internal/service/compute_tf/legacy_model.go b/internal/service/compute_tf/legacy_model.go index 8aa22622d..ccca65037 100755 --- a/internal/service/compute_tf/legacy_model.go +++ b/internal/service/compute_tf/legacy_model.go @@ -965,9 +965,16 @@ type ClusterAttributes_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -1012,6 +1019,19 @@ type ClusterAttributes_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -1059,6 +1079,12 @@ type ClusterAttributes_SdkV2 struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -1114,6 +1140,8 @@ func (o ClusterAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.Ob "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, + "kind": o.Kind, "node_type_id": o.NodeTypeId, "policy_id": o.PolicyId, "runtime_engine": o.RuntimeEngine, @@ -1122,6 +1150,7 @@ func (o ClusterAttributes_SdkV2) ToObjectValue(ctx context.Context) basetypes.Ob "spark_env_vars": o.SparkEnvVars, "spark_version": o.SparkVersion, "ssh_public_keys": o.SshPublicKeys, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -1159,6 +1188,8 @@ func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, + "kind": types.StringType, "node_type_id": types.StringType, "policy_id": types.StringType, "runtime_engine": types.StringType, @@ -1173,6 +1204,7 @@ func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, @@ -1607,9 +1639,16 @@ type ClusterDetails_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -1673,9 +1712,22 @@ type ClusterDetails_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` // Port on which Spark JDBC server is listening, in the driver nod. No // service will be listeningon on this port in executor nodes. JdbcPort types.Int64 `tfsdk:"jdbc_port" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // the timestamp that the cluster was started/restarted LastRestartedTime types.Int64 `tfsdk:"last_restarted_time" tf:"optional"` // Time when the cluster driver last lost its state (due to a restart or @@ -1762,6 +1814,12 @@ type ClusterDetails_SdkV2 struct { // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. TerminationReason types.List `tfsdk:"termination_reason" tf:"optional,object"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -1834,7 +1892,9 @@ func (o ClusterDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.Objec "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, "jdbc_port": o.JdbcPort, + "kind": o.Kind, "last_restarted_time": o.LastRestartedTime, "last_state_loss_time": o.LastStateLossTime, "node_type_id": o.NodeTypeId, @@ -1853,6 +1913,7 @@ func (o ClusterDetails_SdkV2) ToObjectValue(ctx context.Context) basetypes.Objec "state_message": o.StateMessage, "terminated_time": o.TerminatedTime, "termination_reason": o.TerminationReason, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -1910,7 +1971,9 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, "jdbc_port": types.Int64Type, + "kind": types.StringType, "last_restarted_time": types.Int64Type, "last_state_loss_time": types.Int64Type, "node_type_id": types.StringType, @@ -1939,6 +2002,7 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { "termination_reason": basetypes.ListType{ ElemType: TerminationReason{}.Type(ctx), }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, @@ -3605,9 +3669,16 @@ type ClusterSpec_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -3652,6 +3723,19 @@ type ClusterSpec_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -3710,6 +3794,12 @@ type ClusterSpec_SdkV2 struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -3768,6 +3858,8 @@ func (o ClusterSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, + "kind": o.Kind, "node_type_id": o.NodeTypeId, "num_workers": o.NumWorkers, "policy_id": o.PolicyId, @@ -3777,6 +3869,7 @@ func (o ClusterSpec_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa "spark_env_vars": o.SparkEnvVars, "spark_version": o.SparkVersion, "ssh_public_keys": o.SshPublicKeys, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -3818,6 +3911,8 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, + "kind": types.StringType, "node_type_id": types.StringType, "num_workers": types.Int64Type, "policy_id": types.StringType, @@ -3833,6 +3928,7 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, @@ -4515,9 +4611,16 @@ type CreateCluster_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -4562,6 +4665,19 @@ type CreateCluster_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -4620,6 +4736,12 @@ type CreateCluster_SdkV2 struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -4680,6 +4802,8 @@ func (o CreateCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.Object "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, + "kind": o.Kind, "node_type_id": o.NodeTypeId, "num_workers": o.NumWorkers, "policy_id": o.PolicyId, @@ -4689,6 +4813,7 @@ func (o CreateCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.Object "spark_env_vars": o.SparkEnvVars, "spark_version": o.SparkVersion, "ssh_public_keys": o.SshPublicKeys, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -4733,6 +4858,8 @@ func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, + "kind": types.StringType, "node_type_id": types.StringType, "num_workers": types.Int64Type, "policy_id": types.StringType, @@ -4748,6 +4875,7 @@ func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, @@ -6595,9 +6723,16 @@ type EditCluster_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -6642,6 +6777,19 @@ type EditCluster_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -6700,6 +6848,12 @@ type EditCluster_SdkV2 struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -6759,6 +6913,8 @@ func (o EditCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, + "kind": o.Kind, "node_type_id": o.NodeTypeId, "num_workers": o.NumWorkers, "policy_id": o.PolicyId, @@ -6768,6 +6924,7 @@ func (o EditCluster_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVa "spark_env_vars": o.SparkEnvVars, "spark_version": o.SparkVersion, "ssh_public_keys": o.SshPublicKeys, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -6810,6 +6967,8 @@ func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, + "kind": types.StringType, "node_type_id": types.StringType, "num_workers": types.Int64Type, "policy_id": types.StringType, @@ -6825,6 +6984,7 @@ func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, @@ -15483,9 +15643,16 @@ type UpdateClusterResource_SdkV2 struct { // Data security mode decides what data governance model to use when // accessing data from a cluster. // - // * `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 + // The following modes can only be used with `kind`. * + // `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. @@ -15530,6 +15697,19 @@ type UpdateClusterResource_SdkV2 struct { InitScripts types.List `tfsdk:"init_scripts" tf:"optional"` // The optional ID of the instance pool to which the cluster belongs. InstancePoolId types.String `tfsdk:"instance_pool_id" tf:"optional"` + // This field can only be used with `kind`. + // + // When set to true, Databricks will automatically set single node related + // `custom_tags`, `spark_conf`, and `num_workers` + IsSingleNode types.Bool `tfsdk:"is_single_node" tf:"optional"` + // The kind of compute described by this compute specification. + // + // Depending on `kind`, different validations and default values will be + // applied. + // + // The first usage of this value is for the simple cluster form where it + // sets `kind = CLASSIC_PREVIEW`. + Kind types.String `tfsdk:"kind" tf:"optional"` // This field encodes, through a single value, the resources available to // each of the Spark nodes in this cluster. For example, the Spark nodes can // be provisioned and optimized for memory or compute intensive workloads. A @@ -15588,6 +15768,12 @@ type UpdateClusterResource_SdkV2 struct { // cluster. The corresponding private keys can be used to login with the // user name `ubuntu` on port `2200`. Up to 10 keys can be specified. SshPublicKeys types.List `tfsdk:"ssh_public_keys" tf:"optional"` + // This field can only be used with `kind`. + // + // `effective_spark_version` is determined by `spark_version` (DBR release), + // this field `use_ml_runtime`, and whether `node_type_id` is gpu node or + // not. + UseMlRuntime types.Bool `tfsdk:"use_ml_runtime" tf:"optional"` WorkloadType types.List `tfsdk:"workload_type" tf:"optional,object"` } @@ -15645,6 +15831,8 @@ func (o UpdateClusterResource_SdkV2) ToObjectValue(ctx context.Context) basetype "gcp_attributes": o.GcpAttributes, "init_scripts": o.InitScripts, "instance_pool_id": o.InstancePoolId, + "is_single_node": o.IsSingleNode, + "kind": o.Kind, "node_type_id": o.NodeTypeId, "num_workers": o.NumWorkers, "policy_id": o.PolicyId, @@ -15654,6 +15842,7 @@ func (o UpdateClusterResource_SdkV2) ToObjectValue(ctx context.Context) basetype "spark_env_vars": o.SparkEnvVars, "spark_version": o.SparkVersion, "ssh_public_keys": o.SshPublicKeys, + "use_ml_runtime": o.UseMlRuntime, "workload_type": o.WorkloadType, }) } @@ -15694,6 +15883,8 @@ func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { ElemType: InitScriptInfo{}.Type(ctx), }, "instance_pool_id": types.StringType, + "is_single_node": types.BoolType, + "kind": types.StringType, "node_type_id": types.StringType, "num_workers": types.Int64Type, "policy_id": types.StringType, @@ -15709,6 +15900,7 @@ func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, + "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ ElemType: WorkloadType{}.Type(ctx), }, diff --git a/internal/service/compute_tf/model.go b/internal/service/compute_tf/model.go index c120fad99..b62fa06c3 100755 --- a/internal/service/compute_tf/model.go +++ b/internal/service/compute_tf/model.go @@ -1195,9 +1195,7 @@ func (o ClusterAttributes) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -1815,7 +1813,7 @@ type ClusterDetails struct { TerminatedTime types.Int64 `tfsdk:"terminated_time" tf:"optional"` // Information about why the cluster was terminated. This field only appears // when the cluster is in a `TERMINATING` or `TERMINATED` state. - TerminationReason types.List `tfsdk:"termination_reason" tf:"optional,object"` + TerminationReason types.Object `tfsdk:"termination_reason" tf:"optional,object"` // This field can only be used with `kind`. // // `effective_spark_version` is determined by `spark_version` (DBR release), @@ -1979,17 +1977,13 @@ func (o ClusterDetails) Type(ctx context.Context) attr.Type { "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, }, - "start_time": types.Int64Type, - "state": types.StringType, - "state_message": types.StringType, - "terminated_time": types.Int64Type, - "termination_reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), - }, - "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "start_time": types.Int64Type, + "state": types.StringType, + "state_message": types.StringType, + "terminated_time": types.Int64Type, + "termination_reason": TerminationReason{}.Type(ctx), + "use_ml_runtime": types.BoolType, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -3923,9 +3917,7 @@ func (o ClusterSpec) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -4870,9 +4862,7 @@ func (o CreateCluster) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -6983,9 +6973,7 @@ func (o EditCluster) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } @@ -15901,9 +15889,7 @@ func (o UpdateClusterResource) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "use_ml_runtime": types.BoolType, - "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), - }, + "workload_type": WorkloadType{}.Type(ctx), }, } } diff --git a/internal/service/dashboards_tf/legacy_model.go b/internal/service/dashboards_tf/legacy_model.go index 13e604f40..b1804e48b 100755 --- a/internal/service/dashboards_tf/legacy_model.go +++ b/internal/service/dashboards_tf/legacy_model.go @@ -1998,6 +1998,10 @@ type MigrateDashboardRequest_SdkV2 struct { ParentPath types.String `tfsdk:"parent_path" tf:"optional"` // UUID of the dashboard to be migrated. SourceDashboardId types.String `tfsdk:"source_dashboard_id" tf:""` + // Flag to indicate if mustache parameter syntax ({{ param }}) should be + // auto-updated to named syntax (:param) when converting datasets in the + // dashboard. + UpdateParameterSyntax types.Bool `tfsdk:"update_parameter_syntax" tf:"optional"` } func (newState *MigrateDashboardRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan MigrateDashboardRequest_SdkV2) { @@ -2024,9 +2028,10 @@ func (o MigrateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basety return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "display_name": o.DisplayName, - "parent_path": o.ParentPath, - "source_dashboard_id": o.SourceDashboardId, + "display_name": o.DisplayName, + "parent_path": o.ParentPath, + "source_dashboard_id": o.SourceDashboardId, + "update_parameter_syntax": o.UpdateParameterSyntax, }) } @@ -2034,9 +2039,10 @@ func (o MigrateDashboardRequest_SdkV2) ToObjectValue(ctx context.Context) basety func (o MigrateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "display_name": types.StringType, - "parent_path": types.StringType, - "source_dashboard_id": types.StringType, + "display_name": types.StringType, + "parent_path": types.StringType, + "source_dashboard_id": types.StringType, + "update_parameter_syntax": types.BoolType, }, } } diff --git a/internal/service/jobs_tf/legacy_model.go b/internal/service/jobs_tf/legacy_model.go index c43308080..310948b39 100755 --- a/internal/service/jobs_tf/legacy_model.go +++ b/internal/service/jobs_tf/legacy_model.go @@ -243,6 +243,8 @@ type BaseRun_SdkV2 struct { // 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. * `TABLE`: Indicates a run that is triggered by a table update. + // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually + // restart a continuous job run. Trigger types.String `tfsdk:"trigger" tf:"optional"` // Additional details about what triggered the run TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` @@ -855,7 +857,7 @@ func (o CancelRunResponse_SdkV2) Type(ctx context.Context) attr.Type { } } -// Stores the run state of the clean room notebook V1 task. +// Stores the run state of the clean rooms notebook task. type CleanRoomTaskRunState_SdkV2 struct { // A value indicating the run's current lifecycle state. This field is // always available in the response. @@ -904,6 +906,92 @@ func (o CleanRoomTaskRunState_SdkV2) Type(ctx context.Context) attr.Type { } } +type CleanRoomsNotebookTask_SdkV2 struct { + // The clean room that the notebook belongs to. + CleanRoomName types.String `tfsdk:"clean_room_name" tf:""` + // Checksum to validate the freshness of the notebook resource (i.e. the + // notebook being run is the latest version). It can be fetched by calling + // the :method:cleanroomassets/get API. + Etag types.String `tfsdk:"etag" tf:"optional"` + // Base parameters to be used for the clean room notebook job. + NotebookBaseParameters types.Map `tfsdk:"notebook_base_parameters" tf:"optional"` + // Name of the notebook being run. + NotebookName types.String `tfsdk:"notebook_name" tf:""` +} + +func (newState *CleanRoomsNotebookTask_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CleanRoomsNotebookTask_SdkV2) { +} + +func (newState *CleanRoomsNotebookTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState CleanRoomsNotebookTask_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CleanRoomsNotebookTask. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CleanRoomsNotebookTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "notebook_base_parameters": 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, CleanRoomsNotebookTask_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CleanRoomsNotebookTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "clean_room_name": o.CleanRoomName, + "etag": o.Etag, + "notebook_base_parameters": o.NotebookBaseParameters, + "notebook_name": o.NotebookName, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CleanRoomsNotebookTask_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "clean_room_name": types.StringType, + "etag": types.StringType, + "notebook_base_parameters": basetypes.MapType{ + ElemType: types.StringType, + }, + "notebook_name": types.StringType, + }, + } +} + +// GetNotebookBaseParameters returns the value of the NotebookBaseParameters field in CleanRoomsNotebookTask_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 *CleanRoomsNotebookTask_SdkV2) GetNotebookBaseParameters(ctx context.Context) (map[string]types.String, bool) { + if o.NotebookBaseParameters.IsNull() || o.NotebookBaseParameters.IsUnknown() { + return nil, false + } + var v map[string]types.String + d := o.NotebookBaseParameters.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetNotebookBaseParameters sets the value of the NotebookBaseParameters field in CleanRoomsNotebookTask_SdkV2. +func (o *CleanRoomsNotebookTask_SdkV2) SetNotebookBaseParameters(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["notebook_base_parameters"] + t = t.(attr.TypeWithElementType).ElementType() + o.NotebookBaseParameters = types.MapValueMust(t, vs) +} + type ClusterInstance_SdkV2 struct { // The canonical identifier for the cluster used by a run. This field is // always available for runs on existing clusters. For runs on new clusters, @@ -5596,13 +5684,13 @@ type JobsHealthRule_SdkV2 struct { // // * `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 Private + // 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 Private Preview. * + // 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 Private Preview. * + // 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 Private Preview. + // outstanding files across all streams. This metric is in Public Preview. Metric types.String `tfsdk:"metric" tf:""` // Specifies the operator used to compare the health metric value with the // specified threshold. @@ -8518,6 +8606,8 @@ type Run_SdkV2 struct { // 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. * `TABLE`: Indicates a run that is triggered by a table update. + // * `CONTINUOUS_RESTART`: Indicates a run created by user to manually + // restart a continuous job run. Trigger types.String `tfsdk:"trigger" tf:"optional"` // Additional details about what triggered the run TriggerInfo types.List `tfsdk:"trigger_info" tf:"optional,object"` @@ -10966,6 +11056,11 @@ type RunTask_SdkV2 struct { // retried only until they succeed, and the maximum `attempt_number` is the // same as the `max_retries` value for the job. AttemptNumber types.Int64 `tfsdk:"attempt_number" tf:"optional"` + // The task runs a [clean rooms] notebook when the + // `clean_rooms_notebook_task` field is present. + // + // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The @@ -11139,28 +11234,29 @@ func (newState *RunTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState RunTa // SDK values. func (a RunTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "cluster_instance": reflect.TypeOf(ClusterInstance_SdkV2{}), - "condition_task": reflect.TypeOf(RunConditionTask_SdkV2{}), - "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), - "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), - "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), - "for_each_task": reflect.TypeOf(RunForEachTask_SdkV2{}), - "git_source": reflect.TypeOf(GitSource_SdkV2{}), - "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), - "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), - "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), - "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), - "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), - "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), - "resolved_values": reflect.TypeOf(ResolvedValues_SdkV2{}), - "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), - "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), - "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), - "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), - "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), - "state": reflect.TypeOf(RunState_SdkV2{}), - "status": reflect.TypeOf(RunStatus_SdkV2{}), - "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), + "clean_rooms_notebook_task": reflect.TypeOf(CleanRoomsNotebookTask_SdkV2{}), + "cluster_instance": reflect.TypeOf(ClusterInstance_SdkV2{}), + "condition_task": reflect.TypeOf(RunConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(RunForEachTask_SdkV2{}), + "git_source": reflect.TypeOf(GitSource_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "resolved_values": reflect.TypeOf(ResolvedValues_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "state": reflect.TypeOf(RunState_SdkV2{}), + "status": reflect.TypeOf(RunStatus_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), } } @@ -11171,45 +11267,46 @@ func (o RunTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "attempt_number": o.AttemptNumber, - "cleanup_duration": o.CleanupDuration, - "cluster_instance": o.ClusterInstance, - "condition_task": o.ConditionTask, - "dbt_task": o.DbtTask, - "depends_on": o.DependsOn, - "description": o.Description, - "email_notifications": o.EmailNotifications, - "end_time": o.EndTime, - "environment_key": o.EnvironmentKey, - "execution_duration": o.ExecutionDuration, - "existing_cluster_id": o.ExistingClusterId, - "for_each_task": o.ForEachTask, - "git_source": o.GitSource, - "job_cluster_key": o.JobClusterKey, - "library": o.Libraries, - "new_cluster": o.NewCluster, - "notebook_task": o.NotebookTask, - "notification_settings": o.NotificationSettings, - "pipeline_task": o.PipelineTask, - "python_wheel_task": o.PythonWheelTask, - "queue_duration": o.QueueDuration, - "resolved_values": o.ResolvedValues, - "run_duration": o.RunDuration, - "run_id": o.RunId, - "run_if": o.RunIf, - "run_job_task": o.RunJobTask, - "run_page_url": o.RunPageUrl, - "setup_duration": o.SetupDuration, - "spark_jar_task": o.SparkJarTask, - "spark_python_task": o.SparkPythonTask, - "spark_submit_task": o.SparkSubmitTask, - "sql_task": o.SqlTask, - "start_time": o.StartTime, - "state": o.State, - "status": o.Status, - "task_key": o.TaskKey, - "timeout_seconds": o.TimeoutSeconds, - "webhook_notifications": o.WebhookNotifications, + "attempt_number": o.AttemptNumber, + "clean_rooms_notebook_task": o.CleanRoomsNotebookTask, + "cleanup_duration": o.CleanupDuration, + "cluster_instance": o.ClusterInstance, + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "depends_on": o.DependsOn, + "description": o.Description, + "email_notifications": o.EmailNotifications, + "end_time": o.EndTime, + "environment_key": o.EnvironmentKey, + "execution_duration": o.ExecutionDuration, + "existing_cluster_id": o.ExistingClusterId, + "for_each_task": o.ForEachTask, + "git_source": o.GitSource, + "job_cluster_key": o.JobClusterKey, + "library": o.Libraries, + "new_cluster": o.NewCluster, + "notebook_task": o.NotebookTask, + "notification_settings": o.NotificationSettings, + "pipeline_task": o.PipelineTask, + "python_wheel_task": o.PythonWheelTask, + "queue_duration": o.QueueDuration, + "resolved_values": o.ResolvedValues, + "run_duration": o.RunDuration, + "run_id": o.RunId, + "run_if": o.RunIf, + "run_job_task": o.RunJobTask, + "run_page_url": o.RunPageUrl, + "setup_duration": o.SetupDuration, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + "start_time": o.StartTime, + "state": o.State, + "status": o.Status, + "task_key": o.TaskKey, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, }) } @@ -11217,7 +11314,10 @@ func (o RunTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue func (o RunTask_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attempt_number": types.Int64Type, + "attempt_number": types.Int64Type, + "clean_rooms_notebook_task": basetypes.ListType{ + ElemType: CleanRoomsNotebookTask{}.Type(ctx), + }, "cleanup_duration": types.Int64Type, "cluster_instance": basetypes.ListType{ ElemType: ClusterInstance{}.Type(ctx), @@ -11304,6 +11404,32 @@ func (o RunTask_SdkV2) Type(ctx context.Context) attr.Type { } } +// GetCleanRoomsNotebookTask returns the value of the CleanRoomsNotebookTask field in RunTask_SdkV2 as +// a CleanRoomsNotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *RunTask_SdkV2) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNotebookTask_SdkV2, bool) { + var e CleanRoomsNotebookTask_SdkV2 + if o.CleanRoomsNotebookTask.IsNull() || o.CleanRoomsNotebookTask.IsUnknown() { + return e, false + } + var v []CleanRoomsNotebookTask_SdkV2 + d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in RunTask_SdkV2. +func (o *RunTask_SdkV2) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] + o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) +} + // GetClusterInstance returns the value of the ClusterInstance field in RunTask_SdkV2 as // a ClusterInstance_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -13700,6 +13826,11 @@ func (o SubmitRunResponse_SdkV2) Type(ctx context.Context) attr.Type { } type SubmitTask_SdkV2 struct { + // The task runs a [clean rooms] notebook when the + // `clean_rooms_notebook_task` field is present. + // + // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries @@ -13814,24 +13945,25 @@ func (newState *SubmitTask_SdkV2) SyncEffectiveFieldsDuringRead(existingState Su // SDK values. func (a SubmitTask_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), - "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), - "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), - "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), - "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), - "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), - "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), - "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), - "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), - "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), - "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), - "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), - "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), - "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), - "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), - "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), - "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), - "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), + "clean_rooms_notebook_task": reflect.TypeOf(CleanRoomsNotebookTask_SdkV2{}), + "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(JobEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), } } @@ -13842,30 +13974,31 @@ func (o SubmitTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVal return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ - "condition_task": o.ConditionTask, - "dbt_task": o.DbtTask, - "depends_on": o.DependsOn, - "description": o.Description, - "email_notifications": o.EmailNotifications, - "environment_key": o.EnvironmentKey, - "existing_cluster_id": o.ExistingClusterId, - "for_each_task": o.ForEachTask, - "health": o.Health, - "library": o.Libraries, - "new_cluster": o.NewCluster, - "notebook_task": o.NotebookTask, - "notification_settings": o.NotificationSettings, - "pipeline_task": o.PipelineTask, - "python_wheel_task": o.PythonWheelTask, - "run_if": o.RunIf, - "run_job_task": o.RunJobTask, - "spark_jar_task": o.SparkJarTask, - "spark_python_task": o.SparkPythonTask, - "spark_submit_task": o.SparkSubmitTask, - "sql_task": o.SqlTask, - "task_key": o.TaskKey, - "timeout_seconds": o.TimeoutSeconds, - "webhook_notifications": o.WebhookNotifications, + "clean_rooms_notebook_task": o.CleanRoomsNotebookTask, + "condition_task": o.ConditionTask, + "dbt_task": o.DbtTask, + "depends_on": o.DependsOn, + "description": o.Description, + "email_notifications": o.EmailNotifications, + "environment_key": o.EnvironmentKey, + "existing_cluster_id": o.ExistingClusterId, + "for_each_task": o.ForEachTask, + "health": o.Health, + "library": o.Libraries, + "new_cluster": o.NewCluster, + "notebook_task": o.NotebookTask, + "notification_settings": o.NotificationSettings, + "pipeline_task": o.PipelineTask, + "python_wheel_task": o.PythonWheelTask, + "run_if": o.RunIf, + "run_job_task": o.RunJobTask, + "spark_jar_task": o.SparkJarTask, + "spark_python_task": o.SparkPythonTask, + "spark_submit_task": o.SparkSubmitTask, + "sql_task": o.SqlTask, + "task_key": o.TaskKey, + "timeout_seconds": o.TimeoutSeconds, + "webhook_notifications": o.WebhookNotifications, }) } @@ -13873,6 +14006,9 @@ func (o SubmitTask_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectVal func (o SubmitTask_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "clean_rooms_notebook_task": basetypes.ListType{ + ElemType: CleanRoomsNotebookTask{}.Type(ctx), + }, "condition_task": basetypes.ListType{ ElemType: ConditionTask{}.Type(ctx), }, @@ -13937,6 +14073,32 @@ func (o SubmitTask_SdkV2) Type(ctx context.Context) attr.Type { } } +// GetCleanRoomsNotebookTask returns the value of the CleanRoomsNotebookTask field in SubmitTask_SdkV2 as +// a CleanRoomsNotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *SubmitTask_SdkV2) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNotebookTask_SdkV2, bool) { + var e CleanRoomsNotebookTask_SdkV2 + if o.CleanRoomsNotebookTask.IsNull() || o.CleanRoomsNotebookTask.IsUnknown() { + return e, false + } + var v []CleanRoomsNotebookTask_SdkV2 + d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in SubmitTask_SdkV2. +func (o *SubmitTask_SdkV2) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] + o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) +} + // GetConditionTask returns the value of the ConditionTask field in SubmitTask_SdkV2 as // a ConditionTask_SdkV2 value. // If the field is unknown or null, the boolean return value is false. @@ -14496,6 +14658,11 @@ func (o *TableUpdateTriggerConfiguration_SdkV2) SetTableNames(ctx context.Contex } type Task_SdkV2 struct { + // The task runs a [clean rooms] notebook when the + // `clean_rooms_notebook_task` field is present. + // + // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html + CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries @@ -14633,24 +14800,25 @@ func (newState *Task_SdkV2) SyncEffectiveFieldsDuringRead(existingState Task_Sdk // SDK values. func (a Task_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), - "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), - "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), - "email_notifications": reflect.TypeOf(TaskEmailNotifications_SdkV2{}), - "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), - "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), - "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), - "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), - "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), - "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), - "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), - "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), - "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), - "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), - "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), - "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), - "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), - "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), + "clean_rooms_notebook_task": reflect.TypeOf(CleanRoomsNotebookTask_SdkV2{}), + "condition_task": reflect.TypeOf(ConditionTask_SdkV2{}), + "dbt_task": reflect.TypeOf(DbtTask_SdkV2{}), + "depends_on": reflect.TypeOf(TaskDependency_SdkV2{}), + "email_notifications": reflect.TypeOf(TaskEmailNotifications_SdkV2{}), + "for_each_task": reflect.TypeOf(ForEachTask_SdkV2{}), + "health": reflect.TypeOf(JobsHealthRules_SdkV2{}), + "library": reflect.TypeOf(compute_tf.Library_SdkV2{}), + "new_cluster": reflect.TypeOf(compute_tf.ClusterSpec_SdkV2{}), + "notebook_task": reflect.TypeOf(NotebookTask_SdkV2{}), + "notification_settings": reflect.TypeOf(TaskNotificationSettings_SdkV2{}), + "pipeline_task": reflect.TypeOf(PipelineTask_SdkV2{}), + "python_wheel_task": reflect.TypeOf(PythonWheelTask_SdkV2{}), + "run_job_task": reflect.TypeOf(RunJobTask_SdkV2{}), + "spark_jar_task": reflect.TypeOf(SparkJarTask_SdkV2{}), + "spark_python_task": reflect.TypeOf(SparkPythonTask_SdkV2{}), + "spark_submit_task": reflect.TypeOf(SparkSubmitTask_SdkV2{}), + "sql_task": reflect.TypeOf(SqlTask_SdkV2{}), + "webhook_notifications": reflect.TypeOf(WebhookNotifications_SdkV2{}), } } @@ -14661,6 +14829,7 @@ func (o Task_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, map[string]attr.Value{ + "clean_rooms_notebook_task": o.CleanRoomsNotebookTask, "condition_task": o.ConditionTask, "dbt_task": o.DbtTask, "depends_on": o.DependsOn, @@ -14697,6 +14866,9 @@ func (o Task_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Task_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ + "clean_rooms_notebook_task": basetypes.ListType{ + ElemType: CleanRoomsNotebookTask{}.Type(ctx), + }, "condition_task": basetypes.ListType{ ElemType: ConditionTask{}.Type(ctx), }, @@ -14766,6 +14938,32 @@ func (o Task_SdkV2) Type(ctx context.Context) attr.Type { } } +// GetCleanRoomsNotebookTask returns the value of the CleanRoomsNotebookTask field in Task_SdkV2 as +// a CleanRoomsNotebookTask_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *Task_SdkV2) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNotebookTask_SdkV2, bool) { + var e CleanRoomsNotebookTask_SdkV2 + if o.CleanRoomsNotebookTask.IsNull() || o.CleanRoomsNotebookTask.IsUnknown() { + return e, false + } + var v []CleanRoomsNotebookTask_SdkV2 + d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in Task_SdkV2. +func (o *Task_SdkV2) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] + o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) +} + // GetConditionTask returns the value of the ConditionTask field in Task_SdkV2 as // a ConditionTask_SdkV2 value. // If the field is unknown or null, the boolean return value is false. diff --git a/internal/service/jobs_tf/model.go b/internal/service/jobs_tf/model.go index 454866837..954b2faec 100755 --- a/internal/service/jobs_tf/model.go +++ b/internal/service/jobs_tf/model.go @@ -11060,7 +11060,7 @@ type RunTask struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The time in milliseconds it took to terminate the cluster and clean up // any associated artifacts. The duration of a task run is the sum of the // `setup_duration`, `execution_duration`, and the `cleanup_duration`. The @@ -11314,14 +11314,12 @@ func (o RunTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o RunTask) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "attempt_number": types.Int64Type, - "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), - }, - "cleanup_duration": types.Int64Type, - "cluster_instance": ClusterInstance{}.Type(ctx), - "condition_task": RunConditionTask{}.Type(ctx), - "dbt_task": DbtTask{}.Type(ctx), + "attempt_number": types.Int64Type, + "clean_rooms_notebook_task": CleanRoomsNotebookTask{}.Type(ctx), + "cleanup_duration": types.Int64Type, + "cluster_instance": ClusterInstance{}.Type(ctx), + "condition_task": RunConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, @@ -11373,7 +11371,10 @@ func (o *RunTask) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNote return e, false } var v []CleanRoomsNotebookTask - d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + d := o.CleanRoomsNotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -11385,9 +11386,8 @@ func (o *RunTask) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNote // SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in RunTask. func (o *RunTask) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] - o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CleanRoomsNotebookTask = vs } // GetClusterInstance returns the value of the ClusterInstance field in RunTask as @@ -13830,7 +13830,7 @@ type SubmitTask struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries @@ -14006,15 +14006,9 @@ func (o SubmitTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o SubmitTask) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), - }, - "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), - }, + "clean_rooms_notebook_task": CleanRoomsNotebookTask{}.Type(ctx), + "condition_task": ConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, @@ -14054,7 +14048,10 @@ func (o *SubmitTask) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsN return e, false } var v []CleanRoomsNotebookTask - d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + d := o.CleanRoomsNotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14066,9 +14063,8 @@ func (o *SubmitTask) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsN // SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in SubmitTask. func (o *SubmitTask) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] - o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CleanRoomsNotebookTask = vs } // GetConditionTask returns the value of the ConditionTask field in SubmitTask as @@ -14666,7 +14662,7 @@ type Task struct { // `clean_rooms_notebook_task` field is present. // // [clean rooms]: https://docs.databricks.com/en/clean-rooms/index.html - CleanRoomsNotebookTask types.List `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` + CleanRoomsNotebookTask types.Object `tfsdk:"clean_rooms_notebook_task" tf:"optional,object"` // The task evaluates a condition that can be used to control the execution // of other tasks when the `condition_task` field is present. The condition // task does not require a cluster to execute and does not support retries @@ -14870,15 +14866,9 @@ func (o Task) ToObjectValue(ctx context.Context) basetypes.ObjectValue { func (o Task) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), - }, - "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), - }, - "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), - }, + "clean_rooms_notebook_task": CleanRoomsNotebookTask{}.Type(ctx), + "condition_task": ConditionTask{}.Type(ctx), + "dbt_task": DbtTask{}.Type(ctx), "depends_on": basetypes.ListType{ ElemType: TaskDependency{}.Type(ctx), }, @@ -14923,7 +14913,10 @@ func (o *Task) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNoteboo return e, false } var v []CleanRoomsNotebookTask - d := o.CleanRoomsNotebookTask.ElementsAs(ctx, &v, true) + d := o.CleanRoomsNotebookTask.As(ctx, &v, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + }) if d.HasError() { panic(pluginfwcommon.DiagToString(d)) } @@ -14935,9 +14928,8 @@ func (o *Task) GetCleanRoomsNotebookTask(ctx context.Context) (CleanRoomsNoteboo // SetCleanRoomsNotebookTask sets the value of the CleanRoomsNotebookTask field in Task. func (o *Task) SetCleanRoomsNotebookTask(ctx context.Context, v CleanRoomsNotebookTask) { - vs := []attr.Value{v.ToObjectValue(ctx)} - t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["clean_rooms_notebook_task"] - o.CleanRoomsNotebookTask = types.ListValueMust(t, vs) + vs := v.ToObjectValue(ctx) + o.CleanRoomsNotebookTask = vs } // GetConditionTask returns the value of the ConditionTask field in Task as diff --git a/internal/service/oauth2_tf/legacy_model.go b/internal/service/oauth2_tf/legacy_model.go index 93de2a186..c0ce880c3 100755 --- a/internal/service/oauth2_tf/legacy_model.go +++ b/internal/service/oauth2_tf/legacy_model.go @@ -21,6 +21,83 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) +// Create account federation policy +type CreateAccountFederationPolicyRequest_SdkV2 struct { + Policy types.List `tfsdk:"policy" tf:"optional,object"` + // The identifier for the federation policy. If unspecified, the id will be + // assigned by Databricks. + PolicyId types.String `tfsdk:"-"` +} + +func (newState *CreateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateAccountFederationPolicyRequest_SdkV2) { +} + +func (newState *CreateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateAccountFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateAccountFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateAccountFederationPolicyRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policy": reflect.TypeOf(FederationPolicy_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, CreateAccountFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateAccountFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy": o.Policy, + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy": basetypes.ListType{ + ElemType: FederationPolicy{}.Type(ctx), + }, + "policy_id": types.StringType, + }, + } +} + +// GetPolicy returns the value of the Policy field in CreateAccountFederationPolicyRequest_SdkV2 as +// a FederationPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateAccountFederationPolicyRequest_SdkV2) GetPolicy(ctx context.Context) (FederationPolicy_SdkV2, bool) { + var e FederationPolicy_SdkV2 + if o.Policy.IsNull() || o.Policy.IsUnknown() { + return e, false + } + var v []FederationPolicy_SdkV2 + d := o.Policy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPolicy sets the value of the Policy field in CreateAccountFederationPolicyRequest_SdkV2. +func (o *CreateAccountFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Context, v FederationPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["policy"] + o.Policy = types.ListValueMust(t, vs) +} + type CreateCustomAppIntegration_SdkV2 struct { // This field indicates whether an OAuth client secret is required to // authenticate this client. @@ -339,6 +416,87 @@ func (o CreatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) att } } +// Create service principal federation policy +type CreateServicePrincipalFederationPolicyRequest_SdkV2 struct { + Policy types.List `tfsdk:"policy" tf:"optional,object"` + // The identifier for the federation policy. If unspecified, the id will be + // assigned by Databricks. + PolicyId types.String `tfsdk:"-"` + // The service principal id for the federation policy. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *CreateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan CreateServicePrincipalFederationPolicyRequest_SdkV2) { +} + +func (newState *CreateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState CreateServicePrincipalFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in CreateServicePrincipalFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a CreateServicePrincipalFederationPolicyRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policy": reflect.TypeOf(FederationPolicy_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, CreateServicePrincipalFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o CreateServicePrincipalFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy": o.Policy, + "policy_id": o.PolicyId, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o CreateServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy": basetypes.ListType{ + ElemType: FederationPolicy{}.Type(ctx), + }, + "policy_id": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + +// GetPolicy returns the value of the Policy field in CreateServicePrincipalFederationPolicyRequest_SdkV2 as +// a FederationPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *CreateServicePrincipalFederationPolicyRequest_SdkV2) GetPolicy(ctx context.Context) (FederationPolicy_SdkV2, bool) { + var e FederationPolicy_SdkV2 + if o.Policy.IsNull() || o.Policy.IsUnknown() { + return e, false + } + var v []FederationPolicy_SdkV2 + d := o.Policy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPolicy sets the value of the Policy field in CreateServicePrincipalFederationPolicyRequest_SdkV2. +func (o *CreateServicePrincipalFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Context, v FederationPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["policy"] + o.Policy = types.ListValueMust(t, vs) +} + // Create service principal secret type CreateServicePrincipalSecretRequest_SdkV2 struct { // The service principal ID. @@ -490,6 +648,48 @@ func (o DataPlaneInfo_SdkV2) Type(ctx context.Context) attr.Type { } } +// Delete account federation policy +type DeleteAccountFederationPolicyRequest_SdkV2 struct { + PolicyId types.String `tfsdk:"-"` +} + +func (newState *DeleteAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteAccountFederationPolicyRequest_SdkV2) { +} + +func (newState *DeleteAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteAccountFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteAccountFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteAccountFederationPolicyRequest_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, DeleteAccountFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + }, + } +} + type DeleteCustomAppIntegrationOutput_SdkV2 struct { } @@ -682,6 +882,52 @@ func (o DeleteResponse_SdkV2) Type(ctx context.Context) attr.Type { } } +// Delete service principal federation policy +type DeleteServicePrincipalFederationPolicyRequest_SdkV2 struct { + PolicyId types.String `tfsdk:"-"` + // The service principal id for the federation policy. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *DeleteServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan DeleteServicePrincipalFederationPolicyRequest_SdkV2) { +} + +func (newState *DeleteServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState DeleteServicePrincipalFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in DeleteServicePrincipalFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a DeleteServicePrincipalFederationPolicyRequest_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, DeleteServicePrincipalFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o DeleteServicePrincipalFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o DeleteServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + // Delete service principal secret type DeleteServicePrincipalSecretRequest_SdkV2 struct { // The secret ID. @@ -729,6 +975,143 @@ func (o DeleteServicePrincipalSecretRequest_SdkV2) Type(ctx context.Context) att } } +type FederationPolicy_SdkV2 struct { + // Creation time of the federation policy. + CreateTime types.String `tfsdk:"create_time" tf:"computed"` + // Description of the federation policy. + Description types.String `tfsdk:"description" tf:"optional"` + // Name of the federation policy. The name must contain only lowercase + // alphanumeric characters, numbers, and hyphens. It must be unique within + // the account. + Name types.String `tfsdk:"name" tf:"optional"` + // Specifies the policy to use for validating OIDC claims in your federated + // tokens. + OidcPolicy types.List `tfsdk:"oidc_policy" tf:"optional,object"` + // Unique, immutable id of the federation policy. + Uid types.String `tfsdk:"uid" tf:"computed"` + // Last update time of the federation policy. + UpdateTime types.String `tfsdk:"update_time" tf:"computed"` +} + +func (newState *FederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan FederationPolicy_SdkV2) { +} + +func (newState *FederationPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState FederationPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in FederationPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a FederationPolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "oidc_policy": reflect.TypeOf(OidcFederationPolicy_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, FederationPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o FederationPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "create_time": o.CreateTime, + "description": o.Description, + "name": o.Name, + "oidc_policy": o.OidcPolicy, + "uid": o.Uid, + "update_time": o.UpdateTime, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o FederationPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "create_time": types.StringType, + "description": types.StringType, + "name": types.StringType, + "oidc_policy": basetypes.ListType{ + ElemType: OidcFederationPolicy{}.Type(ctx), + }, + "uid": types.StringType, + "update_time": types.StringType, + }, + } +} + +// GetOidcPolicy returns the value of the OidcPolicy field in FederationPolicy_SdkV2 as +// a OidcFederationPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *FederationPolicy_SdkV2) GetOidcPolicy(ctx context.Context) (OidcFederationPolicy_SdkV2, bool) { + var e OidcFederationPolicy_SdkV2 + if o.OidcPolicy.IsNull() || o.OidcPolicy.IsUnknown() { + return e, false + } + var v []OidcFederationPolicy_SdkV2 + d := o.OidcPolicy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetOidcPolicy sets the value of the OidcPolicy field in FederationPolicy_SdkV2. +func (o *FederationPolicy_SdkV2) SetOidcPolicy(ctx context.Context, v OidcFederationPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["oidc_policy"] + o.OidcPolicy = types.ListValueMust(t, vs) +} + +// Get account federation policy +type GetAccountFederationPolicyRequest_SdkV2 struct { + PolicyId types.String `tfsdk:"-"` +} + +func (newState *GetAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetAccountFederationPolicyRequest_SdkV2) { +} + +func (newState *GetAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetAccountFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetAccountFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a GetAccountFederationPolicyRequest_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, GetAccountFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetAccountFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + }, + } +} + type GetCustomAppIntegrationOutput_SdkV2 struct { // The client id of the custom OAuth app ClientId types.String `tfsdk:"client_id" tf:"optional"` @@ -1302,34 +1685,126 @@ func (o *GetPublishedAppsOutput_SdkV2) SetApps(ctx context.Context, v []Publishe o.Apps = types.ListValueMust(t, vs) } -// Get custom oauth app integrations -type ListCustomAppIntegrationsRequest_SdkV2 struct { - IncludeCreatorUsername types.Bool `tfsdk:"-"` - - PageSize types.Int64 `tfsdk:"-"` - - PageToken types.String `tfsdk:"-"` +// Get service principal federation policy +type GetServicePrincipalFederationPolicyRequest_SdkV2 struct { + PolicyId types.String `tfsdk:"-"` + // The service principal id for the federation policy. + ServicePrincipalId types.Int64 `tfsdk:"-"` } -func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCustomAppIntegrationsRequest_SdkV2) { +func (newState *GetServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan GetServicePrincipalFederationPolicyRequest_SdkV2) { } -func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCustomAppIntegrationsRequest_SdkV2) { +func (newState *GetServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState GetServicePrincipalFederationPolicyRequest_SdkV2) { } -// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCustomAppIntegrationsRequest. +// GetComplexFieldTypes returns a map of the types of elements in complex fields in GetServicePrincipalFederationPolicyRequest. // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must be either primitive values from the // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. -func (a ListCustomAppIntegrationsRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { +func (a GetServicePrincipalFederationPolicyRequest_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, ListCustomAppIntegrationsRequest_SdkV2 +// interfere with how the plugin framework retrieves and sets values in state. Thus, GetServicePrincipalFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o GetServicePrincipalFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy_id": o.PolicyId, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o GetServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_id": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + +// List account federation policies +type ListAccountFederationPoliciesRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListAccountFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListAccountFederationPoliciesRequest_SdkV2) { +} + +func (newState *ListAccountFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListAccountFederationPoliciesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListAccountFederationPoliciesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListAccountFederationPoliciesRequest_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, ListAccountFederationPoliciesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListAccountFederationPoliciesRequest_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 ListAccountFederationPoliciesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + }, + } +} + +// Get custom oauth app integrations +type ListCustomAppIntegrationsRequest_SdkV2 struct { + IncludeCreatorUsername types.Bool `tfsdk:"-"` + + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` +} + +func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListCustomAppIntegrationsRequest_SdkV2) { +} + +func (newState *ListCustomAppIntegrationsRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListCustomAppIntegrationsRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListCustomAppIntegrationsRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListCustomAppIntegrationsRequest_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, ListCustomAppIntegrationsRequest_SdkV2 // only implements ToObjectValue() and Type(). func (o ListCustomAppIntegrationsRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { return types.ObjectValueMust( @@ -1352,6 +1827,81 @@ func (o ListCustomAppIntegrationsRequest_SdkV2) Type(ctx context.Context) attr.T } } +type ListFederationPoliciesResponse_SdkV2 struct { + NextPageToken types.String `tfsdk:"next_page_token" tf:"optional"` + + Policies types.List `tfsdk:"policies" tf:"optional"` +} + +func (newState *ListFederationPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListFederationPoliciesResponse_SdkV2) { +} + +func (newState *ListFederationPoliciesResponse_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListFederationPoliciesResponse_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListFederationPoliciesResponse. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListFederationPoliciesResponse_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policies": reflect.TypeOf(FederationPolicy_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, ListFederationPoliciesResponse_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListFederationPoliciesResponse_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "policies": o.Policies, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListFederationPoliciesResponse_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "next_page_token": types.StringType, + "policies": basetypes.ListType{ + ElemType: FederationPolicy{}.Type(ctx), + }, + }, + } +} + +// GetPolicies returns the value of the Policies field in ListFederationPoliciesResponse_SdkV2 as +// a slice of FederationPolicy_SdkV2 values. +// If the field is unknown or null, the boolean return value is false. +func (o *ListFederationPoliciesResponse_SdkV2) GetPolicies(ctx context.Context) ([]FederationPolicy_SdkV2, bool) { + if o.Policies.IsNull() || o.Policies.IsUnknown() { + return nil, false + } + var v []FederationPolicy_SdkV2 + d := o.Policies.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetPolicies sets the value of the Policies field in ListFederationPoliciesResponse_SdkV2. +func (o *ListFederationPoliciesResponse_SdkV2) SetPolicies(ctx context.Context, v []FederationPolicy_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["policies"] + t = t.(attr.TypeWithElementType).ElementType() + o.Policies = types.ListValueMust(t, vs) +} + // Get all the published OAuth apps type ListOAuthPublishedAppsRequest_SdkV2 struct { // The max number of OAuth published apps to return in one page. @@ -1445,6 +1995,56 @@ func (o ListPublishedAppIntegrationsRequest_SdkV2) Type(ctx context.Context) att } } +// List service principal federation policies +type ListServicePrincipalFederationPoliciesRequest_SdkV2 struct { + PageSize types.Int64 `tfsdk:"-"` + + PageToken types.String `tfsdk:"-"` + // The service principal id for the federation policy. + ServicePrincipalId types.Int64 `tfsdk:"-"` +} + +func (newState *ListServicePrincipalFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan ListServicePrincipalFederationPoliciesRequest_SdkV2) { +} + +func (newState *ListServicePrincipalFederationPoliciesRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState ListServicePrincipalFederationPoliciesRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in ListServicePrincipalFederationPoliciesRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a ListServicePrincipalFederationPoliciesRequest_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, ListServicePrincipalFederationPoliciesRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalFederationPoliciesRequest_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, + "service_principal_id": o.ServicePrincipalId, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o ListServicePrincipalFederationPoliciesRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "page_size": types.Int64Type, + "page_token": types.StringType, + "service_principal_id": types.Int64Type, + }, + } +} + // List service principal secrets type ListServicePrincipalSecretsRequest_SdkV2 struct { // An opaque page token which was the `next_page_token` in the response of @@ -1576,6 +2176,109 @@ func (o *ListServicePrincipalSecretsResponse_SdkV2) SetSecrets(ctx context.Conte o.Secrets = types.ListValueMust(t, vs) } +// Specifies the policy to use for validating OIDC claims in your federated +// tokens. +type OidcFederationPolicy_SdkV2 struct { + // The allowed token audiences, as specified in the 'aud' claim of federated + // tokens. The audience identifier is intended to represent the recipient of + // the token. Can be any non-empty string value. As long as the audience in + // the token matches at least one audience in the policy, the token is + // considered a match. If audiences is unspecified, defaults to your + // Databricks account id. + Audiences types.List `tfsdk:"audiences" tf:"optional"` + // The required token issuer, as specified in the 'iss' claim of federated + // tokens. + Issuer types.String `tfsdk:"issuer" tf:"optional"` + // The public keys used to validate the signature of federated tokens, in + // JWKS format. If unspecified (recommended), Databricks automatically + // fetches the public keys from your issuer’s well known endpoint. + // Databricks strongly recommends relying on your issuer’s well known + // endpoint for discovering public keys. + JwksJson types.String `tfsdk:"jwks_json" tf:"optional"` + // The required token subject, as specified in the subject claim of + // federated tokens. Must be specified for service principal federation + // policies. Must not be specified for account federation policies. + Subject types.String `tfsdk:"subject" tf:"optional"` + // The claim that contains the subject of the token. If unspecified, the + // default value is 'sub'. + SubjectClaim types.String `tfsdk:"subject_claim" tf:"optional"` +} + +func (newState *OidcFederationPolicy_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan OidcFederationPolicy_SdkV2) { +} + +func (newState *OidcFederationPolicy_SdkV2) SyncEffectiveFieldsDuringRead(existingState OidcFederationPolicy_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in OidcFederationPolicy. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a OidcFederationPolicy_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "audiences": 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, OidcFederationPolicy_SdkV2 +// only implements ToObjectValue() and Type(). +func (o OidcFederationPolicy_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "audiences": o.Audiences, + "issuer": o.Issuer, + "jwks_json": o.JwksJson, + "subject": o.Subject, + "subject_claim": o.SubjectClaim, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o OidcFederationPolicy_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "audiences": basetypes.ListType{ + ElemType: types.StringType, + }, + "issuer": types.StringType, + "jwks_json": types.StringType, + "subject": types.StringType, + "subject_claim": types.StringType, + }, + } +} + +// GetAudiences returns the value of the Audiences field in OidcFederationPolicy_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *OidcFederationPolicy_SdkV2) GetAudiences(ctx context.Context) ([]types.String, bool) { + if o.Audiences.IsNull() || o.Audiences.IsUnknown() { + return nil, false + } + var v []types.String + d := o.Audiences.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetAudiences sets the value of the Audiences field in OidcFederationPolicy_SdkV2. +func (o *OidcFederationPolicy_SdkV2) SetAudiences(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["audiences"] + t = t.(attr.TypeWithElementType).ElementType() + o.Audiences = types.ListValueMust(t, vs) +} + type PublishedAppOutput_SdkV2 struct { // Unique ID of the published OAuth app. AppId types.String `tfsdk:"app_id" tf:"optional"` @@ -1807,6 +2510,89 @@ func (o TokenAccessPolicy_SdkV2) Type(ctx context.Context) attr.Type { } } +// Update account federation policy +type UpdateAccountFederationPolicyRequest_SdkV2 struct { + Policy types.List `tfsdk:"policy" tf:"optional,object"` + + PolicyId types.String `tfsdk:"-"` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + UpdateMask types.String `tfsdk:"-"` +} + +func (newState *UpdateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateAccountFederationPolicyRequest_SdkV2) { +} + +func (newState *UpdateAccountFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateAccountFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateAccountFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateAccountFederationPolicyRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policy": reflect.TypeOf(FederationPolicy_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, UpdateAccountFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateAccountFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy": o.Policy, + "policy_id": o.PolicyId, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy": basetypes.ListType{ + ElemType: FederationPolicy{}.Type(ctx), + }, + "policy_id": types.StringType, + "update_mask": types.StringType, + }, + } +} + +// GetPolicy returns the value of the Policy field in UpdateAccountFederationPolicyRequest_SdkV2 as +// a FederationPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateAccountFederationPolicyRequest_SdkV2) GetPolicy(ctx context.Context) (FederationPolicy_SdkV2, bool) { + var e FederationPolicy_SdkV2 + if o.Policy.IsNull() || o.Policy.IsUnknown() { + return e, false + } + var v []FederationPolicy_SdkV2 + d := o.Policy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPolicy sets the value of the Policy field in UpdateAccountFederationPolicyRequest_SdkV2. +func (o *UpdateAccountFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Context, v FederationPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["policy"] + o.Policy = types.ListValueMust(t, vs) +} + type UpdateCustomAppIntegration_SdkV2 struct { IntegrationId types.String `tfsdk:"-"` // List of OAuth redirect urls to be updated in the custom OAuth app @@ -2062,3 +2848,90 @@ func (o UpdatePublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) att AttrTypes: map[string]attr.Type{}, } } + +// Update service principal federation policy +type UpdateServicePrincipalFederationPolicyRequest_SdkV2 struct { + Policy types.List `tfsdk:"policy" tf:"optional,object"` + + PolicyId types.String `tfsdk:"-"` + // The service principal id for the federation policy. + ServicePrincipalId types.Int64 `tfsdk:"-"` + // Field mask is required to be passed into the PATCH request. Field mask + // specifies which fields of the setting payload will be updated. The field + // mask needs to be supplied as single string. To specify multiple fields in + // the field mask, use comma as the separator (no space). + UpdateMask types.String `tfsdk:"-"` +} + +func (newState *UpdateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringCreateOrUpdate(plan UpdateServicePrincipalFederationPolicyRequest_SdkV2) { +} + +func (newState *UpdateServicePrincipalFederationPolicyRequest_SdkV2) SyncEffectiveFieldsDuringRead(existingState UpdateServicePrincipalFederationPolicyRequest_SdkV2) { +} + +// GetComplexFieldTypes returns a map of the types of elements in complex fields in UpdateServicePrincipalFederationPolicyRequest. +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must be either primitive values from the +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a UpdateServicePrincipalFederationPolicyRequest_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "policy": reflect.TypeOf(FederationPolicy_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, UpdateServicePrincipalFederationPolicyRequest_SdkV2 +// only implements ToObjectValue() and Type(). +func (o UpdateServicePrincipalFederationPolicyRequest_SdkV2) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "policy": o.Policy, + "policy_id": o.PolicyId, + "service_principal_id": o.ServicePrincipalId, + "update_mask": o.UpdateMask, + }) +} + +// Type implements basetypes.ObjectValuable. +func (o UpdateServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy": basetypes.ListType{ + ElemType: FederationPolicy{}.Type(ctx), + }, + "policy_id": types.StringType, + "service_principal_id": types.Int64Type, + "update_mask": types.StringType, + }, + } +} + +// GetPolicy returns the value of the Policy field in UpdateServicePrincipalFederationPolicyRequest_SdkV2 as +// a FederationPolicy_SdkV2 value. +// If the field is unknown or null, the boolean return value is false. +func (o *UpdateServicePrincipalFederationPolicyRequest_SdkV2) GetPolicy(ctx context.Context) (FederationPolicy_SdkV2, bool) { + var e FederationPolicy_SdkV2 + if o.Policy.IsNull() || o.Policy.IsUnknown() { + return e, false + } + var v []FederationPolicy_SdkV2 + d := o.Policy.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + if len(v) == 0 { + return e, false + } + return v[0], true +} + +// SetPolicy sets the value of the Policy field in UpdateServicePrincipalFederationPolicyRequest_SdkV2. +func (o *UpdateServicePrincipalFederationPolicyRequest_SdkV2) SetPolicy(ctx context.Context, v FederationPolicy_SdkV2) { + vs := []attr.Value{v.ToObjectValue(ctx)} + t := o.Type(ctx).(basetypes.ObjectType).AttrTypes["policy"] + o.Policy = types.ListValueMust(t, vs) +} diff --git a/internal/service/pipelines_tf/legacy_model.go b/internal/service/pipelines_tf/legacy_model.go index f05c51af9..308b91f35 100755 --- a/internal/service/pipelines_tf/legacy_model.go +++ b/internal/service/pipelines_tf/legacy_model.go @@ -5014,7 +5014,7 @@ type RestartWindow_SdkV2 struct { // Days of week in which the restart is allowed to happen (within a // five-hour window starting at start_hour). If not specified all days of // the week will be used. - DaysOfWeek types.String `tfsdk:"days_of_week" tf:"optional"` + DaysOfWeek types.List `tfsdk:"days_of_week" tf:"optional"` // An integer between 0 and 23 denoting the start hour for the restart // window in the 24-hour day. Continuous pipeline restart is triggered only // within a five-hour window starting at this hour. @@ -5039,7 +5039,9 @@ func (newState *RestartWindow_SdkV2) SyncEffectiveFieldsDuringRead(existingState // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a RestartWindow_SdkV2) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} + return map[string]reflect.Type{ + "days_of_week": reflect.TypeOf(types.String{}), + } } // TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise @@ -5059,13 +5061,41 @@ func (o RestartWindow_SdkV2) ToObjectValue(ctx context.Context) basetypes.Object func (o RestartWindow_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ - "days_of_week": types.StringType, + "days_of_week": basetypes.ListType{ + ElemType: types.StringType, + }, "start_hour": types.Int64Type, "time_zone_id": types.StringType, }, } } +// GetDaysOfWeek returns the value of the DaysOfWeek field in RestartWindow_SdkV2 as +// a slice of types.String values. +// If the field is unknown or null, the boolean return value is false. +func (o *RestartWindow_SdkV2) GetDaysOfWeek(ctx context.Context) ([]types.String, bool) { + if o.DaysOfWeek.IsNull() || o.DaysOfWeek.IsUnknown() { + return nil, false + } + var v []types.String + d := o.DaysOfWeek.ElementsAs(ctx, &v, true) + if d.HasError() { + panic(pluginfwcommon.DiagToString(d)) + } + return v, true +} + +// SetDaysOfWeek sets the value of the DaysOfWeek field in RestartWindow_SdkV2. +func (o *RestartWindow_SdkV2) SetDaysOfWeek(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["days_of_week"] + t = t.(attr.TypeWithElementType).ElementType() + o.DaysOfWeek = types.ListValueMust(t, vs) +} + type SchemaSpec_SdkV2 struct { // Required. Destination catalog to store tables. DestinationCatalog types.String `tfsdk:"destination_catalog" tf:"optional"` From 2c088af040fefde089279333a826109909e02bcf Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 13:31:59 +0100 Subject: [PATCH 3/7] address comment --- internal/providers/pluginfw/products/sharing/resource_share.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/providers/pluginfw/products/sharing/resource_share.go b/internal/providers/pluginfw/products/sharing/resource_share.go index c316f85e2..ca0ac7ada 100644 --- a/internal/providers/pluginfw/products/sharing/resource_share.go +++ b/internal/providers/pluginfw/products/sharing/resource_share.go @@ -155,6 +155,8 @@ func (r *ShareResource) Schema(ctx context.Context, req resource.SchemaRequest, c.SetRequired("object", "data_object_type") c.SetRequired("object", "partition", "value", "op") c.SetRequired("object", "partition", "value", "name") + + c.SetOptional("owner") return c }) resp.Schema = schema.Schema{ From 01231d8ce0064a3f2ce2001cc4caa8d893800d31 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 13:40:02 +0100 Subject: [PATCH 4/7] use sdkv2 for existing resources --- internal/providers/pluginfw/products/catalog/data_functions.go | 2 +- internal/providers/pluginfw/products/cluster/data_cluster.go | 2 +- .../products/registered_model/data_registered_model_versions.go | 2 +- .../pluginfw/products/serving/data_serving_endpoints.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/providers/pluginfw/products/catalog/data_functions.go b/internal/providers/pluginfw/products/catalog/data_functions.go index 5c0ca3bea..a252f97a5 100644 --- a/internal/providers/pluginfw/products/catalog/data_functions.go +++ b/internal/providers/pluginfw/products/catalog/data_functions.go @@ -40,7 +40,7 @@ type FunctionsData struct { func (FunctionsData) GetComplexFieldTypes(context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "functions": reflect.TypeOf(catalog_tf.FunctionInfo{}), + "functions": reflect.TypeOf(catalog_tf.FunctionInfo_SdkV2{}), } } diff --git a/internal/providers/pluginfw/products/cluster/data_cluster.go b/internal/providers/pluginfw/products/cluster/data_cluster.go index ffcf6a70d..c9a904a44 100644 --- a/internal/providers/pluginfw/products/cluster/data_cluster.go +++ b/internal/providers/pluginfw/products/cluster/data_cluster.go @@ -41,7 +41,7 @@ type ClusterInfo struct { func (ClusterInfo) GetComplexFieldTypes(context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "cluster_info": reflect.TypeOf(compute_tf.ClusterDetails{}), + "cluster_info": reflect.TypeOf(compute_tf.ClusterDetails_SdkV2{}), } } diff --git a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go index 5e3ab0c55..6cf39179c 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go @@ -33,7 +33,7 @@ type RegisteredModelVersionsData struct { func (RegisteredModelVersionsData) GetComplexFieldTypes(context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "model_versions": reflect.TypeOf(catalog_tf.ModelVersionInfo{}), + "model_versions": reflect.TypeOf(catalog_tf.ModelVersionInfo_SdkV2{}), } } diff --git a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go index 51c5e2c64..d1eaab1a0 100644 --- a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go +++ b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go @@ -32,7 +32,7 @@ type ServingEndpointsData struct { func (ServingEndpointsData) GetComplexFieldTypes(context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "endpoints": reflect.TypeOf(serving_tf.ServingEndpoint{}), + "endpoints": reflect.TypeOf(serving_tf.ServingEndpoint_SdkV2{}), } } From c48fe48c7037770d1013be169bc16eeca4649619 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 16:49:18 +0100 Subject: [PATCH 5/7] fix --- .../pluginfw/products/cluster/data_cluster.go | 2 +- internal/service/apps_tf/legacy_model.go | 40 +- internal/service/billing_tf/legacy_model.go | 42 +- internal/service/catalog_tf/legacy_model.go | 302 ++++++------- .../service/cleanrooms_tf/legacy_model.go | 58 +-- internal/service/compute_tf/legacy_model.go | 284 ++++++------- .../service/dashboards_tf/legacy_model.go | 44 +- internal/service/files_tf/legacy_model.go | 4 +- internal/service/iam_tf/legacy_model.go | 64 +-- internal/service/jobs_tf/legacy_model.go | 398 +++++++++--------- .../service/marketplace_tf/legacy_model.go | 132 +++--- internal/service/ml_tf/legacy_model.go | 132 +++--- internal/service/oauth2_tf/legacy_model.go | 32 +- internal/service/pipelines_tf/legacy_model.go | 130 +++--- .../service/provisioning_tf/legacy_model.go | 54 +-- internal/service/serving_tf/legacy_model.go | 152 +++---- internal/service/settings_tf/legacy_model.go | 134 +++--- internal/service/sharing_tf/legacy_model.go | 42 +- internal/service/sql_tf/legacy_model.go | 206 ++++----- .../service/vectorsearch_tf/legacy_model.go | 52 +-- internal/service/workspace_tf/legacy_model.go | 42 +- 21 files changed, 1173 insertions(+), 1173 deletions(-) diff --git a/internal/providers/pluginfw/products/cluster/data_cluster.go b/internal/providers/pluginfw/products/cluster/data_cluster.go index c9a904a44..f85063794 100644 --- a/internal/providers/pluginfw/products/cluster/data_cluster.go +++ b/internal/providers/pluginfw/products/cluster/data_cluster.go @@ -85,7 +85,7 @@ func (d *ClusterDataSource) Read(ctx context.Context, req datasource.ReadRequest return } - var tfCluster compute_tf.ClusterDetails + var tfCluster compute_tf.ClusterDetails_SdkV2 resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, cluster, &tfCluster)...) if resp.Diagnostics.HasError() { return diff --git a/internal/service/apps_tf/legacy_model.go b/internal/service/apps_tf/legacy_model.go index 33bb86961..7b956959f 100755 --- a/internal/service/apps_tf/legacy_model.go +++ b/internal/service/apps_tf/legacy_model.go @@ -115,13 +115,13 @@ func (o App_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "active_deployment": basetypes.ListType{ - ElemType: AppDeployment{}.Type(ctx), + ElemType: AppDeployment_SdkV2{}.Type(ctx), }, "app_status": basetypes.ListType{ - ElemType: ApplicationStatus{}.Type(ctx), + ElemType: ApplicationStatus_SdkV2{}.Type(ctx), }, "compute_status": basetypes.ListType{ - ElemType: ComputeStatus{}.Type(ctx), + ElemType: ComputeStatus_SdkV2{}.Type(ctx), }, "create_time": types.StringType, "creator": types.StringType, @@ -129,10 +129,10 @@ func (o App_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "name": types.StringType, "pending_deployment": basetypes.ListType{ - ElemType: AppDeployment{}.Type(ctx), + ElemType: AppDeployment_SdkV2{}.Type(ctx), }, "resources": basetypes.ListType{ - ElemType: AppResource{}.Type(ctx), + ElemType: AppResource_SdkV2{}.Type(ctx), }, "service_principal_client_id": types.StringType, "service_principal_id": types.Int64Type, @@ -380,7 +380,7 @@ func (o AppAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: AppPermission{}.Type(ctx), + ElemType: AppPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -486,13 +486,13 @@ func (o AppDeployment_SdkV2) Type(ctx context.Context) attr.Type { "create_time": types.StringType, "creator": types.StringType, "deployment_artifacts": basetypes.ListType{ - ElemType: AppDeploymentArtifacts{}.Type(ctx), + ElemType: AppDeploymentArtifacts_SdkV2{}.Type(ctx), }, "deployment_id": types.StringType, "mode": types.StringType, "source_code_path": types.StringType, "status": basetypes.ListType{ - ElemType: AppDeploymentStatus{}.Type(ctx), + ElemType: AppDeploymentStatus_SdkV2{}.Type(ctx), }, "update_time": types.StringType, }, @@ -764,7 +764,7 @@ func (o AppPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AppAccessControlResponse{}.Type(ctx), + ElemType: AppAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -885,7 +885,7 @@ func (o AppPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AppAccessControlRequest{}.Type(ctx), + ElemType: AppAccessControlRequest_SdkV2{}.Type(ctx), }, "app_name": types.StringType, }, @@ -977,17 +977,17 @@ func (o AppResource_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "description": types.StringType, "job": basetypes.ListType{ - ElemType: AppResourceJob{}.Type(ctx), + ElemType: AppResourceJob_SdkV2{}.Type(ctx), }, "name": types.StringType, "secret": basetypes.ListType{ - ElemType: AppResourceSecret{}.Type(ctx), + ElemType: AppResourceSecret_SdkV2{}.Type(ctx), }, "serving_endpoint": basetypes.ListType{ - ElemType: AppResourceServingEndpoint{}.Type(ctx), + ElemType: AppResourceServingEndpoint_SdkV2{}.Type(ctx), }, "sql_warehouse": basetypes.ListType{ - ElemType: AppResourceSqlWarehouse{}.Type(ctx), + ElemType: AppResourceSqlWarehouse_SdkV2{}.Type(ctx), }, }, } @@ -1424,7 +1424,7 @@ func (o CreateAppDeploymentRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "app_deployment": basetypes.ListType{ - ElemType: AppDeployment{}.Type(ctx), + ElemType: AppDeployment_SdkV2{}.Type(ctx), }, "app_name": types.StringType, }, @@ -1497,7 +1497,7 @@ func (o CreateAppRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "app": basetypes.ListType{ - ElemType: App{}.Type(ctx), + ElemType: App_SdkV2{}.Type(ctx), }, }, } @@ -1702,7 +1702,7 @@ func (o GetAppPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: AppPermissionsDescription{}.Type(ctx), + ElemType: AppPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -1915,7 +1915,7 @@ func (o ListAppDeploymentsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "app_deployments": basetypes.ListType{ - ElemType: AppDeployment{}.Type(ctx), + ElemType: AppDeployment_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -2038,7 +2038,7 @@ func (o ListAppsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apps": basetypes.ListType{ - ElemType: App{}.Type(ctx), + ElemType: App_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -2199,7 +2199,7 @@ func (o UpdateAppRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "app": basetypes.ListType{ - ElemType: App{}.Type(ctx), + ElemType: App_SdkV2{}.Type(ctx), }, "name": types.StringType, }, diff --git a/internal/service/billing_tf/legacy_model.go b/internal/service/billing_tf/legacy_model.go index 1a60e0a09..ab728eed7 100755 --- a/internal/service/billing_tf/legacy_model.go +++ b/internal/service/billing_tf/legacy_model.go @@ -130,7 +130,7 @@ func (o AlertConfiguration_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "action_configurations": basetypes.ListType{ - ElemType: ActionConfiguration{}.Type(ctx), + ElemType: ActionConfiguration_SdkV2{}.Type(ctx), }, "alert_configuration_id": types.StringType, "quantity_threshold": types.StringType, @@ -231,13 +231,13 @@ func (o BudgetConfiguration_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "account_id": types.StringType, "alert_configurations": basetypes.ListType{ - ElemType: AlertConfiguration{}.Type(ctx), + ElemType: AlertConfiguration_SdkV2{}.Type(ctx), }, "budget_configuration_id": types.StringType, "create_time": types.Int64Type, "display_name": types.StringType, "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), + ElemType: BudgetConfigurationFilter_SdkV2{}.Type(ctx), }, "update_time": types.Int64Type, }, @@ -342,10 +342,10 @@ func (o BudgetConfigurationFilter_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "tags": basetypes.ListType{ - ElemType: BudgetConfigurationFilterTagClause{}.Type(ctx), + ElemType: BudgetConfigurationFilterTagClause_SdkV2{}.Type(ctx), }, "workspace_id": basetypes.ListType{ - ElemType: BudgetConfigurationFilterWorkspaceIdClause{}.Type(ctx), + ElemType: BudgetConfigurationFilterWorkspaceIdClause_SdkV2{}.Type(ctx), }, }, } @@ -521,7 +521,7 @@ func (o BudgetConfigurationFilterTagClause_SdkV2) Type(ctx context.Context) attr AttrTypes: map[string]attr.Type{ "key": types.StringType, "value": basetypes.ListType{ - ElemType: BudgetConfigurationFilterClause{}.Type(ctx), + ElemType: BudgetConfigurationFilterClause_SdkV2{}.Type(ctx), }, }, } @@ -774,11 +774,11 @@ func (o CreateBudgetConfigurationBudget_SdkV2) Type(ctx context.Context) attr.Ty AttrTypes: map[string]attr.Type{ "account_id": types.StringType, "alert_configurations": basetypes.ListType{ - ElemType: CreateBudgetConfigurationBudgetAlertConfigurations{}.Type(ctx), + ElemType: CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), + ElemType: BudgetConfigurationFilter_SdkV2{}.Type(ctx), }, }, } @@ -938,7 +938,7 @@ func (o CreateBudgetConfigurationBudgetAlertConfigurations_SdkV2) Type(ctx conte return types.ObjectType{ AttrTypes: map[string]attr.Type{ "action_configurations": basetypes.ListType{ - ElemType: CreateBudgetConfigurationBudgetActionConfigurations{}.Type(ctx), + ElemType: CreateBudgetConfigurationBudgetActionConfigurations_SdkV2{}.Type(ctx), }, "quantity_threshold": types.StringType, "quantity_type": types.StringType, @@ -1014,7 +1014,7 @@ func (o CreateBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budget": basetypes.ListType{ - ElemType: CreateBudgetConfigurationBudget{}.Type(ctx), + ElemType: CreateBudgetConfigurationBudget_SdkV2{}.Type(ctx), }, }, } @@ -1086,7 +1086,7 @@ func (o CreateBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), + ElemType: BudgetConfiguration_SdkV2{}.Type(ctx), }, }, } @@ -1626,7 +1626,7 @@ func (o GetBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), + ElemType: BudgetConfiguration_SdkV2{}.Type(ctx), }, }, } @@ -1789,7 +1789,7 @@ func (o ListBudgetConfigurationsResponse_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budgets": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), + ElemType: BudgetConfiguration_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -2013,7 +2013,7 @@ func (o LogDeliveryConfiguration_SdkV2) Type(ctx context.Context) attr.Type { "delivery_path_prefix": types.StringType, "delivery_start_time": types.StringType, "log_delivery_status": basetypes.ListType{ - ElemType: LogDeliveryStatus{}.Type(ctx), + ElemType: LogDeliveryStatus_SdkV2{}.Type(ctx), }, "log_type": types.StringType, "output_format": types.StringType, @@ -2239,12 +2239,12 @@ func (o UpdateBudgetConfigurationBudget_SdkV2) Type(ctx context.Context) attr.Ty AttrTypes: map[string]attr.Type{ "account_id": types.StringType, "alert_configurations": basetypes.ListType{ - ElemType: AlertConfiguration{}.Type(ctx), + ElemType: AlertConfiguration_SdkV2{}.Type(ctx), }, "budget_configuration_id": types.StringType, "display_name": types.StringType, "filter": basetypes.ListType{ - ElemType: BudgetConfigurationFilter{}.Type(ctx), + ElemType: BudgetConfigurationFilter_SdkV2{}.Type(ctx), }, }, } @@ -2346,7 +2346,7 @@ func (o UpdateBudgetConfigurationRequest_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budget": basetypes.ListType{ - ElemType: UpdateBudgetConfigurationBudget{}.Type(ctx), + ElemType: UpdateBudgetConfigurationBudget_SdkV2{}.Type(ctx), }, "budget_id": types.StringType, }, @@ -2419,7 +2419,7 @@ func (o UpdateBudgetConfigurationResponse_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "budget": basetypes.ListType{ - ElemType: BudgetConfiguration{}.Type(ctx), + ElemType: BudgetConfiguration_SdkV2{}.Type(ctx), }, }, } @@ -2540,7 +2540,7 @@ func (o WrappedCreateLogDeliveryConfiguration_SdkV2) Type(ctx context.Context) a return types.ObjectType{ AttrTypes: map[string]attr.Type{ "log_delivery_configuration": basetypes.ListType{ - ElemType: CreateLogDeliveryConfigurationParams{}.Type(ctx), + ElemType: CreateLogDeliveryConfigurationParams_SdkV2{}.Type(ctx), }, }, } @@ -2611,7 +2611,7 @@ func (o WrappedLogDeliveryConfiguration_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "log_delivery_configuration": basetypes.ListType{ - ElemType: LogDeliveryConfiguration{}.Type(ctx), + ElemType: LogDeliveryConfiguration_SdkV2{}.Type(ctx), }, }, } @@ -2682,7 +2682,7 @@ func (o WrappedLogDeliveryConfigurations_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "log_delivery_configurations": basetypes.ListType{ - ElemType: LogDeliveryConfiguration{}.Type(ctx), + ElemType: LogDeliveryConfiguration_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/catalog_tf/legacy_model.go b/internal/service/catalog_tf/legacy_model.go index 5e2d58c25..e9f275dfa 100755 --- a/internal/service/catalog_tf/legacy_model.go +++ b/internal/service/catalog_tf/legacy_model.go @@ -60,7 +60,7 @@ func (o AccountsCreateMetastore_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastore_info": basetypes.ListType{ - ElemType: CreateMetastore{}.Type(ctx), + ElemType: CreateMetastore_SdkV2{}.Type(ctx), }, }, } @@ -137,7 +137,7 @@ func (o AccountsCreateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastore_assignment": basetypes.ListType{ - ElemType: CreateMetastoreAssignment{}.Type(ctx), + ElemType: CreateMetastoreAssignment_SdkV2{}.Type(ctx), }, "metastore_id": types.StringType, "workspace_id": types.Int64Type, @@ -213,7 +213,7 @@ func (o AccountsCreateStorageCredential_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "credential_info": basetypes.ListType{ - ElemType: CreateStorageCredential{}.Type(ctx), + ElemType: CreateStorageCredential_SdkV2{}.Type(ctx), }, "metastore_id": types.StringType, }, @@ -285,7 +285,7 @@ func (o AccountsMetastoreAssignment_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastore_assignment": basetypes.ListType{ - ElemType: MetastoreAssignment{}.Type(ctx), + ElemType: MetastoreAssignment_SdkV2{}.Type(ctx), }, }, } @@ -356,7 +356,7 @@ func (o AccountsMetastoreInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastore_info": basetypes.ListType{ - ElemType: MetastoreInfo{}.Type(ctx), + ElemType: MetastoreInfo_SdkV2{}.Type(ctx), }, }, } @@ -427,7 +427,7 @@ func (o AccountsStorageCredentialInfo_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "credential_info": basetypes.ListType{ - ElemType: StorageCredentialInfo{}.Type(ctx), + ElemType: StorageCredentialInfo_SdkV2{}.Type(ctx), }, }, } @@ -503,7 +503,7 @@ func (o AccountsUpdateMetastore_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "metastore_id": types.StringType, "metastore_info": basetypes.ListType{ - ElemType: UpdateMetastore{}.Type(ctx), + ElemType: UpdateMetastore_SdkV2{}.Type(ctx), }, }, } @@ -580,7 +580,7 @@ func (o AccountsUpdateMetastoreAssignment_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastore_assignment": basetypes.ListType{ - ElemType: UpdateMetastoreAssignment{}.Type(ctx), + ElemType: UpdateMetastoreAssignment_SdkV2{}.Type(ctx), }, "metastore_id": types.StringType, "workspace_id": types.Int64Type, @@ -659,7 +659,7 @@ func (o AccountsUpdateStorageCredential_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "credential_info": basetypes.ListType{ - ElemType: UpdateStorageCredential{}.Type(ctx), + ElemType: UpdateStorageCredential_SdkV2{}.Type(ctx), }, "metastore_id": types.StringType, "storage_credential_name": types.StringType, @@ -742,7 +742,7 @@ func (o ArtifactAllowlistInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "artifact_matchers": basetypes.ListType{ - ElemType: ArtifactMatcher{}.Type(ctx), + ElemType: ArtifactMatcher_SdkV2{}.Type(ctx), }, "created_at": types.Int64Type, "created_by": types.StringType, @@ -1588,7 +1588,7 @@ func (o CatalogInfo_SdkV2) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "created_by": types.StringType, "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + ElemType: EffectivePredictiveOptimizationFlag_SdkV2{}.Type(ctx), }, "enable_predictive_optimization": types.StringType, "full_name": types.StringType, @@ -1604,7 +1604,7 @@ func (o CatalogInfo_SdkV2) Type(ctx context.Context) attr.Type { }, "provider_name": types.StringType, "provisioning_info": basetypes.ListType{ - ElemType: ProvisioningInfo{}.Type(ctx), + ElemType: ProvisioningInfo_SdkV2{}.Type(ctx), }, "securable_kind": types.StringType, "securable_type": types.StringType, @@ -1845,7 +1845,7 @@ func (o ColumnInfo_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "comment": types.StringType, "mask": basetypes.ListType{ - ElemType: ColumnMask{}.Type(ctx), + ElemType: ColumnMask_SdkV2{}.Type(ctx), }, "name": types.StringType, "nullable": types.BoolType, @@ -2079,7 +2079,7 @@ func (o ConnectionInfo_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "provisioning_info": basetypes.ListType{ - ElemType: ProvisioningInfo{}.Type(ctx), + ElemType: ProvisioningInfo_SdkV2{}.Type(ctx), }, "read_only": types.BoolType, "securable_kind": types.StringType, @@ -2220,7 +2220,7 @@ func (o ContinuousUpdateStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "initial_pipeline_sync_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), + ElemType: PipelineProgress_SdkV2{}.Type(ctx), }, "last_processed_commit_version": types.Int64Type, "timestamp": types.StringType, @@ -2580,17 +2580,17 @@ func (o CreateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), + ElemType: AwsIamRole_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), + ElemType: AzureManagedIdentity_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "comment": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + ElemType: DatabricksGcpServiceAccount_SdkV2{}.Type(ctx), }, "name": types.StringType, "purpose": types.StringType, @@ -2774,7 +2774,7 @@ func (o CreateExternalLocation_SdkV2) Type(ctx context.Context) attr.Type { "comment": types.StringType, "credential_name": types.StringType, "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), + ElemType: EncryptionDetails_SdkV2{}.Type(ctx), }, "fallback": types.BoolType, "name": types.StringType, @@ -2923,7 +2923,7 @@ func (o CreateFunction_SdkV2) Type(ctx context.Context) attr.Type { "external_name": types.StringType, "full_data_type": types.StringType, "input_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), + ElemType: FunctionParameterInfos_SdkV2{}.Type(ctx), }, "is_deterministic": types.BoolType, "is_null_call": types.BoolType, @@ -2931,12 +2931,12 @@ func (o CreateFunction_SdkV2) Type(ctx context.Context) attr.Type { "parameter_style": types.StringType, "properties": types.StringType, "return_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), + ElemType: FunctionParameterInfos_SdkV2{}.Type(ctx), }, "routine_body": types.StringType, "routine_definition": types.StringType, "routine_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), + ElemType: DependencyList_SdkV2{}.Type(ctx), }, "schema_name": types.StringType, "security_type": types.StringType, @@ -3065,7 +3065,7 @@ func (o CreateFunctionRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "function_info": basetypes.ListType{ - ElemType: CreateFunction{}.Type(ctx), + ElemType: CreateFunction_SdkV2{}.Type(ctx), }, }, } @@ -3300,31 +3300,31 @@ func (o CreateMonitor_SdkV2) Type(ctx context.Context) attr.Type { "assets_dir": types.StringType, "baseline_table_name": types.StringType, "custom_metrics": basetypes.ListType{ - ElemType: MonitorMetric{}.Type(ctx), + ElemType: MonitorMetric_SdkV2{}.Type(ctx), }, "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), + ElemType: MonitorDataClassificationConfig_SdkV2{}.Type(ctx), }, "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), + ElemType: MonitorInferenceLog_SdkV2{}.Type(ctx), }, "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), + ElemType: MonitorNotifications_SdkV2{}.Type(ctx), }, "output_schema_name": types.StringType, "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), + ElemType: MonitorCronSchedule_SdkV2{}.Type(ctx), }, "skip_builtin_dashboard": types.BoolType, "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), + ElemType: MonitorSnapshot_SdkV2{}.Type(ctx), }, "table_name": types.StringType, "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), + ElemType: MonitorTimeSeries_SdkV2{}.Type(ctx), }, "warehouse_id": types.StringType, }, @@ -3580,7 +3580,7 @@ func (o CreateOnlineTableRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "table": basetypes.ListType{ - ElemType: OnlineTable{}.Type(ctx), + ElemType: OnlineTable_SdkV2{}.Type(ctx), }, }, } @@ -3864,20 +3864,20 @@ func (o CreateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), + ElemType: AwsIamRoleRequest_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityRequest{}.Type(ctx), + ElemType: AzureManagedIdentityRequest_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), + ElemType: CloudflareApiToken_SdkV2{}.Type(ctx), }, "comment": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + ElemType: DatabricksGcpServiceAccountRequest_SdkV2{}.Type(ctx), }, "name": types.StringType, "read_only": types.BoolType, @@ -4061,7 +4061,7 @@ func (o CreateTableConstraint_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "constraint": basetypes.ListType{ - ElemType: TableConstraint{}.Type(ctx), + ElemType: TableConstraint_SdkV2{}.Type(ctx), }, "full_name_arg": types.StringType, }, @@ -4256,19 +4256,19 @@ func (o CredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), + ElemType: AwsIamRole_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), + ElemType: AzureManagedIdentity_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "comment": types.StringType, "created_at": types.Int64Type, "created_by": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + ElemType: DatabricksGcpServiceAccount_SdkV2{}.Type(ctx), }, "full_name": types.StringType, "id": types.StringType, @@ -5759,10 +5759,10 @@ func (o Dependency_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "function": basetypes.ListType{ - ElemType: FunctionDependency{}.Type(ctx), + ElemType: FunctionDependency_SdkV2{}.Type(ctx), }, "table": basetypes.ListType{ - ElemType: TableDependency{}.Type(ctx), + ElemType: TableDependency_SdkV2{}.Type(ctx), }, }, } @@ -5861,7 +5861,7 @@ func (o DependencyList_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dependencies": basetypes.ListType{ - ElemType: Dependency{}.Type(ctx), + ElemType: Dependency_SdkV2{}.Type(ctx), }, }, } @@ -6017,7 +6017,7 @@ func (o EffectivePermissionsList_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "privilege_assignments": basetypes.ListType{ - ElemType: EffectivePrivilegeAssignment{}.Type(ctx), + ElemType: EffectivePrivilegeAssignment_SdkV2{}.Type(ctx), }, }, } @@ -6201,7 +6201,7 @@ func (o EffectivePrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "principal": types.StringType, "privileges": basetypes.ListType{ - ElemType: EffectivePrivilege{}.Type(ctx), + ElemType: EffectivePrivilege_SdkV2{}.Type(ctx), }, }, } @@ -6357,7 +6357,7 @@ 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{}.Type(ctx), + ElemType: SseEncryptionDetails_SdkV2{}.Type(ctx), }, }, } @@ -6532,7 +6532,7 @@ func (o ExternalLocationInfo_SdkV2) Type(ctx context.Context) attr.Type { "credential_id": types.StringType, "credential_name": types.StringType, "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), + ElemType: EncryptionDetails_SdkV2{}.Type(ctx), }, "fallback": types.BoolType, "isolation_mode": types.StringType, @@ -6930,7 +6930,7 @@ func (o FunctionInfo_SdkV2) Type(ctx context.Context) attr.Type { "full_name": types.StringType, "function_id": types.StringType, "input_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), + ElemType: FunctionParameterInfos_SdkV2{}.Type(ctx), }, "is_deterministic": types.BoolType, "is_null_call": types.BoolType, @@ -6940,12 +6940,12 @@ func (o FunctionInfo_SdkV2) Type(ctx context.Context) attr.Type { "parameter_style": types.StringType, "properties": types.StringType, "return_params": basetypes.ListType{ - ElemType: FunctionParameterInfos{}.Type(ctx), + ElemType: FunctionParameterInfos_SdkV2{}.Type(ctx), }, "routine_body": types.StringType, "routine_definition": types.StringType, "routine_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), + ElemType: DependencyList_SdkV2{}.Type(ctx), }, "schema_name": types.StringType, "security_type": types.StringType, @@ -7163,7 +7163,7 @@ func (o FunctionParameterInfos_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "parameters": basetypes.ListType{ - ElemType: FunctionParameterInfo{}.Type(ctx), + ElemType: FunctionParameterInfo_SdkV2{}.Type(ctx), }, }, } @@ -7436,11 +7436,11 @@ func (o GenerateTemporaryServiceCredentialRequest_SdkV2) Type(ctx context.Contex return types.ObjectType{ AttrTypes: map[string]attr.Type{ "azure_options": basetypes.ListType{ - ElemType: GenerateTemporaryServiceCredentialAzureOptions{}.Type(ctx), + ElemType: GenerateTemporaryServiceCredentialAzureOptions_SdkV2{}.Type(ctx), }, "credential_name": types.StringType, "gcp_options": basetypes.ListType{ - ElemType: GenerateTemporaryServiceCredentialGcpOptions{}.Type(ctx), + ElemType: GenerateTemporaryServiceCredentialGcpOptions_SdkV2{}.Type(ctx), }, }, } @@ -7615,20 +7615,20 @@ func (o GenerateTemporaryTableCredentialResponse_SdkV2) Type(ctx context.Context return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_temp_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), + ElemType: AwsCredentials_SdkV2{}.Type(ctx), }, "azure_aad": basetypes.ListType{ - ElemType: AzureActiveDirectoryToken{}.Type(ctx), + ElemType: AzureActiveDirectoryToken_SdkV2{}.Type(ctx), }, "azure_user_delegation_sas": basetypes.ListType{ - ElemType: AzureUserDelegationSas{}.Type(ctx), + ElemType: AzureUserDelegationSas_SdkV2{}.Type(ctx), }, "expiration_time": types.Int64Type, "gcp_oauth_token": basetypes.ListType{ - ElemType: GcpOauthToken{}.Type(ctx), + ElemType: GcpOauthToken_SdkV2{}.Type(ctx), }, "r2_temp_credentials": basetypes.ListType{ - ElemType: R2Credentials{}.Type(ctx), + ElemType: R2Credentials_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -8785,7 +8785,7 @@ func (o GetQuotaResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "quota_info": basetypes.ListType{ - ElemType: QuotaInfo{}.Type(ctx), + ElemType: QuotaInfo_SdkV2{}.Type(ctx), }, }, } @@ -9304,7 +9304,7 @@ func (o ListAccountStorageCredentialsResponse_SdkV2) Type(ctx context.Context) a return types.ObjectType{ AttrTypes: map[string]attr.Type{ "storage_credentials": basetypes.ListType{ - ElemType: StorageCredentialInfo{}.Type(ctx), + ElemType: StorageCredentialInfo_SdkV2{}.Type(ctx), }, }, } @@ -9441,7 +9441,7 @@ func (o ListCatalogsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "catalogs": basetypes.ListType{ - ElemType: CatalogInfo{}.Type(ctx), + ElemType: CatalogInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -9571,7 +9571,7 @@ func (o ListConnectionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "connections": basetypes.ListType{ - ElemType: ConnectionInfo{}.Type(ctx), + ElemType: ConnectionInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -9703,7 +9703,7 @@ func (o ListCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "credentials": basetypes.ListType{ - ElemType: CredentialInfo{}.Type(ctx), + ElemType: CredentialInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -9838,7 +9838,7 @@ func (o ListExternalLocationsResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "external_locations": basetypes.ListType{ - ElemType: ExternalLocationInfo{}.Type(ctx), + ElemType: ExternalLocationInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -9981,7 +9981,7 @@ func (o ListFunctionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "functions": basetypes.ListType{ - ElemType: FunctionInfo{}.Type(ctx), + ElemType: FunctionInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -10054,7 +10054,7 @@ func (o ListMetastoresResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metastores": basetypes.ListType{ - ElemType: MetastoreInfo{}.Type(ctx), + ElemType: MetastoreInfo_SdkV2{}.Type(ctx), }, }, } @@ -10193,7 +10193,7 @@ func (o ListModelVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_versions": basetypes.ListType{ - ElemType: ModelVersionInfo{}.Type(ctx), + ElemType: ModelVersionInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -10319,7 +10319,7 @@ func (o ListQuotasResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "quotas": basetypes.ListType{ - ElemType: QuotaInfo{}.Type(ctx), + ElemType: QuotaInfo_SdkV2{}.Type(ctx), }, }, } @@ -10517,7 +10517,7 @@ func (o ListRegisteredModelsResponse_SdkV2) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "registered_models": basetypes.ListType{ - ElemType: RegisteredModelInfo{}.Type(ctx), + ElemType: RegisteredModelInfo_SdkV2{}.Type(ctx), }, }, } @@ -10656,7 +10656,7 @@ func (o ListSchemasResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "schemas": basetypes.ListType{ - ElemType: SchemaInfo{}.Type(ctx), + ElemType: SchemaInfo_SdkV2{}.Type(ctx), }, }, } @@ -10786,7 +10786,7 @@ func (o ListStorageCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Typ AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "storage_credentials": basetypes.ListType{ - ElemType: StorageCredentialInfo{}.Type(ctx), + ElemType: StorageCredentialInfo_SdkV2{}.Type(ctx), }, }, } @@ -10991,7 +10991,7 @@ func (o ListSystemSchemasResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "schemas": basetypes.ListType{ - ElemType: SystemSchemaInfo{}.Type(ctx), + ElemType: SystemSchemaInfo_SdkV2{}.Type(ctx), }, }, } @@ -11069,7 +11069,7 @@ func (o ListTableSummariesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "tables": basetypes.ListType{ - ElemType: TableSummary{}.Type(ctx), + ElemType: TableSummary_SdkV2{}.Type(ctx), }, }, } @@ -11233,7 +11233,7 @@ func (o ListTablesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "tables": basetypes.ListType{ - ElemType: TableInfo{}.Type(ctx), + ElemType: TableInfo_SdkV2{}.Type(ctx), }, }, } @@ -11383,7 +11383,7 @@ func (o ListVolumesResponseContent_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "volumes": basetypes.ListType{ - ElemType: VolumeInfo{}.Type(ctx), + ElemType: VolumeInfo_SdkV2{}.Type(ctx), }, }, } @@ -11690,7 +11690,7 @@ func (o ModelVersionInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aliases": basetypes.ListType{ - ElemType: RegisteredModelAlias{}.Type(ctx), + ElemType: RegisteredModelAlias_SdkV2{}.Type(ctx), }, "browse_only": types.BoolType, "catalog_name": types.StringType, @@ -11701,7 +11701,7 @@ func (o ModelVersionInfo_SdkV2) Type(ctx context.Context) attr.Type { "metastore_id": types.StringType, "model_name": types.StringType, "model_version_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), + ElemType: DependencyList_SdkV2{}.Type(ctx), }, "run_id": types.StringType, "run_workspace_id": types.Int64Type, @@ -12159,36 +12159,36 @@ func (o MonitorInfo_SdkV2) Type(ctx context.Context) attr.Type { "assets_dir": types.StringType, "baseline_table_name": types.StringType, "custom_metrics": basetypes.ListType{ - ElemType: MonitorMetric{}.Type(ctx), + ElemType: MonitorMetric_SdkV2{}.Type(ctx), }, "dashboard_id": types.StringType, "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), + ElemType: MonitorDataClassificationConfig_SdkV2{}.Type(ctx), }, "drift_metrics_table_name": types.StringType, "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), + ElemType: MonitorInferenceLog_SdkV2{}.Type(ctx), }, "latest_monitor_failure_msg": types.StringType, "monitor_version": types.StringType, "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), + ElemType: MonitorNotifications_SdkV2{}.Type(ctx), }, "output_schema_name": types.StringType, "profile_metrics_table_name": types.StringType, "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), + ElemType: MonitorCronSchedule_SdkV2{}.Type(ctx), }, "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), + ElemType: MonitorSnapshot_SdkV2{}.Type(ctx), }, "status": types.StringType, "table_name": types.StringType, "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), + ElemType: MonitorTimeSeries_SdkV2{}.Type(ctx), }, }, } @@ -12549,10 +12549,10 @@ func (o MonitorNotifications_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "on_failure": basetypes.ListType{ - ElemType: MonitorDestination{}.Type(ctx), + ElemType: MonitorDestination_SdkV2{}.Type(ctx), }, "on_new_classification_tag_detected": basetypes.ListType{ - ElemType: MonitorDestination{}.Type(ctx), + ElemType: MonitorDestination_SdkV2{}.Type(ctx), }, }, } @@ -12715,7 +12715,7 @@ func (o MonitorRefreshListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "refreshes": basetypes.ListType{ - ElemType: MonitorRefreshInfo{}.Type(ctx), + ElemType: MonitorRefreshInfo_SdkV2{}.Type(ctx), }, }, } @@ -12967,10 +12967,10 @@ func (o OnlineTable_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "name": types.StringType, "spec": basetypes.ListType{ - ElemType: OnlineTableSpec{}.Type(ctx), + ElemType: OnlineTableSpec_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: OnlineTableStatus{}.Type(ctx), + ElemType: OnlineTableStatus_SdkV2{}.Type(ctx), }, "table_serving_url": types.StringType, "unity_catalog_provisioning_state": types.StringType, @@ -13105,10 +13105,10 @@ func (o OnlineTableSpec_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "run_continuously": basetypes.ListType{ - ElemType: OnlineTableSpecContinuousSchedulingPolicy{}.Type(ctx), + ElemType: OnlineTableSpecContinuousSchedulingPolicy_SdkV2{}.Type(ctx), }, "run_triggered": basetypes.ListType{ - ElemType: OnlineTableSpecTriggeredSchedulingPolicy{}.Type(ctx), + ElemType: OnlineTableSpecTriggeredSchedulingPolicy_SdkV2{}.Type(ctx), }, "source_table_full_name": types.StringType, "timeseries_key": types.StringType, @@ -13330,18 +13330,18 @@ func (o OnlineTableStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "continuous_update_status": basetypes.ListType{ - ElemType: ContinuousUpdateStatus{}.Type(ctx), + ElemType: ContinuousUpdateStatus_SdkV2{}.Type(ctx), }, "detailed_state": types.StringType, "failed_status": basetypes.ListType{ - ElemType: FailedStatus{}.Type(ctx), + ElemType: FailedStatus_SdkV2{}.Type(ctx), }, "message": types.StringType, "provisioning_status": basetypes.ListType{ - ElemType: ProvisioningStatus{}.Type(ctx), + ElemType: ProvisioningStatus_SdkV2{}.Type(ctx), }, "triggered_update_status": basetypes.ListType{ - ElemType: TriggeredUpdateStatus{}.Type(ctx), + ElemType: TriggeredUpdateStatus_SdkV2{}.Type(ctx), }, }, } @@ -13600,7 +13600,7 @@ func (o PermissionsList_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "privilege_assignments": basetypes.ListType{ - ElemType: PrivilegeAssignment{}.Type(ctx), + ElemType: PrivilegeAssignment_SdkV2{}.Type(ctx), }, }, } @@ -13930,7 +13930,7 @@ func (o ProvisioningStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "initial_pipeline_sync_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), + ElemType: PipelineProgress_SdkV2{}.Type(ctx), }, }, } @@ -14349,7 +14349,7 @@ func (o RegisteredModelInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aliases": basetypes.ListType{ - ElemType: RegisteredModelAlias{}.Type(ctx), + ElemType: RegisteredModelAlias_SdkV2{}.Type(ctx), }, "browse_only": types.BoolType, "catalog_name": types.StringType, @@ -14538,7 +14538,7 @@ func (o SchemaInfo_SdkV2) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "created_by": types.StringType, "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + ElemType: EffectivePredictiveOptimizationFlag_SdkV2{}.Type(ctx), }, "enable_predictive_optimization": types.StringType, "full_name": types.StringType, @@ -14652,7 +14652,7 @@ func (o SetArtifactAllowlist_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "artifact_matchers": basetypes.ListType{ - ElemType: ArtifactMatcher{}.Type(ctx), + ElemType: ArtifactMatcher_SdkV2{}.Type(ctx), }, "artifact_type": types.StringType, }, @@ -14879,22 +14879,22 @@ func (o StorageCredentialInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleResponse{}.Type(ctx), + ElemType: AwsIamRoleResponse_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityResponse{}.Type(ctx), + ElemType: AzureManagedIdentityResponse_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), + ElemType: CloudflareApiToken_SdkV2{}.Type(ctx), }, "comment": types.StringType, "created_at": types.Int64Type, "created_by": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountResponse{}.Type(ctx), + ElemType: DatabricksGcpServiceAccountResponse_SdkV2{}.Type(ctx), }, "full_name": types.StringType, "id": types.StringType, @@ -15137,13 +15137,13 @@ func (o TableConstraint_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "foreign_key_constraint": basetypes.ListType{ - ElemType: ForeignKeyConstraint{}.Type(ctx), + ElemType: ForeignKeyConstraint_SdkV2{}.Type(ctx), }, "named_table_constraint": basetypes.ListType{ - ElemType: NamedTableConstraint{}.Type(ctx), + ElemType: NamedTableConstraint_SdkV2{}.Type(ctx), }, "primary_key_constraint": basetypes.ListType{ - ElemType: PrimaryKeyConstraint{}.Type(ctx), + ElemType: PrimaryKeyConstraint_SdkV2{}.Type(ctx), }, }, } @@ -15469,7 +15469,7 @@ func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { "browse_only": types.BoolType, "catalog_name": types.StringType, "columns": basetypes.ListType{ - ElemType: ColumnInfo{}.Type(ctx), + ElemType: ColumnInfo_SdkV2{}.Type(ctx), }, "comment": types.StringType, "created_at": types.Int64Type, @@ -15478,14 +15478,14 @@ func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { "data_source_format": types.StringType, "deleted_at": types.Int64Type, "delta_runtime_properties_kvpairs": basetypes.ListType{ - ElemType: DeltaRuntimePropertiesKvPairs{}.Type(ctx), + ElemType: DeltaRuntimePropertiesKvPairs_SdkV2{}.Type(ctx), }, "effective_predictive_optimization_flag": basetypes.ListType{ - ElemType: EffectivePredictiveOptimizationFlag{}.Type(ctx), + ElemType: EffectivePredictiveOptimizationFlag_SdkV2{}.Type(ctx), }, "enable_predictive_optimization": types.StringType, "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), + ElemType: EncryptionDetails_SdkV2{}.Type(ctx), }, "full_name": types.StringType, "metastore_id": types.StringType, @@ -15496,14 +15496,14 @@ func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "row_filter": basetypes.ListType{ - ElemType: TableRowFilter{}.Type(ctx), + ElemType: TableRowFilter_SdkV2{}.Type(ctx), }, "schema_name": types.StringType, "sql_path": types.StringType, "storage_credential_name": types.StringType, "storage_location": types.StringType, "table_constraints": basetypes.ListType{ - ElemType: TableConstraint{}.Type(ctx), + ElemType: TableConstraint_SdkV2{}.Type(ctx), }, "table_id": types.StringType, "table_type": types.StringType, @@ -15511,7 +15511,7 @@ func (o TableInfo_SdkV2) Type(ctx context.Context) attr.Type { "updated_by": types.StringType, "view_definition": types.StringType, "view_dependencies": basetypes.ListType{ - ElemType: DependencyList{}.Type(ctx), + ElemType: DependencyList_SdkV2{}.Type(ctx), }, }, } @@ -15900,10 +15900,10 @@ func (o TemporaryCredentials_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_temp_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), + ElemType: AwsCredentials_SdkV2{}.Type(ctx), }, "azure_aad": basetypes.ListType{ - ElemType: AzureActiveDirectoryToken{}.Type(ctx), + ElemType: AzureActiveDirectoryToken_SdkV2{}.Type(ctx), }, "expiration_time": types.Int64Type, }, @@ -16015,7 +16015,7 @@ func (o TriggeredUpdateStatus_SdkV2) Type(ctx context.Context) attr.Type { "last_processed_commit_version": types.Int64Type, "timestamp": types.StringType, "triggered_update_progress": basetypes.ListType{ - ElemType: PipelineProgress{}.Type(ctx), + ElemType: PipelineProgress_SdkV2{}.Type(ctx), }, }, } @@ -16431,17 +16431,17 @@ func (o UpdateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), + ElemType: AwsIamRole_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), + ElemType: AzureManagedIdentity_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "comment": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccount{}.Type(ctx), + ElemType: DatabricksGcpServiceAccount_SdkV2{}.Type(ctx), }, "force": types.BoolType, "isolation_mode": types.StringType, @@ -16641,7 +16641,7 @@ func (o UpdateExternalLocation_SdkV2) Type(ctx context.Context) attr.Type { "comment": types.StringType, "credential_name": types.StringType, "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), + ElemType: EncryptionDetails_SdkV2{}.Type(ctx), }, "fallback": types.BoolType, "force": types.BoolType, @@ -16993,31 +16993,31 @@ func (o UpdateMonitor_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "baseline_table_name": types.StringType, "custom_metrics": basetypes.ListType{ - ElemType: MonitorMetric{}.Type(ctx), + ElemType: MonitorMetric_SdkV2{}.Type(ctx), }, "dashboard_id": types.StringType, "data_classification_config": basetypes.ListType{ - ElemType: MonitorDataClassificationConfig{}.Type(ctx), + ElemType: MonitorDataClassificationConfig_SdkV2{}.Type(ctx), }, "inference_log": basetypes.ListType{ - ElemType: MonitorInferenceLog{}.Type(ctx), + ElemType: MonitorInferenceLog_SdkV2{}.Type(ctx), }, "notifications": basetypes.ListType{ - ElemType: MonitorNotifications{}.Type(ctx), + ElemType: MonitorNotifications_SdkV2{}.Type(ctx), }, "output_schema_name": types.StringType, "schedule": basetypes.ListType{ - ElemType: MonitorCronSchedule{}.Type(ctx), + ElemType: MonitorCronSchedule_SdkV2{}.Type(ctx), }, "slicing_exprs": basetypes.ListType{ ElemType: types.StringType, }, "snapshot": basetypes.ListType{ - ElemType: MonitorSnapshot{}.Type(ctx), + ElemType: MonitorSnapshot_SdkV2{}.Type(ctx), }, "table_name": types.StringType, "time_series": basetypes.ListType{ - ElemType: MonitorTimeSeries{}.Type(ctx), + ElemType: MonitorTimeSeries_SdkV2{}.Type(ctx), }, }, } @@ -17277,7 +17277,7 @@ func (o UpdatePermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "changes": basetypes.ListType{ - ElemType: PermissionsChange{}.Type(ctx), + ElemType: PermissionsChange_SdkV2{}.Type(ctx), }, "full_name": types.StringType, "securable_type": types.StringType, @@ -17576,20 +17576,20 @@ func (o UpdateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), + ElemType: AwsIamRoleRequest_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityResponse{}.Type(ctx), + ElemType: AzureManagedIdentityResponse_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), + ElemType: CloudflareApiToken_SdkV2{}.Type(ctx), }, "comment": types.StringType, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + ElemType: DatabricksGcpServiceAccountRequest_SdkV2{}.Type(ctx), }, "force": types.BoolType, "isolation_mode": types.StringType, @@ -17992,10 +17992,10 @@ func (o UpdateWorkspaceBindingsParameters_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "add": basetypes.ListType{ - ElemType: WorkspaceBinding{}.Type(ctx), + ElemType: WorkspaceBinding_SdkV2{}.Type(ctx), }, "remove": basetypes.ListType{ - ElemType: WorkspaceBinding{}.Type(ctx), + ElemType: WorkspaceBinding_SdkV2{}.Type(ctx), }, "securable_name": types.StringType, "securable_type": types.StringType, @@ -18119,10 +18119,10 @@ func (o ValidateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRole{}.Type(ctx), + ElemType: AwsIamRole_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentity{}.Type(ctx), + ElemType: AzureManagedIdentity_SdkV2{}.Type(ctx), }, "credential_name": types.StringType, "external_location_name": types.StringType, @@ -18230,7 +18230,7 @@ func (o ValidateCredentialResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "isDir": types.BoolType, "results": basetypes.ListType{ - ElemType: CredentialValidationResult{}.Type(ctx), + ElemType: CredentialValidationResult_SdkV2{}.Type(ctx), }, }, } @@ -18330,19 +18330,19 @@ func (o ValidateStorageCredential_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_iam_role": basetypes.ListType{ - ElemType: AwsIamRoleRequest{}.Type(ctx), + ElemType: AwsIamRoleRequest_SdkV2{}.Type(ctx), }, "azure_managed_identity": basetypes.ListType{ - ElemType: AzureManagedIdentityRequest{}.Type(ctx), + ElemType: AzureManagedIdentityRequest_SdkV2{}.Type(ctx), }, "azure_service_principal": basetypes.ListType{ - ElemType: AzureServicePrincipal{}.Type(ctx), + ElemType: AzureServicePrincipal_SdkV2{}.Type(ctx), }, "cloudflare_api_token": basetypes.ListType{ - ElemType: CloudflareApiToken{}.Type(ctx), + ElemType: CloudflareApiToken_SdkV2{}.Type(ctx), }, "databricks_gcp_service_account": basetypes.ListType{ - ElemType: DatabricksGcpServiceAccountRequest{}.Type(ctx), + ElemType: DatabricksGcpServiceAccountRequest_SdkV2{}.Type(ctx), }, "external_location_name": types.StringType, "read_only": types.BoolType, @@ -18526,7 +18526,7 @@ func (o ValidateStorageCredentialResponse_SdkV2) Type(ctx context.Context) attr. AttrTypes: map[string]attr.Type{ "isDir": types.BoolType, "results": basetypes.ListType{ - ElemType: ValidationResult{}.Type(ctx), + ElemType: ValidationResult_SdkV2{}.Type(ctx), }, }, } @@ -18704,7 +18704,7 @@ func (o VolumeInfo_SdkV2) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "created_by": types.StringType, "encryption_details": basetypes.ListType{ - ElemType: EncryptionDetails{}.Type(ctx), + ElemType: EncryptionDetails_SdkV2{}.Type(ctx), }, "full_name": types.StringType, "metastore_id": types.StringType, @@ -18837,7 +18837,7 @@ func (o WorkspaceBindingsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "bindings": basetypes.ListType{ - ElemType: WorkspaceBinding{}.Type(ctx), + ElemType: WorkspaceBinding_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, diff --git a/internal/service/cleanrooms_tf/legacy_model.go b/internal/service/cleanrooms_tf/legacy_model.go index 4167e7723..646aebd6d 100755 --- a/internal/service/cleanrooms_tf/legacy_model.go +++ b/internal/service/cleanrooms_tf/legacy_model.go @@ -108,11 +108,11 @@ func (o CleanRoom_SdkV2) Type(ctx context.Context) attr.Type { "local_collaborator_alias": types.StringType, "name": types.StringType, "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), + ElemType: CleanRoomOutputCatalog_SdkV2{}.Type(ctx), }, "owner": types.StringType, "remote_detailed_info": basetypes.ListType{ - ElemType: CleanRoomRemoteDetail{}.Type(ctx), + ElemType: CleanRoomRemoteDetail_SdkV2{}.Type(ctx), }, "status": types.StringType, "updated_at": types.Int64Type, @@ -272,31 +272,31 @@ func (o CleanRoomAsset_SdkV2) Type(ctx context.Context) attr.Type { "added_at": types.Int64Type, "asset_type": types.StringType, "foreign_table": basetypes.ListType{ - ElemType: CleanRoomAssetForeignTable{}.Type(ctx), + ElemType: CleanRoomAssetForeignTable_SdkV2{}.Type(ctx), }, "foreign_table_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetForeignTableLocalDetails{}.Type(ctx), + ElemType: CleanRoomAssetForeignTableLocalDetails_SdkV2{}.Type(ctx), }, "name": types.StringType, "notebook": basetypes.ListType{ - ElemType: CleanRoomAssetNotebook{}.Type(ctx), + ElemType: CleanRoomAssetNotebook_SdkV2{}.Type(ctx), }, "owner_collaborator_alias": types.StringType, "status": types.StringType, "table": basetypes.ListType{ - ElemType: CleanRoomAssetTable{}.Type(ctx), + ElemType: CleanRoomAssetTable_SdkV2{}.Type(ctx), }, "table_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetTableLocalDetails{}.Type(ctx), + ElemType: CleanRoomAssetTableLocalDetails_SdkV2{}.Type(ctx), }, "view": basetypes.ListType{ - ElemType: CleanRoomAssetView{}.Type(ctx), + ElemType: CleanRoomAssetView_SdkV2{}.Type(ctx), }, "view_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetViewLocalDetails{}.Type(ctx), + ElemType: CleanRoomAssetViewLocalDetails_SdkV2{}.Type(ctx), }, "volume_local_details": basetypes.ListType{ - ElemType: CleanRoomAssetVolumeLocalDetails{}.Type(ctx), + ElemType: CleanRoomAssetVolumeLocalDetails_SdkV2{}.Type(ctx), }, }, } @@ -550,7 +550,7 @@ func (o CleanRoomAssetForeignTable_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "columns": basetypes.ListType{ - ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + ElemType: catalog_tf.ColumnInfo_SdkV2{}.Type(ctx), }, }, } @@ -712,7 +712,7 @@ func (o CleanRoomAssetTable_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "columns": basetypes.ListType{ - ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + ElemType: catalog_tf.ColumnInfo_SdkV2{}.Type(ctx), }, }, } @@ -789,7 +789,7 @@ func (o CleanRoomAssetTableLocalDetails_SdkV2) Type(ctx context.Context) attr.Ty AttrTypes: map[string]attr.Type{ "local_name": types.StringType, "partitions": basetypes.ListType{ - ElemType: sharing_tf.PartitionSpecificationPartition{}.Type(ctx), + ElemType: sharing_tf.PartitionSpecificationPartition_SdkV2{}.Type(ctx), }, }, } @@ -861,7 +861,7 @@ func (o CleanRoomAssetView_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "columns": basetypes.ListType{ - ElemType: catalog_tf.ColumnInfo{}.Type(ctx), + ElemType: catalog_tf.ColumnInfo_SdkV2{}.Type(ctx), }, }, } @@ -1124,10 +1124,10 @@ func (o CleanRoomNotebookTaskRun_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "collaborator_job_run_info": basetypes.ListType{ - ElemType: CollaboratorJobRunInfo{}.Type(ctx), + ElemType: CollaboratorJobRunInfo_SdkV2{}.Type(ctx), }, "notebook_job_run_state": basetypes.ListType{ - ElemType: jobs_tf.CleanRoomTaskRunState{}.Type(ctx), + ElemType: jobs_tf.CleanRoomTaskRunState_SdkV2{}.Type(ctx), }, "notebook_name": types.StringType, "output_schema_expiration_time": types.Int64Type, @@ -1310,16 +1310,16 @@ func (o CleanRoomRemoteDetail_SdkV2) Type(ctx context.Context) attr.Type { "central_clean_room_id": types.StringType, "cloud_vendor": types.StringType, "collaborators": basetypes.ListType{ - ElemType: CleanRoomCollaborator{}.Type(ctx), + ElemType: CleanRoomCollaborator_SdkV2{}.Type(ctx), }, "compliance_security_profile": basetypes.ListType{ - ElemType: ComplianceSecurityProfile{}.Type(ctx), + ElemType: ComplianceSecurityProfile_SdkV2{}.Type(ctx), }, "creator": basetypes.ListType{ - ElemType: CleanRoomCollaborator{}.Type(ctx), + ElemType: CleanRoomCollaborator_SdkV2{}.Type(ctx), }, "egress_network_policy": basetypes.ListType{ - ElemType: settings_tf.EgressNetworkPolicy{}.Type(ctx), + ElemType: settings_tf.EgressNetworkPolicy_SdkV2{}.Type(ctx), }, "region": types.StringType, }, @@ -1611,7 +1611,7 @@ func (o CreateCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "asset": basetypes.ListType{ - ElemType: CleanRoomAsset{}.Type(ctx), + ElemType: CleanRoomAsset_SdkV2{}.Type(ctx), }, "clean_room_name": types.StringType, }, @@ -1689,7 +1689,7 @@ func (o CreateCleanRoomOutputCatalogRequest_SdkV2) Type(ctx context.Context) att AttrTypes: map[string]attr.Type{ "clean_room_name": types.StringType, "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), + ElemType: CleanRoomOutputCatalog_SdkV2{}.Type(ctx), }, }, } @@ -1760,7 +1760,7 @@ func (o CreateCleanRoomOutputCatalogResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "output_catalog": basetypes.ListType{ - ElemType: CleanRoomOutputCatalog{}.Type(ctx), + ElemType: CleanRoomOutputCatalog_SdkV2{}.Type(ctx), }, }, } @@ -1832,7 +1832,7 @@ func (o CreateCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_room": basetypes.ListType{ - ElemType: CleanRoom{}.Type(ctx), + ElemType: CleanRoom_SdkV2{}.Type(ctx), }, }, } @@ -2219,7 +2219,7 @@ func (o ListCleanRoomAssetsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "assets": basetypes.ListType{ - ElemType: CleanRoomAsset{}.Type(ctx), + ElemType: CleanRoomAsset_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -2353,7 +2353,7 @@ func (o ListCleanRoomNotebookTaskRunsResponse_SdkV2) Type(ctx context.Context) a AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "runs": basetypes.ListType{ - ElemType: CleanRoomNotebookTaskRun{}.Type(ctx), + ElemType: CleanRoomNotebookTaskRun_SdkV2{}.Type(ctx), }, }, } @@ -2477,7 +2477,7 @@ func (o ListCleanRoomsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_rooms": basetypes.ListType{ - ElemType: CleanRoom{}.Type(ctx), + ElemType: CleanRoom_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -2566,7 +2566,7 @@ func (o UpdateCleanRoomAssetRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "asset": basetypes.ListType{ - ElemType: CleanRoomAsset{}.Type(ctx), + ElemType: CleanRoomAsset_SdkV2{}.Type(ctx), }, "asset_type": types.StringType, "clean_room_name": types.StringType, @@ -2643,7 +2643,7 @@ func (o UpdateCleanRoomRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_room": basetypes.ListType{ - ElemType: CleanRoom{}.Type(ctx), + ElemType: CleanRoom_SdkV2{}.Type(ctx), }, "name": types.StringType, }, diff --git a/internal/service/compute_tf/legacy_model.go b/internal/service/compute_tf/legacy_model.go index ccca65037..d99191ded 100755 --- a/internal/service/compute_tf/legacy_model.go +++ b/internal/service/compute_tf/legacy_model.go @@ -429,7 +429,7 @@ func (o AzureAttributes_SdkV2) Type(ctx context.Context) attr.Type { "availability": types.StringType, "first_on_demand": types.Int64Type, "log_analytics_info": basetypes.ListType{ - ElemType: LogAnalyticsInfo{}.Type(ctx), + ElemType: LogAnalyticsInfo_SdkV2{}.Type(ctx), }, "spot_bid_max_price": types.Float64Type, }, @@ -894,7 +894,7 @@ func (o ClusterAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: ClusterPermission{}.Type(ctx), + ElemType: ClusterPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -1161,13 +1161,13 @@ func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ @@ -1175,17 +1175,17 @@ func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { }, "data_security_mode": types.StringType, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -1206,7 +1206,7 @@ func (o ClusterAttributes_SdkV2) Type(ctx context.Context) attr.Type { }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -1923,22 +1923,22 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_cores": types.Float64Type, "cluster_id": types.StringType, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_log_status": basetypes.ListType{ - ElemType: LogSyncStatus{}.Type(ctx), + ElemType: LogSyncStatus_SdkV2{}.Type(ctx), }, "cluster_memory_mb": types.Int64Type, "cluster_name": types.StringType, @@ -1952,23 +1952,23 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver": basetypes.ListType{ - ElemType: SparkNode{}.Type(ctx), + ElemType: SparkNode_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "executors": basetypes.ListType{ - ElemType: SparkNode{}.Type(ctx), + ElemType: SparkNode_SdkV2{}.Type(ctx), }, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -1990,7 +1990,7 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { }, "spark_version": types.StringType, "spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), + ElemType: ClusterSpec_SdkV2{}.Type(ctx), }, "ssh_public_keys": basetypes.ListType{ ElemType: types.StringType, @@ -2000,11 +2000,11 @@ func (o ClusterDetails_SdkV2) Type(ctx context.Context) attr.Type { "state_message": types.StringType, "terminated_time": types.Int64Type, "termination_reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), + ElemType: TerminationReason_SdkV2{}.Type(ctx), }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -2534,10 +2534,10 @@ func (o ClusterEvent_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "cluster_id": types.StringType, "data_plane_event_details": basetypes.ListType{ - ElemType: DataPlaneEventDetails{}.Type(ctx), + ElemType: DataPlaneEventDetails_SdkV2{}.Type(ctx), }, "details": basetypes.ListType{ - ElemType: EventDetails{}.Type(ctx), + ElemType: EventDetails_SdkV2{}.Type(ctx), }, "timestamp": types.Int64Type, "type": types.StringType, @@ -2641,7 +2641,7 @@ func (o ClusterLibraryStatuses_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "cluster_id": types.StringType, "library_statuses": basetypes.ListType{ - ElemType: LibraryFullStatus{}.Type(ctx), + ElemType: LibraryFullStatus_SdkV2{}.Type(ctx), }, }, } @@ -2722,10 +2722,10 @@ func (o ClusterLogConf_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dbfs": basetypes.ListType{ - ElemType: DbfsStorageInfo{}.Type(ctx), + ElemType: DbfsStorageInfo_SdkV2{}.Type(ctx), }, "s3": basetypes.ListType{ - ElemType: S3StorageInfo{}.Type(ctx), + ElemType: S3StorageInfo_SdkV2{}.Type(ctx), }, }, } @@ -2907,7 +2907,7 @@ func (o ClusterPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ClusterAccessControlResponse{}.Type(ctx), + ElemType: ClusterAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -3028,7 +3028,7 @@ func (o ClusterPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ClusterAccessControlRequest{}.Type(ctx), + ElemType: ClusterAccessControlRequest_SdkV2{}.Type(ctx), }, "cluster_id": types.StringType, }, @@ -3167,7 +3167,7 @@ func (o ClusterPolicyAccessControlResponse_SdkV2) Type(ctx context.Context) attr return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: ClusterPolicyPermission{}.Type(ctx), + ElemType: ClusterPolicyPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -3327,7 +3327,7 @@ func (o ClusterPolicyPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ClusterPolicyAccessControlResponse{}.Type(ctx), + ElemType: ClusterPolicyAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -3448,7 +3448,7 @@ func (o ClusterPolicyPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ClusterPolicyAccessControlRequest{}.Type(ctx), + ElemType: ClusterPolicyAccessControlRequest_SdkV2{}.Type(ctx), }, "cluster_policy_id": types.StringType, }, @@ -3593,7 +3593,7 @@ func (o ClusterSize_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "num_workers": types.Int64Type, }, @@ -3880,17 +3880,17 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ @@ -3898,17 +3898,17 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { }, "data_security_mode": types.StringType, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -3930,7 +3930,7 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -4441,7 +4441,7 @@ func (o CommandStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "results": basetypes.ListType{ - ElemType: Results{}.Type(ctx), + ElemType: Results_SdkV2{}.Type(ctx), }, "status": types.StringType, }, @@ -4824,20 +4824,20 @@ func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "clone_from": basetypes.ListType{ - ElemType: CloneCluster{}.Type(ctx), + ElemType: CloneCluster_SdkV2{}.Type(ctx), }, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ @@ -4845,17 +4845,17 @@ func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { }, "data_security_mode": types.StringType, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -4877,7 +4877,7 @@ func (o CreateCluster_SdkV2) Type(ctx context.Context) attr.Type { }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -5418,20 +5418,20 @@ func (o CreateInstancePool_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), + ElemType: InstancePoolAwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), + ElemType: InstancePoolAzureAttributes_SdkV2{}.Type(ctx), }, "custom_tags": basetypes.MapType{ ElemType: types.StringType, }, "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), + ElemType: DiskSpec_SdkV2{}.Type(ctx), }, "enable_elastic_disk": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), + ElemType: InstancePoolGcpAttributes_SdkV2{}.Type(ctx), }, "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_name": types.StringType, @@ -5439,7 +5439,7 @@ func (o CreateInstancePool_SdkV2) Type(ctx context.Context) attr.Type { "min_idle_instances": types.Int64Type, "node_type_id": types.StringType, "preloaded_docker_images": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "preloaded_spark_versions": basetypes.ListType{ ElemType: types.StringType, @@ -5751,7 +5751,7 @@ func (o CreatePolicy_SdkV2) Type(ctx context.Context) attr.Type { "definition": types.StringType, "description": types.StringType, "libraries": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, "max_clusters_per_user": types.Int64Type, "name": types.StringType, @@ -6480,7 +6480,7 @@ func (o DiskSpec_SdkV2) Type(ctx context.Context) attr.Type { "disk_size": types.Int64Type, "disk_throughput": types.Int64Type, "disk_type": basetypes.ListType{ - ElemType: DiskType{}.Type(ctx), + ElemType: DiskType_SdkV2{}.Type(ctx), }, }, } @@ -6645,7 +6645,7 @@ func (o DockerImage_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "basic_auth": basetypes.ListType{ - ElemType: DockerBasicAuth{}.Type(ctx), + ElemType: DockerBasicAuth_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -6935,18 +6935,18 @@ func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_id": types.StringType, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ @@ -6954,17 +6954,17 @@ func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { }, "data_security_mode": types.StringType, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -6986,7 +6986,7 @@ func (o EditCluster_SdkV2) Type(ctx context.Context) attr.Type { }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -7571,7 +7571,7 @@ func (o EditPolicy_SdkV2) Type(ctx context.Context) attr.Type { "definition": types.StringType, "description": types.StringType, "libraries": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, "max_clusters_per_user": types.Int64Type, "name": types.StringType, @@ -7772,7 +7772,7 @@ func (o EnforceClusterComplianceResponse_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "changes": basetypes.ListType{ - ElemType: ClusterSettingsChange{}.Type(ctx), + ElemType: ClusterSettingsChange_SdkV2{}.Type(ctx), }, "has_changes": types.BoolType, }, @@ -8002,11 +8002,11 @@ func (o EventDetails_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "attributes": basetypes.ListType{ - ElemType: ClusterAttributes{}.Type(ctx), + ElemType: ClusterAttributes_SdkV2{}.Type(ctx), }, "cause": types.StringType, "cluster_size": basetypes.ListType{ - ElemType: ClusterSize{}.Type(ctx), + ElemType: ClusterSize_SdkV2{}.Type(ctx), }, "current_num_vcpus": types.Int64Type, "current_num_workers": types.Int64Type, @@ -8016,19 +8016,19 @@ func (o EventDetails_SdkV2) Type(ctx context.Context) attr.Type { "enable_termination_for_node_blocklisted": types.BoolType, "free_space": types.Int64Type, "init_scripts": basetypes.ListType{ - ElemType: InitScriptEventDetails{}.Type(ctx), + ElemType: InitScriptEventDetails_SdkV2{}.Type(ctx), }, "instance_id": types.StringType, "job_run_name": types.StringType, "previous_attributes": basetypes.ListType{ - ElemType: ClusterAttributes{}.Type(ctx), + ElemType: ClusterAttributes_SdkV2{}.Type(ctx), }, "previous_cluster_size": basetypes.ListType{ - ElemType: ClusterSize{}.Type(ctx), + ElemType: ClusterSize_SdkV2{}.Type(ctx), }, "previous_disk_size": types.Int64Type, "reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), + ElemType: TerminationReason_SdkV2{}.Type(ctx), }, "target_num_vcpus": types.Int64Type, "target_num_workers": types.Int64Type, @@ -8523,7 +8523,7 @@ func (o GetClusterPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: ClusterPermissionsDescription{}.Type(ctx), + ElemType: ClusterPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -8681,7 +8681,7 @@ func (o GetClusterPolicyPermissionLevelsResponse_SdkV2) Type(ctx context.Context return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: ClusterPolicyPermissionsDescription{}.Type(ctx), + ElemType: ClusterPolicyPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -8993,10 +8993,10 @@ func (o GetEventsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "events": basetypes.ListType{ - ElemType: ClusterEvent{}.Type(ctx), + ElemType: ClusterEvent_SdkV2{}.Type(ctx), }, "next_page": basetypes.ListType{ - ElemType: GetEvents{}.Type(ctx), + ElemType: GetEvents_SdkV2{}.Type(ctx), }, "total_count": types.Int64Type, }, @@ -9235,10 +9235,10 @@ func (o GetInstancePool_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), + ElemType: InstancePoolAwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), + ElemType: InstancePoolAzureAttributes_SdkV2{}.Type(ctx), }, "custom_tags": basetypes.MapType{ ElemType: types.StringType, @@ -9247,11 +9247,11 @@ func (o GetInstancePool_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), + ElemType: DiskSpec_SdkV2{}.Type(ctx), }, "enable_elastic_disk": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), + ElemType: InstancePoolGcpAttributes_SdkV2{}.Type(ctx), }, "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_id": types.StringType, @@ -9260,17 +9260,17 @@ func (o GetInstancePool_SdkV2) Type(ctx context.Context) attr.Type { "min_idle_instances": types.Int64Type, "node_type_id": types.StringType, "preloaded_docker_images": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "preloaded_spark_versions": basetypes.ListType{ ElemType: types.StringType, }, "state": types.StringType, "stats": basetypes.ListType{ - ElemType: InstancePoolStats{}.Type(ctx), + ElemType: InstancePoolStats_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: InstancePoolStatus{}.Type(ctx), + ElemType: InstancePoolStatus_SdkV2{}.Type(ctx), }, }, } @@ -9619,7 +9619,7 @@ func (o GetInstancePoolPermissionLevelsResponse_SdkV2) Type(ctx context.Context) return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: InstancePoolPermissionsDescription{}.Type(ctx), + ElemType: InstancePoolPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -9825,7 +9825,7 @@ func (o GetSparkVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "versions": basetypes.ListType{ - ElemType: SparkVersion{}.Type(ctx), + ElemType: SparkVersion_SdkV2{}.Type(ctx), }, }, } @@ -10187,10 +10187,10 @@ func (o InitScriptEventDetails_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "cluster": basetypes.ListType{ - ElemType: InitScriptInfoAndExecutionDetails{}.Type(ctx), + ElemType: InitScriptInfoAndExecutionDetails_SdkV2{}.Type(ctx), }, "global": basetypes.ListType{ - ElemType: InitScriptInfoAndExecutionDetails{}.Type(ctx), + ElemType: InitScriptInfoAndExecutionDetails_SdkV2{}.Type(ctx), }, "reported_for_node": types.StringType, }, @@ -10374,25 +10374,25 @@ func (o InitScriptInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "abfss": basetypes.ListType{ - ElemType: Adlsgen2Info{}.Type(ctx), + ElemType: Adlsgen2Info_SdkV2{}.Type(ctx), }, "dbfs": basetypes.ListType{ - ElemType: DbfsStorageInfo{}.Type(ctx), + ElemType: DbfsStorageInfo_SdkV2{}.Type(ctx), }, "file": basetypes.ListType{ - ElemType: LocalFileInfo{}.Type(ctx), + ElemType: LocalFileInfo_SdkV2{}.Type(ctx), }, "gcs": basetypes.ListType{ - ElemType: GcsStorageInfo{}.Type(ctx), + ElemType: GcsStorageInfo_SdkV2{}.Type(ctx), }, "s3": basetypes.ListType{ - ElemType: S3StorageInfo{}.Type(ctx), + ElemType: S3StorageInfo_SdkV2{}.Type(ctx), }, "volumes": basetypes.ListType{ - ElemType: VolumesStorageInfo{}.Type(ctx), + ElemType: VolumesStorageInfo_SdkV2{}.Type(ctx), }, "workspace": basetypes.ListType{ - ElemType: WorkspaceStorageInfo{}.Type(ctx), + ElemType: WorkspaceStorageInfo_SdkV2{}.Type(ctx), }, }, } @@ -10624,10 +10624,10 @@ func (o InitScriptInfoAndExecutionDetails_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "execution_details": basetypes.ListType{ - ElemType: InitScriptExecutionDetails{}.Type(ctx), + ElemType: InitScriptExecutionDetails_SdkV2{}.Type(ctx), }, "script": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, }, } @@ -10729,7 +10729,7 @@ func (o InstallLibraries_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "cluster_id": types.StringType, "libraries": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, }, } @@ -10903,7 +10903,7 @@ func (o InstancePoolAccessControlResponse_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: InstancePoolPermission{}.Type(ctx), + ElemType: InstancePoolPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -11076,10 +11076,10 @@ func (o InstancePoolAndStats_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_attributes": basetypes.ListType{ - ElemType: InstancePoolAwsAttributes{}.Type(ctx), + ElemType: InstancePoolAwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: InstancePoolAzureAttributes{}.Type(ctx), + ElemType: InstancePoolAzureAttributes_SdkV2{}.Type(ctx), }, "custom_tags": basetypes.MapType{ ElemType: types.StringType, @@ -11088,11 +11088,11 @@ func (o InstancePoolAndStats_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "disk_spec": basetypes.ListType{ - ElemType: DiskSpec{}.Type(ctx), + ElemType: DiskSpec_SdkV2{}.Type(ctx), }, "enable_elastic_disk": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: InstancePoolGcpAttributes{}.Type(ctx), + ElemType: InstancePoolGcpAttributes_SdkV2{}.Type(ctx), }, "idle_instance_autotermination_minutes": types.Int64Type, "instance_pool_id": types.StringType, @@ -11101,17 +11101,17 @@ func (o InstancePoolAndStats_SdkV2) Type(ctx context.Context) attr.Type { "min_idle_instances": types.Int64Type, "node_type_id": types.StringType, "preloaded_docker_images": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "preloaded_spark_versions": basetypes.ListType{ ElemType: types.StringType, }, "state": types.StringType, "stats": basetypes.ListType{ - ElemType: InstancePoolStats{}.Type(ctx), + ElemType: InstancePoolStats_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: InstancePoolStatus{}.Type(ctx), + ElemType: InstancePoolStatus_SdkV2{}.Type(ctx), }, }, } @@ -11696,7 +11696,7 @@ func (o InstancePoolPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: InstancePoolAccessControlResponse{}.Type(ctx), + ElemType: InstancePoolAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -11817,7 +11817,7 @@ func (o InstancePoolPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: InstancePoolAccessControlRequest{}.Type(ctx), + ElemType: InstancePoolAccessControlRequest_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, }, @@ -11947,7 +11947,7 @@ func (o InstancePoolStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "pending_instance_errors": basetypes.ListType{ - ElemType: PendingInstanceError{}.Type(ctx), + ElemType: PendingInstanceError_SdkV2{}.Type(ctx), }, }, } @@ -12120,15 +12120,15 @@ func (o Library_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "cran": basetypes.ListType{ - ElemType: RCranLibrary{}.Type(ctx), + ElemType: RCranLibrary_SdkV2{}.Type(ctx), }, "egg": types.StringType, "jar": types.StringType, "maven": basetypes.ListType{ - ElemType: MavenLibrary{}.Type(ctx), + ElemType: MavenLibrary_SdkV2{}.Type(ctx), }, "pypi": basetypes.ListType{ - ElemType: PythonPyPiLibrary{}.Type(ctx), + ElemType: PythonPyPiLibrary_SdkV2{}.Type(ctx), }, "requirements": types.StringType, "whl": types.StringType, @@ -12268,7 +12268,7 @@ func (o LibraryFullStatus_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "is_library_for_all_clusters": types.BoolType, "library": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, "messages": basetypes.ListType{ ElemType: types.StringType, @@ -12370,7 +12370,7 @@ func (o ListAllClusterLibraryStatusesResponse_SdkV2) Type(ctx context.Context) a return types.ObjectType{ AttrTypes: map[string]attr.Type{ "statuses": basetypes.ListType{ - ElemType: ClusterLibraryStatuses{}.Type(ctx), + ElemType: ClusterLibraryStatuses_SdkV2{}.Type(ctx), }, }, } @@ -12582,7 +12582,7 @@ func (o ListClusterCompliancesResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clusters": basetypes.ListType{ - ElemType: ClusterCompliance{}.Type(ctx), + ElemType: ClusterCompliance_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "prev_page_token": types.StringType, @@ -12833,12 +12833,12 @@ func (o ListClustersRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filter_by": basetypes.ListType{ - ElemType: ListClustersFilterBy{}.Type(ctx), + ElemType: ListClustersFilterBy_SdkV2{}.Type(ctx), }, "page_size": types.Int64Type, "page_token": types.StringType, "sort_by": basetypes.ListType{ - ElemType: ListClustersSortBy{}.Type(ctx), + ElemType: ListClustersSortBy_SdkV2{}.Type(ctx), }, }, } @@ -12945,7 +12945,7 @@ func (o ListClustersResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clusters": basetypes.ListType{ - ElemType: ClusterDetails{}.Type(ctx), + ElemType: ClusterDetails_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "prev_page_token": types.StringType, @@ -13066,7 +13066,7 @@ func (o ListGlobalInitScriptsResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "scripts": basetypes.ListType{ - ElemType: GlobalInitScriptDetails{}.Type(ctx), + ElemType: GlobalInitScriptDetails_SdkV2{}.Type(ctx), }, }, } @@ -13137,7 +13137,7 @@ func (o ListInstancePools_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "instance_pools": basetypes.ListType{ - ElemType: InstancePoolAndStats{}.Type(ctx), + ElemType: InstancePoolAndStats_SdkV2{}.Type(ctx), }, }, } @@ -13209,7 +13209,7 @@ func (o ListInstanceProfilesResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "instance_profiles": basetypes.ListType{ - ElemType: InstanceProfile{}.Type(ctx), + ElemType: InstanceProfile_SdkV2{}.Type(ctx), }, }, } @@ -13281,7 +13281,7 @@ func (o ListNodeTypesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "node_types": basetypes.ListType{ - ElemType: NodeType{}.Type(ctx), + ElemType: NodeType_SdkV2{}.Type(ctx), }, }, } @@ -13353,7 +13353,7 @@ func (o ListPoliciesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "policies": basetypes.ListType{ - ElemType: Policy{}.Type(ctx), + ElemType: Policy_SdkV2{}.Type(ctx), }, }, } @@ -13477,7 +13477,7 @@ func (o ListPolicyFamiliesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "policy_families": basetypes.ListType{ - ElemType: PolicyFamily{}.Type(ctx), + ElemType: PolicyFamily_SdkV2{}.Type(ctx), }, }, } @@ -13903,10 +13903,10 @@ func (o NodeType_SdkV2) Type(ctx context.Context) attr.Type { "is_io_cache_enabled": types.BoolType, "memory_mb": types.Int64Type, "node_info": basetypes.ListType{ - ElemType: CloudProviderNodeInfo{}.Type(ctx), + ElemType: CloudProviderNodeInfo_SdkV2{}.Type(ctx), }, "node_instance_type": basetypes.ListType{ - ElemType: NodeInstanceType{}.Type(ctx), + ElemType: NodeInstanceType_SdkV2{}.Type(ctx), }, "node_type_id": types.StringType, "num_cores": types.Float64Type, @@ -14273,7 +14273,7 @@ func (o Policy_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "is_default": types.BoolType, "libraries": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, "max_clusters_per_user": types.Int64Type, "name": types.StringType, @@ -14598,7 +14598,7 @@ func (o ResizeCluster_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "cluster_id": types.StringType, "num_workers": types.Int64Type, @@ -15043,7 +15043,7 @@ func (o SparkNode_SdkV2) Type(ctx context.Context) attr.Type { "host_private_ip": types.StringType, "instance_id": types.StringType, "node_aws_attributes": basetypes.ListType{ - ElemType: SparkNodeAwsAttributes{}.Type(ctx), + ElemType: SparkNodeAwsAttributes_SdkV2{}.Type(ctx), }, "node_id": types.StringType, "private_ip": types.StringType, @@ -15374,7 +15374,7 @@ func (o UninstallLibraries_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "cluster_id": types.StringType, "libraries": basetypes.ListType{ - ElemType: Library{}.Type(ctx), + ElemType: Library_SdkV2{}.Type(ctx), }, }, } @@ -15570,7 +15570,7 @@ func (o UpdateCluster_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "cluster": basetypes.ListType{ - ElemType: UpdateClusterResource{}.Type(ctx), + ElemType: UpdateClusterResource_SdkV2{}.Type(ctx), }, "cluster_id": types.StringType, "update_mask": types.StringType, @@ -15852,17 +15852,17 @@ func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "autoscale": basetypes.ListType{ - ElemType: AutoScale{}.Type(ctx), + ElemType: AutoScale_SdkV2{}.Type(ctx), }, "autotermination_minutes": types.Int64Type, "aws_attributes": basetypes.ListType{ - ElemType: AwsAttributes{}.Type(ctx), + ElemType: AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: AzureAttributes{}.Type(ctx), + ElemType: AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_log_conf": basetypes.ListType{ - ElemType: ClusterLogConf{}.Type(ctx), + ElemType: ClusterLogConf_SdkV2{}.Type(ctx), }, "cluster_name": types.StringType, "custom_tags": basetypes.MapType{ @@ -15870,17 +15870,17 @@ func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { }, "data_security_mode": types.StringType, "docker_image": basetypes.ListType{ - ElemType: DockerImage{}.Type(ctx), + ElemType: DockerImage_SdkV2{}.Type(ctx), }, "driver_instance_pool_id": types.StringType, "driver_node_type_id": types.StringType, "enable_elastic_disk": types.BoolType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: GcpAttributes{}.Type(ctx), + ElemType: GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: InitScriptInfo{}.Type(ctx), + ElemType: InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "is_single_node": types.BoolType, @@ -15902,7 +15902,7 @@ func (o UpdateClusterResource_SdkV2) Type(ctx context.Context) attr.Type { }, "use_ml_runtime": types.BoolType, "workload_type": basetypes.ListType{ - ElemType: WorkloadType{}.Type(ctx), + ElemType: WorkloadType_SdkV2{}.Type(ctx), }, }, } @@ -16374,7 +16374,7 @@ func (o WorkloadType_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clients": basetypes.ListType{ - ElemType: ClientsTypes{}.Type(ctx), + ElemType: ClientsTypes_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/dashboards_tf/legacy_model.go b/internal/service/dashboards_tf/legacy_model.go index b1804e48b..5016d5f4b 100755 --- a/internal/service/dashboards_tf/legacy_model.go +++ b/internal/service/dashboards_tf/legacy_model.go @@ -62,7 +62,7 @@ func (o CreateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), + ElemType: Dashboard_SdkV2{}.Type(ctx), }, }, } @@ -139,7 +139,7 @@ func (o CreateScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, "schedule": basetypes.ListType{ - ElemType: Schedule{}.Type(ctx), + ElemType: Schedule_SdkV2{}.Type(ctx), }, }, } @@ -220,7 +220,7 @@ func (o CreateSubscriptionRequest_SdkV2) Type(ctx context.Context) attr.Type { "dashboard_id": types.StringType, "schedule_id": types.StringType, "subscription": basetypes.ListType{ - ElemType: Subscription{}.Type(ctx), + ElemType: Subscription_SdkV2{}.Type(ctx), }, }, } @@ -619,10 +619,10 @@ func (o GenieAttachment_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "query": basetypes.ListType{ - ElemType: QueryAttachment{}.Type(ctx), + ElemType: QueryAttachment_SdkV2{}.Type(ctx), }, "text": basetypes.ListType{ - ElemType: TextAttachment{}.Type(ctx), + ElemType: TextAttachment_SdkV2{}.Type(ctx), }, }, } @@ -988,7 +988,7 @@ func (o GenieGetMessageQueryResultResponse_SdkV2) Type(ctx context.Context) attr return types.ObjectType{ AttrTypes: map[string]attr.Type{ "statement_response": basetypes.ListType{ - ElemType: sql_tf.StatementResponse{}.Type(ctx), + ElemType: sql_tf.StatementResponse_SdkV2{}.Type(ctx), }, }, } @@ -1107,18 +1107,18 @@ func (o GenieMessage_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "attachments": basetypes.ListType{ - ElemType: GenieAttachment{}.Type(ctx), + ElemType: GenieAttachment_SdkV2{}.Type(ctx), }, "content": types.StringType, "conversation_id": types.StringType, "created_timestamp": types.Int64Type, "error": basetypes.ListType{ - ElemType: MessageError{}.Type(ctx), + ElemType: MessageError_SdkV2{}.Type(ctx), }, "id": types.StringType, "last_updated_timestamp": types.Int64Type, "query_result": basetypes.ListType{ - ElemType: Result{}.Type(ctx), + ElemType: Result_SdkV2{}.Type(ctx), }, "space_id": types.StringType, "status": types.StringType, @@ -1301,11 +1301,11 @@ func (o GenieStartConversationResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "conversation": basetypes.ListType{ - ElemType: GenieConversation{}.Type(ctx), + ElemType: GenieConversation_SdkV2{}.Type(ctx), }, "conversation_id": types.StringType, "message": basetypes.ListType{ - ElemType: GenieMessage{}.Type(ctx), + ElemType: GenieMessage_SdkV2{}.Type(ctx), }, "message_id": types.StringType, }, @@ -1648,7 +1648,7 @@ func (o ListDashboardsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboards": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), + ElemType: Dashboard_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1779,7 +1779,7 @@ func (o ListSchedulesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "schedules": basetypes.ListType{ - ElemType: Schedule{}.Type(ctx), + ElemType: Schedule_SdkV2{}.Type(ctx), }, }, } @@ -1913,7 +1913,7 @@ func (o ListSubscriptionsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "subscriptions": basetypes.ListType{ - ElemType: Subscription{}.Type(ctx), + ElemType: Subscription_SdkV2{}.Type(ctx), }, }, } @@ -2216,7 +2216,7 @@ func (o QueryAttachment_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "cached_query_schema": basetypes.ListType{ - ElemType: QuerySchema{}.Type(ctx), + ElemType: QuerySchema_SdkV2{}.Type(ctx), }, "description": types.StringType, "id": types.StringType, @@ -2299,7 +2299,7 @@ func (o QuerySchema_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "columns": basetypes.ListType{ - ElemType: QuerySchemaColumn{}.Type(ctx), + ElemType: QuerySchemaColumn_SdkV2{}.Type(ctx), }, "statement_id": types.StringType, }, @@ -2503,7 +2503,7 @@ func (o Schedule_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "create_time": types.StringType, "cron_schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), + ElemType: CronSchedule_SdkV2{}.Type(ctx), }, "dashboard_id": types.StringType, "display_name": types.StringType, @@ -2588,10 +2588,10 @@ func (o Subscriber_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "destination_subscriber": basetypes.ListType{ - ElemType: SubscriptionSubscriberDestination{}.Type(ctx), + ElemType: SubscriptionSubscriberDestination_SdkV2{}.Type(ctx), }, "user_subscriber": basetypes.ListType{ - ElemType: SubscriptionSubscriberUser{}.Type(ctx), + ElemType: SubscriptionSubscriberUser_SdkV2{}.Type(ctx), }, }, } @@ -2719,7 +2719,7 @@ func (o Subscription_SdkV2) Type(ctx context.Context) attr.Type { "etag": types.StringType, "schedule_id": types.StringType, "subscriber": basetypes.ListType{ - ElemType: Subscriber{}.Type(ctx), + ElemType: Subscriber_SdkV2{}.Type(ctx), }, "subscription_id": types.StringType, "update_time": types.StringType, @@ -3085,7 +3085,7 @@ func (o UpdateDashboardRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dashboard": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), + ElemType: Dashboard_SdkV2{}.Type(ctx), }, "dashboard_id": types.StringType, }, @@ -3166,7 +3166,7 @@ func (o UpdateScheduleRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "dashboard_id": types.StringType, "schedule": basetypes.ListType{ - ElemType: Schedule{}.Type(ctx), + ElemType: Schedule_SdkV2{}.Type(ctx), }, "schedule_id": types.StringType, }, diff --git a/internal/service/files_tf/legacy_model.go b/internal/service/files_tf/legacy_model.go index b5a6afc79..5bd55f77d 100755 --- a/internal/service/files_tf/legacy_model.go +++ b/internal/service/files_tf/legacy_model.go @@ -1134,7 +1134,7 @@ func (o ListDirectoryResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "contents": basetypes.ListType{ - ElemType: DirectoryEntry{}.Type(ctx), + ElemType: DirectoryEntry_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1208,7 +1208,7 @@ func (o ListStatusResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "files": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/iam_tf/legacy_model.go b/internal/service/iam_tf/legacy_model.go index 69982a05f..27b2d0a18 100755 --- a/internal/service/iam_tf/legacy_model.go +++ b/internal/service/iam_tf/legacy_model.go @@ -127,7 +127,7 @@ func (o AccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: Permission{}.Type(ctx), + ElemType: Permission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -843,7 +843,7 @@ func (o GetAssignableRolesForResourceResponse_SdkV2) Type(ctx context.Context) a return types.ObjectType{ AttrTypes: map[string]attr.Type{ "roles": basetypes.ListType{ - ElemType: Role{}.Type(ctx), + ElemType: Role_SdkV2{}.Type(ctx), }, }, } @@ -958,7 +958,7 @@ func (o GetPasswordPermissionLevelsResponse_SdkV2) Type(ctx context.Context) att return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: PasswordPermissionsDescription{}.Type(ctx), + ElemType: PasswordPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -1077,7 +1077,7 @@ func (o GetPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: PermissionsDescription{}.Type(ctx), + ElemType: PermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -1527,21 +1527,21 @@ func (o Group_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "displayName": types.StringType, "entitlements": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "externalId": types.StringType, "groups": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "id": types.StringType, "members": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "meta": basetypes.ListType{ - ElemType: ResourceMeta{}.Type(ctx), + ElemType: ResourceMeta_SdkV2{}.Type(ctx), }, "roles": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -2054,7 +2054,7 @@ func (o ListGroupsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "itemsPerPage": types.Int64Type, "Resources": basetypes.ListType{ - ElemType: Group{}.Type(ctx), + ElemType: Group_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -2172,7 +2172,7 @@ func (o ListServicePrincipalResponse_SdkV2) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "itemsPerPage": types.Int64Type, "Resources": basetypes.ListType{ - ElemType: ServicePrincipal{}.Type(ctx), + ElemType: ServicePrincipal_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -2437,7 +2437,7 @@ func (o ListUsersResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "itemsPerPage": types.Int64Type, "Resources": basetypes.ListType{ - ElemType: User{}.Type(ctx), + ElemType: User_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -2731,7 +2731,7 @@ func (o ObjectPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AccessControlResponse{}.Type(ctx), + ElemType: AccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -2814,7 +2814,7 @@ func (o PartialUpdate_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "Operations": basetypes.ListType{ - ElemType: Patch{}.Type(ctx), + ElemType: Patch_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -2981,7 +2981,7 @@ func (o PasswordAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: PasswordPermission{}.Type(ctx), + ElemType: PasswordPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -3141,7 +3141,7 @@ func (o PasswordPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: PasswordAccessControlResponse{}.Type(ctx), + ElemType: PasswordAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -3259,7 +3259,7 @@ func (o PasswordPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: PasswordAccessControlRequest{}.Type(ctx), + ElemType: PasswordAccessControlRequest_SdkV2{}.Type(ctx), }, }, } @@ -3509,7 +3509,7 @@ func (o PermissionAssignment_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "principal": basetypes.ListType{ - ElemType: PrincipalOutput{}.Type(ctx), + ElemType: PrincipalOutput_SdkV2{}.Type(ctx), }, }, } @@ -3607,7 +3607,7 @@ func (o PermissionAssignments_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_assignments": basetypes.ListType{ - ElemType: PermissionAssignment{}.Type(ctx), + ElemType: PermissionAssignment_SdkV2{}.Type(ctx), }, }, } @@ -3779,7 +3779,7 @@ func (o PermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AccessControlRequest{}.Type(ctx), + ElemType: AccessControlRequest_SdkV2{}.Type(ctx), }, "request_object_id": types.StringType, "request_object_type": types.StringType, @@ -4005,7 +4005,7 @@ func (o RuleSetResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "etag": types.StringType, "grant_rules": basetypes.ListType{ - ElemType: GrantRule{}.Type(ctx), + ElemType: GrantRule_SdkV2{}.Type(ctx), }, "name": types.StringType, }, @@ -4087,7 +4087,7 @@ func (o RuleSetUpdateRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "etag": types.StringType, "grant_rules": basetypes.ListType{ - ElemType: GrantRule{}.Type(ctx), + ElemType: GrantRule_SdkV2{}.Type(ctx), }, "name": types.StringType, }, @@ -4193,15 +4193,15 @@ func (o ServicePrincipal_SdkV2) Type(ctx context.Context) attr.Type { "applicationId": types.StringType, "displayName": types.StringType, "entitlements": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "externalId": types.StringType, "groups": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "id": types.StringType, "roles": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -4394,7 +4394,7 @@ func (o UpdateRuleSetRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "name": types.StringType, "rule_set": basetypes.ListType{ - ElemType: RuleSetUpdateRequest{}.Type(ctx), + ElemType: RuleSetUpdateRequest_SdkV2{}.Type(ctx), }, }, } @@ -4597,21 +4597,21 @@ func (o User_SdkV2) Type(ctx context.Context) attr.Type { "active": types.BoolType, "displayName": types.StringType, "emails": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "entitlements": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "externalId": types.StringType, "groups": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "id": types.StringType, "name": basetypes.ListType{ - ElemType: Name{}.Type(ctx), + ElemType: Name_SdkV2{}.Type(ctx), }, "roles": basetypes.ListType{ - ElemType: ComplexValue{}.Type(ctx), + ElemType: ComplexValue_SdkV2{}.Type(ctx), }, "schemas": basetypes.ListType{ ElemType: types.StringType, @@ -4817,7 +4817,7 @@ func (o WorkspacePermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permissions": basetypes.ListType{ - ElemType: PermissionOutput{}.Type(ctx), + ElemType: PermissionOutput_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/jobs_tf/legacy_model.go b/internal/service/jobs_tf/legacy_model.go index 310948b39..83f1687cd 100755 --- a/internal/service/jobs_tf/legacy_model.go +++ b/internal/service/jobs_tf/legacy_model.go @@ -86,7 +86,7 @@ func (o BaseJob_SdkV2) Type(ctx context.Context) attr.Type { "effective_budget_policy_id": types.StringType, "job_id": types.Int64Type, "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), + ElemType: JobSettings_SdkV2{}.Type(ctx), }, }, } @@ -328,34 +328,34 @@ func (o BaseRun_SdkV2) Type(ctx context.Context) attr.Type { "attempt_number": types.Int64Type, "cleanup_duration": types.Int64Type, "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), + ElemType: ClusterInstance_SdkV2{}.Type(ctx), }, "cluster_spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), + ElemType: ClusterSpec_SdkV2{}.Type(ctx), }, "creator_user_name": types.StringType, "description": types.StringType, "end_time": types.Int64Type, "execution_duration": types.Int64Type, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "job_clusters": basetypes.ListType{ - ElemType: JobCluster{}.Type(ctx), + ElemType: JobCluster_SdkV2{}.Type(ctx), }, "job_id": types.Int64Type, "job_parameters": basetypes.ListType{ - ElemType: JobParameter{}.Type(ctx), + ElemType: JobParameter_SdkV2{}.Type(ctx), }, "job_run_id": types.Int64Type, "number_in_job": types.Int64Type, "original_attempt_run_id": types.Int64Type, "overriding_parameters": basetypes.ListType{ - ElemType: RunParameters{}.Type(ctx), + ElemType: RunParameters_SdkV2{}.Type(ctx), }, "queue_duration": types.Int64Type, "repair_history": basetypes.ListType{ - ElemType: RepairHistoryItem{}.Type(ctx), + ElemType: RepairHistoryItem_SdkV2{}.Type(ctx), }, "run_duration": types.Int64Type, "run_id": types.Int64Type, @@ -363,22 +363,22 @@ func (o BaseRun_SdkV2) Type(ctx context.Context) attr.Type { "run_page_url": types.StringType, "run_type": types.StringType, "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), + ElemType: CronSchedule_SdkV2{}.Type(ctx), }, "setup_duration": types.Int64Type, "start_time": types.Int64Type, "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), + ElemType: RunState_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), + ElemType: RunStatus_SdkV2{}.Type(ctx), }, "tasks": basetypes.ListType{ - ElemType: RunTask{}.Type(ctx), + ElemType: RunTask_SdkV2{}.Type(ctx), }, "trigger": types.StringType, "trigger_info": basetypes.ListType{ - ElemType: TriggerInfo{}.Type(ctx), + ElemType: TriggerInfo_SdkV2{}.Type(ctx), }, }, } @@ -1110,10 +1110,10 @@ func (o ClusterSpec_SdkV2) Type(ctx context.Context) attr.Type { "existing_cluster_id": types.StringType, "job_cluster_key": types.StringType, "library": basetypes.ListType{ - ElemType: compute_tf.Library{}.Type(ctx), + ElemType: compute_tf.Library_SdkV2{}.Type(ctx), }, "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), + ElemType: compute_tf.ClusterSpec_SdkV2{}.Type(ctx), }, }, } @@ -1454,62 +1454,62 @@ func (o CreateJob_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: JobAccessControlRequest{}.Type(ctx), + ElemType: JobAccessControlRequest_SdkV2{}.Type(ctx), }, "budget_policy_id": types.StringType, "continuous": basetypes.ListType{ - ElemType: Continuous{}.Type(ctx), + ElemType: Continuous_SdkV2{}.Type(ctx), }, "deployment": basetypes.ListType{ - ElemType: JobDeployment{}.Type(ctx), + ElemType: JobDeployment_SdkV2{}.Type(ctx), }, "description": types.StringType, "edit_mode": types.StringType, "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), + ElemType: JobEmailNotifications_SdkV2{}.Type(ctx), }, "environment": basetypes.ListType{ - ElemType: JobEnvironment{}.Type(ctx), + ElemType: JobEnvironment_SdkV2{}.Type(ctx), }, "format": types.StringType, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), + ElemType: JobsHealthRules_SdkV2{}.Type(ctx), }, "job_cluster": basetypes.ListType{ - ElemType: JobCluster{}.Type(ctx), + ElemType: JobCluster_SdkV2{}.Type(ctx), }, "max_concurrent_runs": types.Int64Type, "name": types.StringType, "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), + ElemType: JobNotificationSettings_SdkV2{}.Type(ctx), }, "parameter": basetypes.ListType{ - ElemType: JobParameterDefinition{}.Type(ctx), + ElemType: JobParameterDefinition_SdkV2{}.Type(ctx), }, "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), + ElemType: QueueSettings_SdkV2{}.Type(ctx), }, "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), + ElemType: JobRunAs_SdkV2{}.Type(ctx), }, "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), + ElemType: CronSchedule_SdkV2{}.Type(ctx), }, "tags": basetypes.MapType{ ElemType: types.StringType, }, "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), + ElemType: Task_SdkV2{}.Type(ctx), }, "timeout_seconds": types.Int64Type, "trigger": basetypes.ListType{ - ElemType: TriggerSettings{}.Type(ctx), + ElemType: TriggerSettings_SdkV2{}.Type(ctx), }, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -2569,10 +2569,10 @@ func (o EnforcePolicyComplianceResponse_SdkV2) Type(ctx context.Context) attr.Ty AttrTypes: map[string]attr.Type{ "has_changes": types.BoolType, "job_cluster_changes": basetypes.ListType{ - ElemType: EnforcePolicyComplianceForJobResponseJobClusterSettingsChange{}.Type(ctx), + ElemType: EnforcePolicyComplianceForJobResponseJobClusterSettingsChange_SdkV2{}.Type(ctx), }, "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), + ElemType: JobSettings_SdkV2{}.Type(ctx), }, }, } @@ -2675,7 +2675,7 @@ func (o ExportRunOutput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "views": basetypes.ListType{ - ElemType: ViewItem{}.Type(ctx), + ElemType: ViewItem_SdkV2{}.Type(ctx), }, }, } @@ -2854,10 +2854,10 @@ func (o ForEachStats_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "error_message_stats": basetypes.ListType{ - ElemType: ForEachTaskErrorMessageStats{}.Type(ctx), + ElemType: ForEachTaskErrorMessageStats_SdkV2{}.Type(ctx), }, "task_run_stats": basetypes.ListType{ - ElemType: ForEachTaskTaskRunStats{}.Type(ctx), + ElemType: ForEachTaskTaskRunStats_SdkV2{}.Type(ctx), }, }, } @@ -2966,7 +2966,7 @@ func (o ForEachTask_SdkV2) Type(ctx context.Context) attr.Type { "concurrency": types.Int64Type, "inputs": types.StringType, "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), + ElemType: Task_SdkV2{}.Type(ctx), }, }, } @@ -3195,7 +3195,7 @@ func (o GetJobPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: JobPermissionsDescription{}.Type(ctx), + ElemType: JobPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -3664,12 +3664,12 @@ func (o GitSource_SdkV2) Type(ctx context.Context) attr.Type { "commit": types.StringType, "git_provider": types.StringType, "git_snapshot": basetypes.ListType{ - ElemType: GitSnapshot{}.Type(ctx), + ElemType: GitSnapshot_SdkV2{}.Type(ctx), }, "tag": types.StringType, "url": types.StringType, "job_source": basetypes.ListType{ - ElemType: JobSource{}.Type(ctx), + ElemType: JobSource_SdkV2{}.Type(ctx), }, }, } @@ -3802,7 +3802,7 @@ func (o Job_SdkV2) Type(ctx context.Context) attr.Type { "job_id": types.Int64Type, "run_as_user_name": types.StringType, "settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), + ElemType: JobSettings_SdkV2{}.Type(ctx), }, }, } @@ -3940,7 +3940,7 @@ func (o JobAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: JobPermission{}.Type(ctx), + ElemType: JobPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -4022,7 +4022,7 @@ func (o JobCluster_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "job_cluster_key": types.StringType, "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), + ElemType: compute_tf.ClusterSpec_SdkV2{}.Type(ctx), }, }, } @@ -4461,7 +4461,7 @@ func (o JobEnvironment_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "environment_key": types.StringType, "spec": basetypes.ListType{ - ElemType: compute_tf.Environment{}.Type(ctx), + ElemType: compute_tf.Environment_SdkV2{}.Type(ctx), }, }, } @@ -4762,7 +4762,7 @@ func (o JobPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: JobAccessControlResponse{}.Type(ctx), + ElemType: JobAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -4883,7 +4883,7 @@ func (o JobPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: JobAccessControlRequest{}.Type(ctx), + ElemType: JobAccessControlRequest_SdkV2{}.Type(ctx), }, "job_id": types.StringType, }, @@ -5145,58 +5145,58 @@ func (o JobSettings_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "budget_policy_id": types.StringType, "continuous": basetypes.ListType{ - ElemType: Continuous{}.Type(ctx), + ElemType: Continuous_SdkV2{}.Type(ctx), }, "deployment": basetypes.ListType{ - ElemType: JobDeployment{}.Type(ctx), + ElemType: JobDeployment_SdkV2{}.Type(ctx), }, "description": types.StringType, "edit_mode": types.StringType, "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), + ElemType: JobEmailNotifications_SdkV2{}.Type(ctx), }, "environment": basetypes.ListType{ - ElemType: JobEnvironment{}.Type(ctx), + ElemType: JobEnvironment_SdkV2{}.Type(ctx), }, "format": types.StringType, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), + ElemType: JobsHealthRules_SdkV2{}.Type(ctx), }, "job_cluster": basetypes.ListType{ - ElemType: JobCluster{}.Type(ctx), + ElemType: JobCluster_SdkV2{}.Type(ctx), }, "max_concurrent_runs": types.Int64Type, "name": types.StringType, "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), + ElemType: JobNotificationSettings_SdkV2{}.Type(ctx), }, "parameter": basetypes.ListType{ - ElemType: JobParameterDefinition{}.Type(ctx), + ElemType: JobParameterDefinition_SdkV2{}.Type(ctx), }, "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), + ElemType: QueueSettings_SdkV2{}.Type(ctx), }, "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), + ElemType: JobRunAs_SdkV2{}.Type(ctx), }, "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), + ElemType: CronSchedule_SdkV2{}.Type(ctx), }, "tags": basetypes.MapType{ ElemType: types.StringType, }, "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), + ElemType: Task_SdkV2{}.Type(ctx), }, "timeout_seconds": types.Int64Type, "trigger": basetypes.ListType{ - ElemType: TriggerSettings{}.Type(ctx), + ElemType: TriggerSettings_SdkV2{}.Type(ctx), }, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -5781,7 +5781,7 @@ func (o JobsHealthRules_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "rules": basetypes.ListType{ - ElemType: JobsHealthRule{}.Type(ctx), + ElemType: JobsHealthRule_SdkV2{}.Type(ctx), }, }, } @@ -5863,7 +5863,7 @@ func (o ListJobComplianceForPolicyResponse_SdkV2) Type(ctx context.Context) attr return types.ObjectType{ AttrTypes: map[string]attr.Type{ "jobs": basetypes.ListType{ - ElemType: JobCompliance{}.Type(ctx), + ElemType: JobCompliance_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "prev_page_token": types.StringType, @@ -6068,7 +6068,7 @@ func (o ListJobsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "has_more": types.BoolType, "jobs": basetypes.ListType{ - ElemType: BaseJob{}.Type(ctx), + ElemType: BaseJob_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "prev_page_token": types.StringType, @@ -6253,7 +6253,7 @@ func (o ListRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { "next_page_token": types.StringType, "prev_page_token": types.StringType, "runs": basetypes.ListType{ - ElemType: BaseRun{}.Type(ctx), + ElemType: BaseRun_SdkV2{}.Type(ctx), }, }, } @@ -6862,10 +6862,10 @@ func (o RepairHistoryItem_SdkV2) Type(ctx context.Context) attr.Type { "id": types.Int64Type, "start_time": types.Int64Type, "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), + ElemType: RunState_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), + ElemType: RunStatus_SdkV2{}.Type(ctx), }, "task_run_ids": basetypes.ListType{ ElemType: types.Int64Type, @@ -7126,7 +7126,7 @@ func (o RepairRun_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), + ElemType: PipelineParams_SdkV2{}.Type(ctx), }, "python_named_params": basetypes.MapType{ ElemType: types.StringType, @@ -7502,7 +7502,7 @@ func (o ResetJob_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "job_id": types.Int64Type, "new_settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), + ElemType: JobSettings_SdkV2{}.Type(ctx), }, }, } @@ -8182,34 +8182,34 @@ func (o ResolvedValues_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "condition_task": basetypes.ListType{ - ElemType: ResolvedConditionTaskValues{}.Type(ctx), + ElemType: ResolvedConditionTaskValues_SdkV2{}.Type(ctx), }, "dbt_task": basetypes.ListType{ - ElemType: ResolvedDbtTaskValues{}.Type(ctx), + ElemType: ResolvedDbtTaskValues_SdkV2{}.Type(ctx), }, "notebook_task": basetypes.ListType{ - ElemType: ResolvedNotebookTaskValues{}.Type(ctx), + ElemType: ResolvedNotebookTaskValues_SdkV2{}.Type(ctx), }, "python_wheel_task": basetypes.ListType{ - ElemType: ResolvedPythonWheelTaskValues{}.Type(ctx), + ElemType: ResolvedPythonWheelTaskValues_SdkV2{}.Type(ctx), }, "run_job_task": basetypes.ListType{ - ElemType: ResolvedRunJobTaskValues{}.Type(ctx), + ElemType: ResolvedRunJobTaskValues_SdkV2{}.Type(ctx), }, "simulation_task": basetypes.ListType{ - ElemType: ResolvedParamPairValues{}.Type(ctx), + ElemType: ResolvedParamPairValues_SdkV2{}.Type(ctx), }, "spark_jar_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), + ElemType: ResolvedStringParamsValues_SdkV2{}.Type(ctx), }, "spark_python_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), + ElemType: ResolvedStringParamsValues_SdkV2{}.Type(ctx), }, "spark_submit_task": basetypes.ListType{ - ElemType: ResolvedStringParamsValues{}.Type(ctx), + ElemType: ResolvedStringParamsValues_SdkV2{}.Type(ctx), }, "sql_task": basetypes.ListType{ - ElemType: ResolvedParamPairValues{}.Type(ctx), + ElemType: ResolvedParamPairValues_SdkV2{}.Type(ctx), }, }, } @@ -8694,38 +8694,38 @@ func (o Run_SdkV2) Type(ctx context.Context) attr.Type { "attempt_number": types.Int64Type, "cleanup_duration": types.Int64Type, "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), + ElemType: ClusterInstance_SdkV2{}.Type(ctx), }, "cluster_spec": basetypes.ListType{ - ElemType: ClusterSpec{}.Type(ctx), + ElemType: ClusterSpec_SdkV2{}.Type(ctx), }, "creator_user_name": types.StringType, "description": types.StringType, "end_time": types.Int64Type, "execution_duration": types.Int64Type, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "iterations": basetypes.ListType{ - ElemType: RunTask{}.Type(ctx), + ElemType: RunTask_SdkV2{}.Type(ctx), }, "job_clusters": basetypes.ListType{ - ElemType: JobCluster{}.Type(ctx), + ElemType: JobCluster_SdkV2{}.Type(ctx), }, "job_id": types.Int64Type, "job_parameters": basetypes.ListType{ - ElemType: JobParameter{}.Type(ctx), + ElemType: JobParameter_SdkV2{}.Type(ctx), }, "job_run_id": types.Int64Type, "next_page_token": types.StringType, "number_in_job": types.Int64Type, "original_attempt_run_id": types.Int64Type, "overriding_parameters": basetypes.ListType{ - ElemType: RunParameters{}.Type(ctx), + ElemType: RunParameters_SdkV2{}.Type(ctx), }, "queue_duration": types.Int64Type, "repair_history": basetypes.ListType{ - ElemType: RepairHistoryItem{}.Type(ctx), + ElemType: RepairHistoryItem_SdkV2{}.Type(ctx), }, "run_duration": types.Int64Type, "run_id": types.Int64Type, @@ -8733,22 +8733,22 @@ func (o Run_SdkV2) Type(ctx context.Context) attr.Type { "run_page_url": types.StringType, "run_type": types.StringType, "schedule": basetypes.ListType{ - ElemType: CronSchedule{}.Type(ctx), + ElemType: CronSchedule_SdkV2{}.Type(ctx), }, "setup_duration": types.Int64Type, "start_time": types.Int64Type, "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), + ElemType: RunState_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), + ElemType: RunStatus_SdkV2{}.Type(ctx), }, "tasks": basetypes.ListType{ - ElemType: RunTask{}.Type(ctx), + ElemType: RunTask_SdkV2{}.Type(ctx), }, "trigger": types.StringType, "trigger_info": basetypes.ListType{ - ElemType: TriggerInfo{}.Type(ctx), + ElemType: TriggerInfo_SdkV2{}.Type(ctx), }, }, } @@ -9214,10 +9214,10 @@ func (o RunForEachTask_SdkV2) Type(ctx context.Context) attr.Type { "concurrency": types.Int64Type, "inputs": types.StringType, "stats": basetypes.ListType{ - ElemType: ForEachStats{}.Type(ctx), + ElemType: ForEachStats_SdkV2{}.Type(ctx), }, "task": basetypes.ListType{ - ElemType: Task{}.Type(ctx), + ElemType: Task_SdkV2{}.Type(ctx), }, }, } @@ -9471,7 +9471,7 @@ func (o RunJobTask_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), + ElemType: PipelineParams_SdkV2{}.Type(ctx), }, "python_named_params": basetypes.MapType{ ElemType: types.StringType, @@ -9907,7 +9907,7 @@ func (o RunNow_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), + ElemType: PipelineParams_SdkV2{}.Type(ctx), }, "python_named_params": basetypes.MapType{ ElemType: types.StringType, @@ -9916,7 +9916,7 @@ func (o RunNow_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), + ElemType: QueueSettings_SdkV2{}.Type(ctx), }, "spark_submit_params": basetypes.ListType{ ElemType: types.StringType, @@ -10350,7 +10350,7 @@ func (o RunOutput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dbt_output": basetypes.ListType{ - ElemType: DbtOutput{}.Type(ctx), + ElemType: DbtOutput_SdkV2{}.Type(ctx), }, "error": types.StringType, "error_trace": types.StringType, @@ -10358,16 +10358,16 @@ func (o RunOutput_SdkV2) Type(ctx context.Context) attr.Type { "logs": types.StringType, "logs_truncated": types.BoolType, "metadata": basetypes.ListType{ - ElemType: Run{}.Type(ctx), + ElemType: Run_SdkV2{}.Type(ctx), }, "notebook_output": basetypes.ListType{ - ElemType: NotebookOutput{}.Type(ctx), + ElemType: NotebookOutput_SdkV2{}.Type(ctx), }, "run_job_output": basetypes.ListType{ - ElemType: RunJobOutput{}.Type(ctx), + ElemType: RunJobOutput_SdkV2{}.Type(ctx), }, "sql_output": basetypes.ListType{ - ElemType: SqlOutput{}.Type(ctx), + ElemType: SqlOutput_SdkV2{}.Type(ctx), }, }, } @@ -10646,7 +10646,7 @@ func (o RunParameters_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "pipeline_params": basetypes.ListType{ - ElemType: PipelineParams{}.Type(ctx), + ElemType: PipelineParams_SdkV2{}.Type(ctx), }, "python_named_params": basetypes.MapType{ ElemType: types.StringType, @@ -10984,11 +10984,11 @@ func (o RunStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "queue_details": basetypes.ListType{ - ElemType: QueueDetails{}.Type(ctx), + ElemType: QueueDetails_SdkV2{}.Type(ctx), }, "state": types.StringType, "termination_details": basetypes.ListType{ - ElemType: TerminationDetails{}.Type(ctx), + ElemType: TerminationDetails_SdkV2{}.Type(ctx), }, }, } @@ -11316,89 +11316,89 @@ func (o RunTask_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "attempt_number": types.Int64Type, "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), + ElemType: CleanRoomsNotebookTask_SdkV2{}.Type(ctx), }, "cleanup_duration": types.Int64Type, "cluster_instance": basetypes.ListType{ - ElemType: ClusterInstance{}.Type(ctx), + ElemType: ClusterInstance_SdkV2{}.Type(ctx), }, "condition_task": basetypes.ListType{ - ElemType: RunConditionTask{}.Type(ctx), + ElemType: RunConditionTask_SdkV2{}.Type(ctx), }, "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), + ElemType: DbtTask_SdkV2{}.Type(ctx), }, "depends_on": basetypes.ListType{ - ElemType: TaskDependency{}.Type(ctx), + ElemType: TaskDependency_SdkV2{}.Type(ctx), }, "description": types.StringType, "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), + ElemType: JobEmailNotifications_SdkV2{}.Type(ctx), }, "end_time": types.Int64Type, "environment_key": types.StringType, "execution_duration": types.Int64Type, "existing_cluster_id": types.StringType, "for_each_task": basetypes.ListType{ - ElemType: RunForEachTask{}.Type(ctx), + ElemType: RunForEachTask_SdkV2{}.Type(ctx), }, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "job_cluster_key": types.StringType, "library": basetypes.ListType{ - ElemType: compute_tf.Library{}.Type(ctx), + ElemType: compute_tf.Library_SdkV2{}.Type(ctx), }, "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), + ElemType: compute_tf.ClusterSpec_SdkV2{}.Type(ctx), }, "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), + ElemType: NotebookTask_SdkV2{}.Type(ctx), }, "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), + ElemType: TaskNotificationSettings_SdkV2{}.Type(ctx), }, "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), + ElemType: PipelineTask_SdkV2{}.Type(ctx), }, "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), + ElemType: PythonWheelTask_SdkV2{}.Type(ctx), }, "queue_duration": types.Int64Type, "resolved_values": basetypes.ListType{ - ElemType: ResolvedValues{}.Type(ctx), + ElemType: ResolvedValues_SdkV2{}.Type(ctx), }, "run_duration": types.Int64Type, "run_id": types.Int64Type, "run_if": types.StringType, "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), + ElemType: RunJobTask_SdkV2{}.Type(ctx), }, "run_page_url": types.StringType, "setup_duration": types.Int64Type, "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), + ElemType: SparkJarTask_SdkV2{}.Type(ctx), }, "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), + ElemType: SparkPythonTask_SdkV2{}.Type(ctx), }, "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), + ElemType: SparkSubmitTask_SdkV2{}.Type(ctx), }, "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), + ElemType: SqlTask_SdkV2{}.Type(ctx), }, "start_time": types.Int64Type, "state": basetypes.ListType{ - ElemType: RunState{}.Type(ctx), + ElemType: RunState_SdkV2{}.Type(ctx), }, "status": basetypes.ListType{ - ElemType: RunStatus{}.Type(ctx), + ElemType: RunStatus_SdkV2{}.Type(ctx), }, "task_key": types.StringType, "timeout_seconds": types.Int64Type, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -12326,7 +12326,7 @@ func (o SqlAlertOutput_SdkV2) Type(ctx context.Context) attr.Type { "output_link": types.StringType, "query_text": types.StringType, "sql_statements": basetypes.ListType{ - ElemType: SqlStatementOutput{}.Type(ctx), + ElemType: SqlStatementOutput_SdkV2{}.Type(ctx), }, "warehouse_id": types.StringType, }, @@ -12403,7 +12403,7 @@ func (o SqlDashboardOutput_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "warehouse_id": types.StringType, "widgets": basetypes.ListType{ - ElemType: SqlDashboardWidgetOutput{}.Type(ctx), + ElemType: SqlDashboardWidgetOutput_SdkV2{}.Type(ctx), }, }, } @@ -12494,7 +12494,7 @@ func (o SqlDashboardWidgetOutput_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "end_time": types.Int64Type, "error": basetypes.ListType{ - ElemType: SqlOutputError{}.Type(ctx), + ElemType: SqlOutputError_SdkV2{}.Type(ctx), }, "output_link": types.StringType, "start_time": types.Int64Type, @@ -12579,13 +12579,13 @@ func (o SqlOutput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "alert_output": basetypes.ListType{ - ElemType: SqlAlertOutput{}.Type(ctx), + ElemType: SqlAlertOutput_SdkV2{}.Type(ctx), }, "dashboard_output": basetypes.ListType{ - ElemType: SqlDashboardOutput{}.Type(ctx), + ElemType: SqlDashboardOutput_SdkV2{}.Type(ctx), }, "query_output": basetypes.ListType{ - ElemType: SqlQueryOutput{}.Type(ctx), + ElemType: SqlQueryOutput_SdkV2{}.Type(ctx), }, }, } @@ -12766,7 +12766,7 @@ func (o SqlQueryOutput_SdkV2) Type(ctx context.Context) attr.Type { "output_link": types.StringType, "query_text": types.StringType, "sql_statements": basetypes.ListType{ - ElemType: SqlStatementOutput{}.Type(ctx), + ElemType: SqlStatementOutput_SdkV2{}.Type(ctx), }, "warehouse_id": types.StringType, }, @@ -12905,19 +12905,19 @@ func (o SqlTask_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "alert": basetypes.ListType{ - ElemType: SqlTaskAlert{}.Type(ctx), + ElemType: SqlTaskAlert_SdkV2{}.Type(ctx), }, "dashboard": basetypes.ListType{ - ElemType: SqlTaskDashboard{}.Type(ctx), + ElemType: SqlTaskDashboard_SdkV2{}.Type(ctx), }, "file": basetypes.ListType{ - ElemType: SqlTaskFile{}.Type(ctx), + ElemType: SqlTaskFile_SdkV2{}.Type(ctx), }, "parameters": basetypes.MapType{ ElemType: types.StringType, }, "query": basetypes.ListType{ - ElemType: SqlTaskQuery{}.Type(ctx), + ElemType: SqlTaskQuery_SdkV2{}.Type(ctx), }, "warehouse_id": types.StringType, }, @@ -13102,7 +13102,7 @@ func (o SqlTaskAlert_SdkV2) Type(ctx context.Context) attr.Type { "alert_id": types.StringType, "pause_subscriptions": types.BoolType, "subscriptions": basetypes.ListType{ - ElemType: SqlTaskSubscription{}.Type(ctx), + ElemType: SqlTaskSubscription_SdkV2{}.Type(ctx), }, }, } @@ -13187,7 +13187,7 @@ func (o SqlTaskDashboard_SdkV2) Type(ctx context.Context) attr.Type { "dashboard_id": types.StringType, "pause_subscriptions": types.BoolType, "subscriptions": basetypes.ListType{ - ElemType: SqlTaskSubscription{}.Type(ctx), + ElemType: SqlTaskSubscription_SdkV2{}.Type(ctx), }, }, } @@ -13485,38 +13485,38 @@ func (o SubmitRun_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: JobAccessControlRequest{}.Type(ctx), + ElemType: JobAccessControlRequest_SdkV2{}.Type(ctx), }, "budget_policy_id": types.StringType, "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), + ElemType: JobEmailNotifications_SdkV2{}.Type(ctx), }, "environments": basetypes.ListType{ - ElemType: JobEnvironment{}.Type(ctx), + ElemType: JobEnvironment_SdkV2{}.Type(ctx), }, "git_source": basetypes.ListType{ - ElemType: GitSource{}.Type(ctx), + ElemType: GitSource_SdkV2{}.Type(ctx), }, "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), + ElemType: JobsHealthRules_SdkV2{}.Type(ctx), }, "idempotency_token": types.StringType, "notification_settings": basetypes.ListType{ - ElemType: JobNotificationSettings{}.Type(ctx), + ElemType: JobNotificationSettings_SdkV2{}.Type(ctx), }, "queue": basetypes.ListType{ - ElemType: QueueSettings{}.Type(ctx), + ElemType: QueueSettings_SdkV2{}.Type(ctx), }, "run_as": basetypes.ListType{ - ElemType: JobRunAs{}.Type(ctx), + ElemType: JobRunAs_SdkV2{}.Type(ctx), }, "run_name": types.StringType, "tasks": basetypes.ListType{ - ElemType: SubmitTask{}.Type(ctx), + ElemType: SubmitTask_SdkV2{}.Type(ctx), }, "timeout_seconds": types.Int64Type, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -14007,67 +14007,67 @@ func (o SubmitTask_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), + ElemType: CleanRoomsNotebookTask_SdkV2{}.Type(ctx), }, "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), + ElemType: ConditionTask_SdkV2{}.Type(ctx), }, "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), + ElemType: DbtTask_SdkV2{}.Type(ctx), }, "depends_on": basetypes.ListType{ - ElemType: TaskDependency{}.Type(ctx), + ElemType: TaskDependency_SdkV2{}.Type(ctx), }, "description": types.StringType, "email_notifications": basetypes.ListType{ - ElemType: JobEmailNotifications{}.Type(ctx), + ElemType: JobEmailNotifications_SdkV2{}.Type(ctx), }, "environment_key": types.StringType, "existing_cluster_id": types.StringType, "for_each_task": basetypes.ListType{ - ElemType: ForEachTask{}.Type(ctx), + ElemType: ForEachTask_SdkV2{}.Type(ctx), }, "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), + ElemType: JobsHealthRules_SdkV2{}.Type(ctx), }, "library": basetypes.ListType{ - ElemType: compute_tf.Library{}.Type(ctx), + ElemType: compute_tf.Library_SdkV2{}.Type(ctx), }, "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), + ElemType: compute_tf.ClusterSpec_SdkV2{}.Type(ctx), }, "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), + ElemType: NotebookTask_SdkV2{}.Type(ctx), }, "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), + ElemType: TaskNotificationSettings_SdkV2{}.Type(ctx), }, "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), + ElemType: PipelineTask_SdkV2{}.Type(ctx), }, "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), + ElemType: PythonWheelTask_SdkV2{}.Type(ctx), }, "run_if": types.StringType, "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), + ElemType: RunJobTask_SdkV2{}.Type(ctx), }, "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), + ElemType: SparkJarTask_SdkV2{}.Type(ctx), }, "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), + ElemType: SparkPythonTask_SdkV2{}.Type(ctx), }, "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), + ElemType: SparkSubmitTask_SdkV2{}.Type(ctx), }, "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), + ElemType: SqlTask_SdkV2{}.Type(ctx), }, "task_key": types.StringType, "timeout_seconds": types.Int64Type, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -14867,72 +14867,72 @@ func (o Task_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "clean_rooms_notebook_task": basetypes.ListType{ - ElemType: CleanRoomsNotebookTask{}.Type(ctx), + ElemType: CleanRoomsNotebookTask_SdkV2{}.Type(ctx), }, "condition_task": basetypes.ListType{ - ElemType: ConditionTask{}.Type(ctx), + ElemType: ConditionTask_SdkV2{}.Type(ctx), }, "dbt_task": basetypes.ListType{ - ElemType: DbtTask{}.Type(ctx), + ElemType: DbtTask_SdkV2{}.Type(ctx), }, "depends_on": basetypes.ListType{ - ElemType: TaskDependency{}.Type(ctx), + ElemType: TaskDependency_SdkV2{}.Type(ctx), }, "description": types.StringType, "disable_auto_optimization": types.BoolType, "email_notifications": basetypes.ListType{ - ElemType: TaskEmailNotifications{}.Type(ctx), + ElemType: TaskEmailNotifications_SdkV2{}.Type(ctx), }, "environment_key": types.StringType, "existing_cluster_id": types.StringType, "for_each_task": basetypes.ListType{ - ElemType: ForEachTask{}.Type(ctx), + ElemType: ForEachTask_SdkV2{}.Type(ctx), }, "health": basetypes.ListType{ - ElemType: JobsHealthRules{}.Type(ctx), + ElemType: JobsHealthRules_SdkV2{}.Type(ctx), }, "job_cluster_key": types.StringType, "library": basetypes.ListType{ - ElemType: compute_tf.Library{}.Type(ctx), + ElemType: compute_tf.Library_SdkV2{}.Type(ctx), }, "max_retries": types.Int64Type, "min_retry_interval_millis": types.Int64Type, "new_cluster": basetypes.ListType{ - ElemType: compute_tf.ClusterSpec{}.Type(ctx), + ElemType: compute_tf.ClusterSpec_SdkV2{}.Type(ctx), }, "notebook_task": basetypes.ListType{ - ElemType: NotebookTask{}.Type(ctx), + ElemType: NotebookTask_SdkV2{}.Type(ctx), }, "notification_settings": basetypes.ListType{ - ElemType: TaskNotificationSettings{}.Type(ctx), + ElemType: TaskNotificationSettings_SdkV2{}.Type(ctx), }, "pipeline_task": basetypes.ListType{ - ElemType: PipelineTask{}.Type(ctx), + ElemType: PipelineTask_SdkV2{}.Type(ctx), }, "python_wheel_task": basetypes.ListType{ - ElemType: PythonWheelTask{}.Type(ctx), + ElemType: PythonWheelTask_SdkV2{}.Type(ctx), }, "retry_on_timeout": types.BoolType, "run_if": types.StringType, "run_job_task": basetypes.ListType{ - ElemType: RunJobTask{}.Type(ctx), + ElemType: RunJobTask_SdkV2{}.Type(ctx), }, "spark_jar_task": basetypes.ListType{ - ElemType: SparkJarTask{}.Type(ctx), + ElemType: SparkJarTask_SdkV2{}.Type(ctx), }, "spark_python_task": basetypes.ListType{ - ElemType: SparkPythonTask{}.Type(ctx), + ElemType: SparkPythonTask_SdkV2{}.Type(ctx), }, "spark_submit_task": basetypes.ListType{ - ElemType: SparkSubmitTask{}.Type(ctx), + ElemType: SparkSubmitTask_SdkV2{}.Type(ctx), }, "sql_task": basetypes.ListType{ - ElemType: SqlTask{}.Type(ctx), + ElemType: SqlTask_SdkV2{}.Type(ctx), }, "task_key": types.StringType, "timeout_seconds": types.Int64Type, "webhook_notifications": basetypes.ListType{ - ElemType: WebhookNotifications{}.Type(ctx), + ElemType: WebhookNotifications_SdkV2{}.Type(ctx), }, }, } @@ -15962,17 +15962,17 @@ func (o TriggerSettings_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file_arrival": basetypes.ListType{ - ElemType: FileArrivalTriggerConfiguration{}.Type(ctx), + ElemType: FileArrivalTriggerConfiguration_SdkV2{}.Type(ctx), }, "pause_status": types.StringType, "periodic": basetypes.ListType{ - ElemType: PeriodicTriggerConfiguration{}.Type(ctx), + ElemType: PeriodicTriggerConfiguration_SdkV2{}.Type(ctx), }, "table": basetypes.ListType{ - ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), + ElemType: TableUpdateTriggerConfiguration_SdkV2{}.Type(ctx), }, "table_update": basetypes.ListType{ - ElemType: TableUpdateTriggerConfiguration{}.Type(ctx), + ElemType: TableUpdateTriggerConfiguration_SdkV2{}.Type(ctx), }, }, } @@ -16145,7 +16145,7 @@ func (o UpdateJob_SdkV2) Type(ctx context.Context) attr.Type { }, "job_id": types.Int64Type, "new_settings": basetypes.ListType{ - ElemType: JobSettings{}.Type(ctx), + ElemType: JobSettings_SdkV2{}.Type(ctx), }, }, } @@ -16402,19 +16402,19 @@ func (o WebhookNotifications_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "on_duration_warning_threshold_exceeded": basetypes.ListType{ - ElemType: Webhook{}.Type(ctx), + ElemType: Webhook_SdkV2{}.Type(ctx), }, "on_failure": basetypes.ListType{ - ElemType: Webhook{}.Type(ctx), + ElemType: Webhook_SdkV2{}.Type(ctx), }, "on_start": basetypes.ListType{ - ElemType: Webhook{}.Type(ctx), + ElemType: Webhook_SdkV2{}.Type(ctx), }, "on_streaming_backlog_exceeded": basetypes.ListType{ - ElemType: Webhook{}.Type(ctx), + ElemType: Webhook_SdkV2{}.Type(ctx), }, "on_success": basetypes.ListType{ - ElemType: Webhook{}.Type(ctx), + ElemType: Webhook_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/marketplace_tf/legacy_model.go b/internal/service/marketplace_tf/legacy_model.go index 205f36cd6..98b3310e8 100755 --- a/internal/service/marketplace_tf/legacy_model.go +++ b/internal/service/marketplace_tf/legacy_model.go @@ -105,7 +105,7 @@ func (o AddExchangeForListingResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange_for_listing": basetypes.ListType{ - ElemType: ExchangeListing{}.Type(ctx), + ElemType: ExchangeListing_SdkV2{}.Type(ctx), }, }, } @@ -248,7 +248,7 @@ func (o BatchGetListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listings": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, }, } @@ -391,7 +391,7 @@ func (o BatchGetProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "providers": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -558,7 +558,7 @@ func (o CreateExchangeFilterRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), + ElemType: ExchangeFilter_SdkV2{}.Type(ctx), }, }, } @@ -670,7 +670,7 @@ func (o CreateExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), + ElemType: Exchange_SdkV2{}.Type(ctx), }, }, } @@ -792,7 +792,7 @@ func (o CreateFileRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "display_name": types.StringType, "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), + ElemType: FileParent_SdkV2{}.Type(ctx), }, "marketplace_file_type": types.StringType, "mime_type": types.StringType, @@ -868,7 +868,7 @@ func (o CreateFileResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file_info": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, "upload_url": types.StringType, }, @@ -956,13 +956,13 @@ func (o CreateInstallationRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "accepted_consumer_terms": basetypes.ListType{ - ElemType: ConsumerTerms{}.Type(ctx), + ElemType: ConsumerTerms_SdkV2{}.Type(ctx), }, "catalog_name": types.StringType, "listing_id": types.StringType, "recipient_type": types.StringType, "repo_detail": basetypes.ListType{ - ElemType: RepoInstallation{}.Type(ctx), + ElemType: RepoInstallation_SdkV2{}.Type(ctx), }, "share_name": types.StringType, }, @@ -1060,7 +1060,7 @@ func (o CreateListingRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, }, } @@ -1197,7 +1197,7 @@ func (o CreatePersonalizationRequest_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "accepted_consumer_terms": basetypes.ListType{ - ElemType: ConsumerTerms{}.Type(ctx), + ElemType: ConsumerTerms_SdkV2{}.Type(ctx), }, "comment": types.StringType, "company": types.StringType, @@ -1317,7 +1317,7 @@ func (o CreateProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -1974,11 +1974,11 @@ func (o Exchange_SdkV2) Type(ctx context.Context) attr.Type { "created_at": types.Int64Type, "created_by": types.StringType, "filters": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), + ElemType: ExchangeFilter_SdkV2{}.Type(ctx), }, "id": types.StringType, "linked_listings": basetypes.ListType{ - ElemType: ExchangeListing{}.Type(ctx), + ElemType: ExchangeListing_SdkV2{}.Type(ctx), }, "name": types.StringType, "updated_at": types.Int64Type, @@ -2247,7 +2247,7 @@ func (o FileInfo_SdkV2) Type(ctx context.Context) attr.Type { "display_name": types.StringType, "download_link": types.StringType, "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), + ElemType: FileParent_SdkV2{}.Type(ctx), }, "id": types.StringType, "marketplace_file_type": types.StringType, @@ -2411,7 +2411,7 @@ func (o GetExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), + ElemType: Exchange_SdkV2{}.Type(ctx), }, }, } @@ -2524,7 +2524,7 @@ func (o GetFileResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file_info": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, }, } @@ -2691,7 +2691,7 @@ func (o GetListingContentMetadataResponse_SdkV2) Type(ctx context.Context) attr. AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "shared_data_objects": basetypes.ListType{ - ElemType: SharedDataObject{}.Type(ctx), + ElemType: SharedDataObject_SdkV2{}.Type(ctx), }, }, } @@ -2804,7 +2804,7 @@ func (o GetListingResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, }, } @@ -2924,7 +2924,7 @@ func (o GetListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listings": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -3038,7 +3038,7 @@ func (o GetPersonalizationRequestResponse_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "personalization_requests": basetypes.ListType{ - ElemType: PersonalizationRequest{}.Type(ctx), + ElemType: PersonalizationRequest_SdkV2{}.Type(ctx), }, }, } @@ -3151,7 +3151,7 @@ func (o GetProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -3222,7 +3222,7 @@ func (o Installation_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), + ElemType: InstallationDetail_SdkV2{}.Type(ctx), }, }, } @@ -3341,10 +3341,10 @@ func (o InstallationDetail_SdkV2) Type(ctx context.Context) attr.Type { "share_name": types.StringType, "status": types.StringType, "token_detail": basetypes.ListType{ - ElemType: TokenDetail{}.Type(ctx), + ElemType: TokenDetail_SdkV2{}.Type(ctx), }, "tokens": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), + ElemType: TokenInfo_SdkV2{}.Type(ctx), }, }, } @@ -3490,7 +3490,7 @@ func (o ListAllInstallationsResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "installations": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), + ElemType: InstallationDetail_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -3612,7 +3612,7 @@ func (o ListAllPersonalizationRequestsResponse_SdkV2) Type(ctx context.Context) AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "personalization_requests": basetypes.ListType{ - ElemType: PersonalizationRequest{}.Type(ctx), + ElemType: PersonalizationRequest_SdkV2{}.Type(ctx), }, }, } @@ -3736,7 +3736,7 @@ func (o ListExchangeFiltersResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filters": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), + ElemType: ExchangeFilter_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -3861,7 +3861,7 @@ func (o ListExchangesForListingResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange_listing": basetypes.ListType{ - ElemType: ExchangeListing{}.Type(ctx), + ElemType: ExchangeListing_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -3982,7 +3982,7 @@ func (o ListExchangesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchanges": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), + ElemType: Exchange_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4061,7 +4061,7 @@ func (o ListFilesRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file_parent": basetypes.ListType{ - ElemType: FileParent{}.Type(ctx), + ElemType: FileParent_SdkV2{}.Type(ctx), }, "page_size": types.Int64Type, "page_token": types.StringType, @@ -4137,7 +4137,7 @@ func (o ListFilesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file_infos": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4262,7 +4262,7 @@ func (o ListFulfillmentsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "fulfillments": basetypes.ListType{ - ElemType: ListingFulfillment{}.Type(ctx), + ElemType: ListingFulfillment_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4387,7 +4387,7 @@ func (o ListInstallationsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "installations": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), + ElemType: InstallationDetail_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4512,7 +4512,7 @@ func (o ListListingsForExchangeResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange_listings": basetypes.ListType{ - ElemType: ExchangeListing{}.Type(ctx), + ElemType: ExchangeListing_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4627,7 +4627,7 @@ func (o ListListingsRequest_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "tags": basetypes.ListType{ - ElemType: ListingTag{}.Type(ctx), + ElemType: ListingTag_SdkV2{}.Type(ctx), }, }, } @@ -4779,7 +4779,7 @@ func (o ListListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listings": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -4955,7 +4955,7 @@ func (o ListProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "providers": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -5033,11 +5033,11 @@ func (o Listing_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "detail": basetypes.ListType{ - ElemType: ListingDetail{}.Type(ctx), + ElemType: ListingDetail_SdkV2{}.Type(ctx), }, "id": types.StringType, "summary": basetypes.ListType{ - ElemType: ListingSummary{}.Type(ctx), + ElemType: ListingSummary_SdkV2{}.Type(ctx), }, }, } @@ -5209,14 +5209,14 @@ func (o ListingDetail_SdkV2) Type(ctx context.Context) attr.Type { "collection_date_end": types.Int64Type, "collection_date_start": types.Int64Type, "collection_granularity": basetypes.ListType{ - ElemType: DataRefreshInfo{}.Type(ctx), + ElemType: DataRefreshInfo_SdkV2{}.Type(ctx), }, "cost": types.StringType, "data_source": types.StringType, "description": types.StringType, "documentation_link": types.StringType, "embedded_notebook_file_infos": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, "file_ids": basetypes.ListType{ ElemType: types.StringType, @@ -5228,11 +5228,11 @@ func (o ListingDetail_SdkV2) Type(ctx context.Context) attr.Type { "size": types.Float64Type, "support_link": types.StringType, "tags": basetypes.ListType{ - ElemType: ListingTag{}.Type(ctx), + ElemType: ListingTag_SdkV2{}.Type(ctx), }, "terms_of_service": types.StringType, "update_frequency": basetypes.ListType{ - ElemType: DataRefreshInfo{}.Type(ctx), + ElemType: DataRefreshInfo_SdkV2{}.Type(ctx), }, }, } @@ -5449,10 +5449,10 @@ func (o ListingFulfillment_SdkV2) Type(ctx context.Context) attr.Type { "listing_id": types.StringType, "recipient_type": types.StringType, "repo_info": basetypes.ListType{ - ElemType: RepoInfo{}.Type(ctx), + ElemType: RepoInfo_SdkV2{}.Type(ctx), }, "share_info": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), + ElemType: ShareInfo_SdkV2{}.Type(ctx), }, }, } @@ -5660,21 +5660,21 @@ func (o ListingSummary_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "git_repo": basetypes.ListType{ - ElemType: RepoInfo{}.Type(ctx), + ElemType: RepoInfo_SdkV2{}.Type(ctx), }, "listingType": types.StringType, "name": types.StringType, "provider_id": types.StringType, "provider_region": basetypes.ListType{ - ElemType: RegionInfo{}.Type(ctx), + ElemType: RegionInfo_SdkV2{}.Type(ctx), }, "published_at": types.Int64Type, "published_by": types.StringType, "setting": basetypes.ListType{ - ElemType: ListingSetting{}.Type(ctx), + ElemType: ListingSetting_SdkV2{}.Type(ctx), }, "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), + ElemType: ShareInfo_SdkV2{}.Type(ctx), }, "status": types.StringType, "subtitle": types.StringType, @@ -6006,10 +6006,10 @@ func (o PersonalizationRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "comment": types.StringType, "consumer_region": basetypes.ListType{ - ElemType: RegionInfo{}.Type(ctx), + ElemType: RegionInfo_SdkV2{}.Type(ctx), }, "contact_info": basetypes.ListType{ - ElemType: ContactInfo{}.Type(ctx), + ElemType: ContactInfo_SdkV2{}.Type(ctx), }, "created_at": types.Int64Type, "id": types.StringType, @@ -6021,7 +6021,7 @@ func (o PersonalizationRequest_SdkV2) Type(ctx context.Context) attr.Type { "provider_id": types.StringType, "recipient_type": types.StringType, "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), + ElemType: ShareInfo_SdkV2{}.Type(ctx), }, "status": types.StringType, "status_message": types.StringType, @@ -6656,7 +6656,7 @@ func (o SearchListingsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listings": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -6945,7 +6945,7 @@ func (o UpdateExchangeFilterRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), + ElemType: ExchangeFilter_SdkV2{}.Type(ctx), }, "id": types.StringType, }, @@ -7017,7 +7017,7 @@ func (o UpdateExchangeFilterResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filter": basetypes.ListType{ - ElemType: ExchangeFilter{}.Type(ctx), + ElemType: ExchangeFilter_SdkV2{}.Type(ctx), }, }, } @@ -7091,7 +7091,7 @@ func (o UpdateExchangeRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), + ElemType: Exchange_SdkV2{}.Type(ctx), }, "id": types.StringType, }, @@ -7163,7 +7163,7 @@ func (o UpdateExchangeResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exchange": basetypes.ListType{ - ElemType: Exchange{}.Type(ctx), + ElemType: Exchange_SdkV2{}.Type(ctx), }, }, } @@ -7243,7 +7243,7 @@ func (o UpdateInstallationRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), + ElemType: InstallationDetail_SdkV2{}.Type(ctx), }, "installation_id": types.StringType, "listing_id": types.StringType, @@ -7317,7 +7317,7 @@ func (o UpdateInstallationResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "installation": basetypes.ListType{ - ElemType: InstallationDetail{}.Type(ctx), + ElemType: InstallationDetail_SdkV2{}.Type(ctx), }, }, } @@ -7392,7 +7392,7 @@ func (o UpdateListingRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, }, } @@ -7463,7 +7463,7 @@ func (o UpdateListingResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "listing": basetypes.ListType{ - ElemType: Listing{}.Type(ctx), + ElemType: Listing_SdkV2{}.Type(ctx), }, }, } @@ -7549,7 +7549,7 @@ func (o UpdatePersonalizationRequestRequest_SdkV2) Type(ctx context.Context) att "reason": types.StringType, "request_id": types.StringType, "share": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), + ElemType: ShareInfo_SdkV2{}.Type(ctx), }, "status": types.StringType, }, @@ -7621,7 +7621,7 @@ func (o UpdatePersonalizationRequestResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "request": basetypes.ListType{ - ElemType: PersonalizationRequest{}.Type(ctx), + ElemType: PersonalizationRequest_SdkV2{}.Type(ctx), }, }, } @@ -7794,7 +7794,7 @@ func (o UpdateProviderRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -7865,7 +7865,7 @@ func (o UpdateProviderResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "provider": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/ml_tf/legacy_model.go b/internal/service/ml_tf/legacy_model.go index 595442009..1a2925293 100755 --- a/internal/service/ml_tf/legacy_model.go +++ b/internal/service/ml_tf/legacy_model.go @@ -237,7 +237,7 @@ func (o ApproveTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "activity": basetypes.ListType{ - ElemType: Activity{}.Type(ctx), + ElemType: Activity_SdkV2{}.Type(ctx), }, }, } @@ -452,7 +452,7 @@ func (o CreateCommentResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "comment": basetypes.ListType{ - ElemType: CommentObject{}.Type(ctx), + ElemType: CommentObject_SdkV2{}.Type(ctx), }, }, } @@ -537,7 +537,7 @@ func (o CreateExperiment_SdkV2) Type(ctx context.Context) attr.Type { "artifact_location": types.StringType, "name": types.StringType, "tags": basetypes.ListType{ - ElemType: ExperimentTag{}.Type(ctx), + ElemType: ExperimentTag_SdkV2{}.Type(ctx), }, }, } @@ -659,7 +659,7 @@ func (o CreateModelRequest_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "name": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelTag{}.Type(ctx), + ElemType: ModelTag_SdkV2{}.Type(ctx), }, }, } @@ -730,7 +730,7 @@ func (o CreateModelResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "registered_model": basetypes.ListType{ - ElemType: Model{}.Type(ctx), + ElemType: Model_SdkV2{}.Type(ctx), }, }, } @@ -824,7 +824,7 @@ func (o CreateModelVersionRequest_SdkV2) Type(ctx context.Context) attr.Type { "run_link": types.StringType, "source": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelVersionTag{}.Type(ctx), + ElemType: ModelVersionTag_SdkV2{}.Type(ctx), }, }, } @@ -896,7 +896,7 @@ func (o CreateModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_version": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, }, } @@ -1028,10 +1028,10 @@ func (o CreateRegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpec{}.Type(ctx), + ElemType: HttpUrlSpec_SdkV2{}.Type(ctx), }, "job_spec": basetypes.ListType{ - ElemType: JobSpec{}.Type(ctx), + ElemType: JobSpec_SdkV2{}.Type(ctx), }, "model_name": types.StringType, "status": types.StringType, @@ -1170,7 +1170,7 @@ func (o CreateRun_SdkV2) Type(ctx context.Context) attr.Type { "experiment_id": types.StringType, "start_time": types.Int64Type, "tags": basetypes.ListType{ - ElemType: RunTag{}.Type(ctx), + ElemType: RunTag_SdkV2{}.Type(ctx), }, "user_id": types.StringType, }, @@ -1243,7 +1243,7 @@ func (o CreateRunResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "run": basetypes.ListType{ - ElemType: Run{}.Type(ctx), + ElemType: Run_SdkV2{}.Type(ctx), }, }, } @@ -1377,7 +1377,7 @@ func (o CreateTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "request": basetypes.ListType{ - ElemType: TransitionRequest{}.Type(ctx), + ElemType: TransitionRequest_SdkV2{}.Type(ctx), }, }, } @@ -1448,7 +1448,7 @@ func (o CreateWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "webhook": basetypes.ListType{ - ElemType: RegistryWebhook{}.Type(ctx), + ElemType: RegistryWebhook_SdkV2{}.Type(ctx), }, }, } @@ -1595,10 +1595,10 @@ func (o DatasetInput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dataset": basetypes.ListType{ - ElemType: Dataset{}.Type(ctx), + ElemType: Dataset_SdkV2{}.Type(ctx), }, "tags": basetypes.ListType{ - ElemType: InputTag{}.Type(ctx), + ElemType: InputTag_SdkV2{}.Type(ctx), }, }, } @@ -2650,7 +2650,7 @@ func (o Experiment_SdkV2) Type(ctx context.Context) attr.Type { "lifecycle_stage": types.StringType, "name": types.StringType, "tags": basetypes.ListType{ - ElemType: ExperimentTag{}.Type(ctx), + ElemType: ExperimentTag_SdkV2{}.Type(ctx), }, }, } @@ -2788,7 +2788,7 @@ func (o ExperimentAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: ExperimentPermission{}.Type(ctx), + ElemType: ExperimentPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -2948,7 +2948,7 @@ func (o ExperimentPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ExperimentAccessControlResponse{}.Type(ctx), + ElemType: ExperimentAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -3069,7 +3069,7 @@ func (o ExperimentPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ExperimentAccessControlRequest{}.Type(ctx), + ElemType: ExperimentAccessControlRequest_SdkV2{}.Type(ctx), }, "experiment_id": types.StringType, }, @@ -3324,7 +3324,7 @@ func (o GetExperimentPermissionLevelsResponse_SdkV2) Type(ctx context.Context) a return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: ExperimentPermissionsDescription{}.Type(ctx), + ElemType: ExperimentPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -3482,7 +3482,7 @@ func (o GetExperimentResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "experiment": basetypes.ListType{ - ElemType: Experiment{}.Type(ctx), + ElemType: Experiment_SdkV2{}.Type(ctx), }, }, } @@ -3694,7 +3694,7 @@ func (o GetLatestVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_versions": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, }, } @@ -3770,7 +3770,7 @@ func (o GetMetricHistoryResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metrics": basetypes.ListType{ - ElemType: Metric{}.Type(ctx), + ElemType: Metric_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -3885,7 +3885,7 @@ func (o GetModelResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "registered_model_databricks": basetypes.ListType{ - ElemType: ModelDatabricks{}.Type(ctx), + ElemType: ModelDatabricks_SdkV2{}.Type(ctx), }, }, } @@ -4092,7 +4092,7 @@ func (o GetModelVersionResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_version": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, }, } @@ -4207,7 +4207,7 @@ func (o GetRegisteredModelPermissionLevelsResponse_SdkV2) Type(ctx context.Conte return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: RegisteredModelPermissionsDescription{}.Type(ctx), + ElemType: RegisteredModelPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -4371,7 +4371,7 @@ func (o GetRunResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "run": basetypes.ListType{ - ElemType: Run{}.Type(ctx), + ElemType: Run_SdkV2{}.Type(ctx), }, }, } @@ -4774,7 +4774,7 @@ func (o ListArtifactsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "files": basetypes.ListType{ - ElemType: FileInfo{}.Type(ctx), + ElemType: FileInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "root_uri": types.StringType, @@ -4909,7 +4909,7 @@ func (o ListExperimentsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "experiments": basetypes.ListType{ - ElemType: Experiment{}.Type(ctx), + ElemType: Experiment_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -5033,7 +5033,7 @@ func (o ListModelsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "registered_models": basetypes.ListType{ - ElemType: Model{}.Type(ctx), + ElemType: Model_SdkV2{}.Type(ctx), }, }, } @@ -5109,7 +5109,7 @@ func (o ListRegistryWebhooks_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "webhooks": basetypes.ListType{ - ElemType: RegistryWebhook{}.Type(ctx), + ElemType: RegistryWebhook_SdkV2{}.Type(ctx), }, }, } @@ -5228,7 +5228,7 @@ func (o ListTransitionRequestsResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "requests": basetypes.ListType{ - ElemType: Activity{}.Type(ctx), + ElemType: Activity_SdkV2{}.Type(ctx), }, }, } @@ -5398,14 +5398,14 @@ func (o LogBatch_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metrics": basetypes.ListType{ - ElemType: Metric{}.Type(ctx), + ElemType: Metric_SdkV2{}.Type(ctx), }, "params": basetypes.ListType{ - ElemType: Param{}.Type(ctx), + ElemType: Param_SdkV2{}.Type(ctx), }, "run_id": types.StringType, "tags": basetypes.ListType{ - ElemType: RunTag{}.Type(ctx), + ElemType: RunTag_SdkV2{}.Type(ctx), }, }, } @@ -5568,7 +5568,7 @@ func (o LogInputs_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "datasets": basetypes.ListType{ - ElemType: DatasetInput{}.Type(ctx), + ElemType: DatasetInput_SdkV2{}.Type(ctx), }, "run_id": types.StringType, }, @@ -6027,11 +6027,11 @@ func (o Model_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "last_updated_timestamp": types.Int64Type, "latest_versions": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, "name": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelTag{}.Type(ctx), + ElemType: ModelTag_SdkV2{}.Type(ctx), }, "user_id": types.StringType, }, @@ -6160,12 +6160,12 @@ func (o ModelDatabricks_SdkV2) Type(ctx context.Context) attr.Type { "id": types.StringType, "last_updated_timestamp": types.Int64Type, "latest_versions": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, "name": types.StringType, "permission_level": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelTag{}.Type(ctx), + ElemType: ModelTag_SdkV2{}.Type(ctx), }, "user_id": types.StringType, }, @@ -6359,7 +6359,7 @@ func (o ModelVersion_SdkV2) Type(ctx context.Context) attr.Type { "status": types.StringType, "status_message": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelVersionTag{}.Type(ctx), + ElemType: ModelVersionTag_SdkV2{}.Type(ctx), }, "user_id": types.StringType, "version": types.StringType, @@ -6503,7 +6503,7 @@ func (o ModelVersionDatabricks_SdkV2) Type(ctx context.Context) attr.Type { "status": types.StringType, "status_message": types.StringType, "tags": basetypes.ListType{ - ElemType: ModelVersionTag{}.Type(ctx), + ElemType: ModelVersionTag_SdkV2{}.Type(ctx), }, "user_id": types.StringType, "version": types.StringType, @@ -6735,7 +6735,7 @@ func (o RegisteredModelAccessControlResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: RegisteredModelPermission{}.Type(ctx), + ElemType: RegisteredModelPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -6895,7 +6895,7 @@ func (o RegisteredModelPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: RegisteredModelAccessControlResponse{}.Type(ctx), + ElemType: RegisteredModelAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -7016,7 +7016,7 @@ func (o RegisteredModelPermissionsRequest_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: RegisteredModelAccessControlRequest{}.Type(ctx), + ElemType: RegisteredModelAccessControlRequest_SdkV2{}.Type(ctx), }, "registered_model_id": types.StringType, }, @@ -7159,11 +7159,11 @@ func (o RegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpecWithoutSecret{}.Type(ctx), + ElemType: HttpUrlSpecWithoutSecret_SdkV2{}.Type(ctx), }, "id": types.StringType, "job_spec": basetypes.ListType{ - ElemType: JobSpecWithoutSecret{}.Type(ctx), + ElemType: JobSpecWithoutSecret_SdkV2{}.Type(ctx), }, "last_updated_timestamp": types.Int64Type, "model_name": types.StringType, @@ -7352,7 +7352,7 @@ func (o RejectTransitionRequestResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "activity": basetypes.ListType{ - ElemType: Activity{}.Type(ctx), + ElemType: Activity_SdkV2{}.Type(ctx), }, }, } @@ -7469,7 +7469,7 @@ func (o RenameModelResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "registered_model": basetypes.ListType{ - ElemType: Model{}.Type(ctx), + ElemType: Model_SdkV2{}.Type(ctx), }, }, } @@ -7800,13 +7800,13 @@ func (o Run_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "data": basetypes.ListType{ - ElemType: RunData{}.Type(ctx), + ElemType: RunData_SdkV2{}.Type(ctx), }, "info": basetypes.ListType{ - ElemType: RunInfo{}.Type(ctx), + ElemType: RunInfo_SdkV2{}.Type(ctx), }, "inputs": basetypes.ListType{ - ElemType: RunInputs{}.Type(ctx), + ElemType: RunInputs_SdkV2{}.Type(ctx), }, }, } @@ -7938,13 +7938,13 @@ func (o RunData_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "metrics": basetypes.ListType{ - ElemType: Metric{}.Type(ctx), + ElemType: Metric_SdkV2{}.Type(ctx), }, "params": basetypes.ListType{ - ElemType: Param{}.Type(ctx), + ElemType: Param_SdkV2{}.Type(ctx), }, "tags": basetypes.ListType{ - ElemType: RunTag{}.Type(ctx), + ElemType: RunTag_SdkV2{}.Type(ctx), }, }, } @@ -8148,7 +8148,7 @@ func (o RunInputs_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "dataset_inputs": basetypes.ListType{ - ElemType: DatasetInput{}.Type(ctx), + ElemType: DatasetInput_SdkV2{}.Type(ctx), }, }, } @@ -8363,7 +8363,7 @@ func (o SearchExperimentsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "experiments": basetypes.ListType{ - ElemType: Experiment{}.Type(ctx), + ElemType: Experiment_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -8529,7 +8529,7 @@ func (o SearchModelVersionsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_versions": basetypes.ListType{ - ElemType: ModelVersion{}.Type(ctx), + ElemType: ModelVersion_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -8695,7 +8695,7 @@ func (o SearchModelsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "registered_models": basetypes.ListType{ - ElemType: Model{}.Type(ctx), + ElemType: Model_SdkV2{}.Type(ctx), }, }, } @@ -8909,7 +8909,7 @@ func (o SearchRunsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "runs": basetypes.ListType{ - ElemType: Run{}.Type(ctx), + ElemType: Run_SdkV2{}.Type(ctx), }, }, } @@ -9445,7 +9445,7 @@ func (o TestRegistryWebhookResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "webhook": basetypes.ListType{ - ElemType: TestRegistryWebhook{}.Type(ctx), + ElemType: TestRegistryWebhook_SdkV2{}.Type(ctx), }, }, } @@ -9681,7 +9681,7 @@ func (o TransitionStageResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "model_version": basetypes.ListType{ - ElemType: ModelVersionDatabricks{}.Type(ctx), + ElemType: ModelVersionDatabricks_SdkV2{}.Type(ctx), }, }, } @@ -9799,7 +9799,7 @@ func (o UpdateCommentResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "comment": basetypes.ListType{ - ElemType: CommentObject{}.Type(ctx), + ElemType: CommentObject_SdkV2{}.Type(ctx), }, }, } @@ -10182,11 +10182,11 @@ func (o UpdateRegistryWebhook_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "http_url_spec": basetypes.ListType{ - ElemType: HttpUrlSpec{}.Type(ctx), + ElemType: HttpUrlSpec_SdkV2{}.Type(ctx), }, "id": types.StringType, "job_spec": basetypes.ListType{ - ElemType: JobSpec{}.Type(ctx), + ElemType: JobSpec_SdkV2{}.Type(ctx), }, "status": types.StringType, }, @@ -10366,7 +10366,7 @@ func (o UpdateRunResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "run_info": basetypes.ListType{ - ElemType: RunInfo{}.Type(ctx), + ElemType: RunInfo_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/oauth2_tf/legacy_model.go b/internal/service/oauth2_tf/legacy_model.go index c0ce880c3..a11894aa5 100755 --- a/internal/service/oauth2_tf/legacy_model.go +++ b/internal/service/oauth2_tf/legacy_model.go @@ -65,7 +65,7 @@ func (o CreateAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "policy": basetypes.ListType{ - ElemType: FederationPolicy{}.Type(ctx), + ElemType: FederationPolicy_SdkV2{}.Type(ctx), }, "policy_id": types.StringType, }, @@ -162,7 +162,7 @@ func (o CreateCustomAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -342,7 +342,7 @@ func (o CreatePublishedAppIntegration_SdkV2) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "app_id": types.StringType, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -463,7 +463,7 @@ func (o CreateServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Co return types.ObjectType{ AttrTypes: map[string]attr.Type{ "policy": basetypes.ListType{ - ElemType: FederationPolicy{}.Type(ctx), + ElemType: FederationPolicy_SdkV2{}.Type(ctx), }, "policy_id": types.StringType, "service_principal_id": types.Int64Type, @@ -1036,7 +1036,7 @@ func (o FederationPolicy_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "name": types.StringType, "oidc_policy": basetypes.ListType{ - ElemType: OidcFederationPolicy{}.Type(ctx), + ElemType: OidcFederationPolicy_SdkV2{}.Type(ctx), }, "uid": types.StringType, "update_time": types.StringType, @@ -1195,7 +1195,7 @@ func (o GetCustomAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.Type ElemType: types.StringType, }, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -1365,7 +1365,7 @@ func (o GetCustomAppIntegrationsOutput_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apps": basetypes.ListType{ - ElemType: GetCustomAppIntegrationOutput{}.Type(ctx), + ElemType: GetCustomAppIntegrationOutput_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1458,7 +1458,7 @@ func (o GetPublishedAppIntegrationOutput_SdkV2) Type(ctx context.Context) attr.T "integration_id": types.StringType, "name": types.StringType, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -1575,7 +1575,7 @@ func (o GetPublishedAppIntegrationsOutput_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apps": basetypes.ListType{ - ElemType: GetPublishedAppIntegrationOutput{}.Type(ctx), + ElemType: GetPublishedAppIntegrationOutput_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1652,7 +1652,7 @@ func (o GetPublishedAppsOutput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "apps": basetypes.ListType{ - ElemType: PublishedAppOutput{}.Type(ctx), + ElemType: PublishedAppOutput_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1870,7 +1870,7 @@ func (o ListFederationPoliciesResponse_SdkV2) Type(ctx context.Context) attr.Typ AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "policies": basetypes.ListType{ - ElemType: FederationPolicy{}.Type(ctx), + ElemType: FederationPolicy_SdkV2{}.Type(ctx), }, }, } @@ -2144,7 +2144,7 @@ func (o ListServicePrincipalSecretsResponse_SdkV2) Type(ctx context.Context) att AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "secrets": basetypes.ListType{ - ElemType: SecretInfo{}.Type(ctx), + ElemType: SecretInfo_SdkV2{}.Type(ctx), }, }, } @@ -2559,7 +2559,7 @@ func (o UpdateAccountFederationPolicyRequest_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "policy": basetypes.ListType{ - ElemType: FederationPolicy{}.Type(ctx), + ElemType: FederationPolicy_SdkV2{}.Type(ctx), }, "policy_id": types.StringType, "update_mask": types.StringType, @@ -2644,7 +2644,7 @@ func (o UpdateCustomAppIntegration_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -2781,7 +2781,7 @@ func (o UpdatePublishedAppIntegration_SdkV2) Type(ctx context.Context) attr.Type AttrTypes: map[string]attr.Type{ "integration_id": types.StringType, "token_access_policy": basetypes.ListType{ - ElemType: TokenAccessPolicy{}.Type(ctx), + ElemType: TokenAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -2901,7 +2901,7 @@ func (o UpdateServicePrincipalFederationPolicyRequest_SdkV2) Type(ctx context.Co return types.ObjectType{ AttrTypes: map[string]attr.Type{ "policy": basetypes.ListType{ - ElemType: FederationPolicy{}.Type(ctx), + ElemType: FederationPolicy_SdkV2{}.Type(ctx), }, "policy_id": types.StringType, "service_principal_id": types.Int64Type, diff --git a/internal/service/pipelines_tf/legacy_model.go b/internal/service/pipelines_tf/legacy_model.go index 308b91f35..35df38afc 100755 --- a/internal/service/pipelines_tf/legacy_model.go +++ b/internal/service/pipelines_tf/legacy_model.go @@ -157,45 +157,45 @@ func (o CreatePipeline_SdkV2) Type(ctx context.Context) attr.Type { "catalog": types.StringType, "channel": types.StringType, "clusters": basetypes.ListType{ - ElemType: PipelineCluster{}.Type(ctx), + ElemType: PipelineCluster_SdkV2{}.Type(ctx), }, "configuration": basetypes.MapType{ ElemType: types.StringType, }, "continuous": types.BoolType, "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), + ElemType: PipelineDeployment_SdkV2{}.Type(ctx), }, "development": types.BoolType, "dry_run": types.BoolType, "edition": types.StringType, "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), + ElemType: Filters_SdkV2{}.Type(ctx), }, "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + ElemType: IngestionGatewayPipelineDefinition_SdkV2{}.Type(ctx), }, "id": types.StringType, "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), + ElemType: IngestionPipelineDefinition_SdkV2{}.Type(ctx), }, "libraries": basetypes.ListType{ - ElemType: PipelineLibrary{}.Type(ctx), + ElemType: PipelineLibrary_SdkV2{}.Type(ctx), }, "name": types.StringType, "notifications": basetypes.ListType{ - ElemType: Notifications{}.Type(ctx), + ElemType: Notifications_SdkV2{}.Type(ctx), }, "photon": types.BoolType, "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), + ElemType: RestartWindow_SdkV2{}.Type(ctx), }, "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, "target": types.StringType, "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), + ElemType: PipelineTrigger_SdkV2{}.Type(ctx), }, }, } @@ -505,7 +505,7 @@ func (o CreatePipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "effective_settings": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), + ElemType: PipelineSpec_SdkV2{}.Type(ctx), }, "pipeline_id": types.StringType, }, @@ -847,46 +847,46 @@ func (o EditPipeline_SdkV2) Type(ctx context.Context) attr.Type { "catalog": types.StringType, "channel": types.StringType, "clusters": basetypes.ListType{ - ElemType: PipelineCluster{}.Type(ctx), + ElemType: PipelineCluster_SdkV2{}.Type(ctx), }, "configuration": basetypes.MapType{ ElemType: types.StringType, }, "continuous": types.BoolType, "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), + ElemType: PipelineDeployment_SdkV2{}.Type(ctx), }, "development": types.BoolType, "edition": types.StringType, "expected_last_modified": types.Int64Type, "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), + ElemType: Filters_SdkV2{}.Type(ctx), }, "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + ElemType: IngestionGatewayPipelineDefinition_SdkV2{}.Type(ctx), }, "id": types.StringType, "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), + ElemType: IngestionPipelineDefinition_SdkV2{}.Type(ctx), }, "libraries": basetypes.ListType{ - ElemType: PipelineLibrary{}.Type(ctx), + ElemType: PipelineLibrary_SdkV2{}.Type(ctx), }, "name": types.StringType, "notifications": basetypes.ListType{ - ElemType: Notifications{}.Type(ctx), + ElemType: Notifications_SdkV2{}.Type(ctx), }, "photon": types.BoolType, "pipeline_id": types.StringType, "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), + ElemType: RestartWindow_SdkV2{}.Type(ctx), }, "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, "target": types.StringType, "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), + ElemType: PipelineTrigger_SdkV2{}.Type(ctx), }, }, } @@ -1231,7 +1231,7 @@ func (o ErrorDetail_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "exceptions": basetypes.ListType{ - ElemType: SerializedException{}.Type(ctx), + ElemType: SerializedException_SdkV2{}.Type(ctx), }, "fatal": types.BoolType, }, @@ -1494,7 +1494,7 @@ func (o GetPipelinePermissionLevelsResponse_SdkV2) Type(ctx context.Context) att return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: PipelinePermissionsDescription{}.Type(ctx), + ElemType: PipelinePermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -1693,13 +1693,13 @@ func (o GetPipelineResponse_SdkV2) Type(ctx context.Context) attr.Type { "health": types.StringType, "last_modified": types.Int64Type, "latest_updates": basetypes.ListType{ - ElemType: UpdateStateInfo{}.Type(ctx), + ElemType: UpdateStateInfo_SdkV2{}.Type(ctx), }, "name": types.StringType, "pipeline_id": types.StringType, "run_as_user_name": types.StringType, "spec": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), + ElemType: PipelineSpec_SdkV2{}.Type(ctx), }, "state": types.StringType, }, @@ -1845,7 +1845,7 @@ func (o GetUpdateResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "update": basetypes.ListType{ - ElemType: UpdateInfo{}.Type(ctx), + ElemType: UpdateInfo_SdkV2{}.Type(ctx), }, }, } @@ -1925,13 +1925,13 @@ func (o IngestionConfig_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "report": basetypes.ListType{ - ElemType: ReportSpec{}.Type(ctx), + ElemType: ReportSpec_SdkV2{}.Type(ctx), }, "schema": basetypes.ListType{ - ElemType: SchemaSpec{}.Type(ctx), + ElemType: SchemaSpec_SdkV2{}.Type(ctx), }, "table": basetypes.ListType{ - ElemType: TableSpec{}.Type(ctx), + ElemType: TableSpec_SdkV2{}.Type(ctx), }, }, } @@ -2139,10 +2139,10 @@ func (o IngestionPipelineDefinition_SdkV2) Type(ctx context.Context) attr.Type { "connection_name": types.StringType, "ingestion_gateway_id": types.StringType, "objects": basetypes.ListType{ - ElemType: IngestionConfig{}.Type(ctx), + ElemType: IngestionConfig_SdkV2{}.Type(ctx), }, "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), + ElemType: TableSpecificConfig_SdkV2{}.Type(ctx), }, }, } @@ -2348,7 +2348,7 @@ func (o ListPipelineEventsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "events": basetypes.ListType{ - ElemType: PipelineEvent{}.Type(ctx), + ElemType: PipelineEvent_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "prev_page_token": types.StringType, @@ -2524,7 +2524,7 @@ func (o ListPipelinesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "statuses": basetypes.ListType{ - ElemType: PipelineStateInfo{}.Type(ctx), + ElemType: PipelineStateInfo_SdkV2{}.Type(ctx), }, }, } @@ -2661,7 +2661,7 @@ func (o ListUpdatesResponse_SdkV2) Type(ctx context.Context) attr.Type { "next_page_token": types.StringType, "prev_page_token": types.StringType, "updates": basetypes.ListType{ - ElemType: UpdateInfo{}.Type(ctx), + ElemType: UpdateInfo_SdkV2{}.Type(ctx), }, }, } @@ -3095,7 +3095,7 @@ func (o PipelineAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: PipelinePermission{}.Type(ctx), + ElemType: PipelinePermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -3291,16 +3291,16 @@ func (o PipelineCluster_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "apply_policy_default_values": types.BoolType, "autoscale": basetypes.ListType{ - ElemType: PipelineClusterAutoscale{}.Type(ctx), + ElemType: PipelineClusterAutoscale_SdkV2{}.Type(ctx), }, "aws_attributes": basetypes.ListType{ - ElemType: compute_tf.AwsAttributes{}.Type(ctx), + ElemType: compute_tf.AwsAttributes_SdkV2{}.Type(ctx), }, "azure_attributes": basetypes.ListType{ - ElemType: compute_tf.AzureAttributes{}.Type(ctx), + ElemType: compute_tf.AzureAttributes_SdkV2{}.Type(ctx), }, "cluster_log_conf": basetypes.ListType{ - ElemType: compute_tf.ClusterLogConf{}.Type(ctx), + ElemType: compute_tf.ClusterLogConf_SdkV2{}.Type(ctx), }, "custom_tags": basetypes.MapType{ ElemType: types.StringType, @@ -3309,10 +3309,10 @@ func (o PipelineCluster_SdkV2) Type(ctx context.Context) attr.Type { "driver_node_type_id": types.StringType, "enable_local_disk_encryption": types.BoolType, "gcp_attributes": basetypes.ListType{ - ElemType: compute_tf.GcpAttributes{}.Type(ctx), + ElemType: compute_tf.GcpAttributes_SdkV2{}.Type(ctx), }, "init_scripts": basetypes.ListType{ - ElemType: compute_tf.InitScriptInfo{}.Type(ctx), + ElemType: compute_tf.InitScriptInfo_SdkV2{}.Type(ctx), }, "instance_pool_id": types.StringType, "label": types.StringType, @@ -3761,7 +3761,7 @@ func (o PipelineEvent_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "error": basetypes.ListType{ - ElemType: ErrorDetail{}.Type(ctx), + ElemType: ErrorDetail_SdkV2{}.Type(ctx), }, "event_type": types.StringType, "id": types.StringType, @@ -3769,10 +3769,10 @@ func (o PipelineEvent_SdkV2) Type(ctx context.Context) attr.Type { "maturity_level": types.StringType, "message": types.StringType, "origin": basetypes.ListType{ - ElemType: Origin{}.Type(ctx), + ElemType: Origin_SdkV2{}.Type(ctx), }, "sequence": basetypes.ListType{ - ElemType: Sequencing{}.Type(ctx), + ElemType: Sequencing_SdkV2{}.Type(ctx), }, "timestamp": types.StringType, }, @@ -3913,14 +3913,14 @@ func (o PipelineLibrary_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "file": basetypes.ListType{ - ElemType: FileLibrary{}.Type(ctx), + ElemType: FileLibrary_SdkV2{}.Type(ctx), }, "jar": types.StringType, "maven": basetypes.ListType{ - ElemType: compute_tf.MavenLibrary{}.Type(ctx), + ElemType: compute_tf.MavenLibrary_SdkV2{}.Type(ctx), }, "notebook": basetypes.ListType{ - ElemType: NotebookLibrary{}.Type(ctx), + ElemType: NotebookLibrary_SdkV2{}.Type(ctx), }, "whl": types.StringType, }, @@ -4129,7 +4129,7 @@ func (o PipelinePermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: PipelineAccessControlResponse{}.Type(ctx), + ElemType: PipelineAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -4250,7 +4250,7 @@ func (o PipelinePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: PipelineAccessControlRequest{}.Type(ctx), + ElemType: PipelineAccessControlRequest_SdkV2{}.Type(ctx), }, "pipeline_id": types.StringType, }, @@ -4410,44 +4410,44 @@ func (o PipelineSpec_SdkV2) Type(ctx context.Context) attr.Type { "catalog": types.StringType, "channel": types.StringType, "clusters": basetypes.ListType{ - ElemType: PipelineCluster{}.Type(ctx), + ElemType: PipelineCluster_SdkV2{}.Type(ctx), }, "configuration": basetypes.MapType{ ElemType: types.StringType, }, "continuous": types.BoolType, "deployment": basetypes.ListType{ - ElemType: PipelineDeployment{}.Type(ctx), + ElemType: PipelineDeployment_SdkV2{}.Type(ctx), }, "development": types.BoolType, "edition": types.StringType, "filters": basetypes.ListType{ - ElemType: Filters{}.Type(ctx), + ElemType: Filters_SdkV2{}.Type(ctx), }, "gateway_definition": basetypes.ListType{ - ElemType: IngestionGatewayPipelineDefinition{}.Type(ctx), + ElemType: IngestionGatewayPipelineDefinition_SdkV2{}.Type(ctx), }, "id": types.StringType, "ingestion_definition": basetypes.ListType{ - ElemType: IngestionPipelineDefinition{}.Type(ctx), + ElemType: IngestionPipelineDefinition_SdkV2{}.Type(ctx), }, "libraries": basetypes.ListType{ - ElemType: PipelineLibrary{}.Type(ctx), + ElemType: PipelineLibrary_SdkV2{}.Type(ctx), }, "name": types.StringType, "notifications": basetypes.ListType{ - ElemType: Notifications{}.Type(ctx), + ElemType: Notifications_SdkV2{}.Type(ctx), }, "photon": types.BoolType, "restart_window": basetypes.ListType{ - ElemType: RestartWindow{}.Type(ctx), + ElemType: RestartWindow_SdkV2{}.Type(ctx), }, "schema": types.StringType, "serverless": types.BoolType, "storage": types.StringType, "target": types.StringType, "trigger": basetypes.ListType{ - ElemType: PipelineTrigger{}.Type(ctx), + ElemType: PipelineTrigger_SdkV2{}.Type(ctx), }, }, } @@ -4779,7 +4779,7 @@ func (o PipelineStateInfo_SdkV2) Type(ctx context.Context) attr.Type { "creator_user_name": types.StringType, "health": types.StringType, "latest_updates": basetypes.ListType{ - ElemType: UpdateStateInfo{}.Type(ctx), + ElemType: UpdateStateInfo_SdkV2{}.Type(ctx), }, "name": types.StringType, "pipeline_id": types.StringType, @@ -4858,10 +4858,10 @@ func (o PipelineTrigger_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "cron": basetypes.ListType{ - ElemType: CronTrigger{}.Type(ctx), + ElemType: CronTrigger_SdkV2{}.Type(ctx), }, "manual": basetypes.ListType{ - ElemType: ManualTrigger{}.Type(ctx), + ElemType: ManualTrigger_SdkV2{}.Type(ctx), }, }, } @@ -4978,7 +4978,7 @@ func (o ReportSpec_SdkV2) Type(ctx context.Context) attr.Type { "destination_table": types.StringType, "source_url": types.StringType, "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), + ElemType: TableSpecificConfig_SdkV2{}.Type(ctx), }, }, } @@ -5157,7 +5157,7 @@ func (o SchemaSpec_SdkV2) Type(ctx context.Context) attr.Type { "source_catalog": types.StringType, "source_schema": types.StringType, "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), + ElemType: TableSpecificConfig_SdkV2{}.Type(ctx), }, }, } @@ -5233,7 +5233,7 @@ func (o Sequencing_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "control_plane_seq_no": types.Int64Type, "data_plane_id": basetypes.ListType{ - ElemType: DataPlaneId{}.Type(ctx), + ElemType: DataPlaneId_SdkV2{}.Type(ctx), }, }, } @@ -5313,7 +5313,7 @@ func (o SerializedException_SdkV2) Type(ctx context.Context) attr.Type { "class_name": types.StringType, "message": types.StringType, "stack": basetypes.ListType{ - ElemType: StackFrame{}.Type(ctx), + ElemType: StackFrame_SdkV2{}.Type(ctx), }, }, } @@ -5713,7 +5713,7 @@ func (o TableSpec_SdkV2) Type(ctx context.Context) attr.Type { "source_schema": types.StringType, "source_table": types.StringType, "table_configuration": basetypes.ListType{ - ElemType: TableSpecificConfig{}.Type(ctx), + ElemType: TableSpecificConfig_SdkV2{}.Type(ctx), }, }, } @@ -5943,7 +5943,7 @@ func (o UpdateInfo_SdkV2) Type(ctx context.Context) attr.Type { "cause": types.StringType, "cluster_id": types.StringType, "config": basetypes.ListType{ - ElemType: PipelineSpec{}.Type(ctx), + ElemType: PipelineSpec_SdkV2{}.Type(ctx), }, "creation_time": types.Int64Type, "full_refresh": types.BoolType, diff --git a/internal/service/provisioning_tf/legacy_model.go b/internal/service/provisioning_tf/legacy_model.go index f428ad9b4..0acd5d338 100755 --- a/internal/service/provisioning_tf/legacy_model.go +++ b/internal/service/provisioning_tf/legacy_model.go @@ -60,7 +60,7 @@ func (o AwsCredentials_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "sts_role": basetypes.ListType{ - ElemType: StsRole{}.Type(ctx), + ElemType: StsRole_SdkV2{}.Type(ctx), }, }, } @@ -236,7 +236,7 @@ func (o CloudResourceContainer_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "gcp": basetypes.ListType{ - ElemType: CustomerFacingGcpCloudResourceContainer{}.Type(ctx), + ElemType: CustomerFacingGcpCloudResourceContainer_SdkV2{}.Type(ctx), }, }, } @@ -361,7 +361,7 @@ func (o CreateCredentialAwsCredentials_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "sts_role": basetypes.ListType{ - ElemType: CreateCredentialStsRole{}.Type(ctx), + ElemType: CreateCredentialStsRole_SdkV2{}.Type(ctx), }, }, } @@ -435,7 +435,7 @@ func (o CreateCredentialRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_credentials": basetypes.ListType{ - ElemType: CreateCredentialAwsCredentials{}.Type(ctx), + ElemType: CreateCredentialAwsCredentials_SdkV2{}.Type(ctx), }, "credentials_name": types.StringType, }, @@ -557,10 +557,10 @@ func (o CreateCustomerManagedKeyRequest_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_key_info": basetypes.ListType{ - ElemType: CreateAwsKeyInfo{}.Type(ctx), + ElemType: CreateAwsKeyInfo_SdkV2{}.Type(ctx), }, "gcp_key_info": basetypes.ListType{ - ElemType: CreateGcpKeyInfo{}.Type(ctx), + ElemType: CreateGcpKeyInfo_SdkV2{}.Type(ctx), }, "use_cases": basetypes.ListType{ ElemType: types.StringType, @@ -754,7 +754,7 @@ func (o CreateNetworkRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "gcp_network_info": basetypes.ListType{ - ElemType: GcpNetworkInfo{}.Type(ctx), + ElemType: GcpNetworkInfo_SdkV2{}.Type(ctx), }, "network_name": types.StringType, "security_group_ids": basetypes.ListType{ @@ -764,7 +764,7 @@ func (o CreateNetworkRequest_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "vpc_endpoints": basetypes.ListType{ - ElemType: NetworkVpcEndpoints{}.Type(ctx), + ElemType: NetworkVpcEndpoints_SdkV2{}.Type(ctx), }, "vpc_id": types.StringType, }, @@ -918,7 +918,7 @@ func (o CreateStorageConfigurationRequest_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "root_bucket_info": basetypes.ListType{ - ElemType: RootBucketInfo{}.Type(ctx), + ElemType: RootBucketInfo_SdkV2{}.Type(ctx), }, "storage_configuration_name": types.StringType, }, @@ -1002,7 +1002,7 @@ func (o CreateVpcEndpointRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "aws_vpc_endpoint_id": types.StringType, "gcp_vpc_endpoint_info": basetypes.ListType{ - ElemType: GcpVpcEndpointInfo{}.Type(ctx), + ElemType: GcpVpcEndpointInfo_SdkV2{}.Type(ctx), }, "region": types.StringType, "vpc_endpoint_name": types.StringType, @@ -1205,7 +1205,7 @@ func (o CreateWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { "aws_region": types.StringType, "cloud": types.StringType, "cloud_resource_container": basetypes.ListType{ - ElemType: CloudResourceContainer{}.Type(ctx), + ElemType: CloudResourceContainer_SdkV2{}.Type(ctx), }, "credentials_id": types.StringType, "custom_tags": basetypes.MapType{ @@ -1213,10 +1213,10 @@ func (o CreateWorkspaceRequest_SdkV2) Type(ctx context.Context) attr.Type { }, "deployment_name": types.StringType, "gcp_managed_network_config": basetypes.ListType{ - ElemType: GcpManagedNetworkConfig{}.Type(ctx), + ElemType: GcpManagedNetworkConfig_SdkV2{}.Type(ctx), }, "gke_config": basetypes.ListType{ - ElemType: GkeConfig{}.Type(ctx), + ElemType: GkeConfig_SdkV2{}.Type(ctx), }, "is_no_public_ip_enabled": types.BoolType, "location": types.StringType, @@ -1388,7 +1388,7 @@ func (o Credential_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "account_id": types.StringType, "aws_credentials": basetypes.ListType{ - ElemType: AwsCredentials{}.Type(ctx), + ElemType: AwsCredentials_SdkV2{}.Type(ctx), }, "creation_time": types.Int64Type, "credentials_id": types.StringType, @@ -1525,12 +1525,12 @@ func (o CustomerManagedKey_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "account_id": types.StringType, "aws_key_info": basetypes.ListType{ - ElemType: AwsKeyInfo{}.Type(ctx), + ElemType: AwsKeyInfo_SdkV2{}.Type(ctx), }, "creation_time": types.Int64Type, "customer_managed_key_id": types.StringType, "gcp_key_info": basetypes.ListType{ - ElemType: GcpKeyInfo{}.Type(ctx), + ElemType: GcpKeyInfo_SdkV2{}.Type(ctx), }, "use_cases": basetypes.ListType{ ElemType: types.StringType, @@ -2701,10 +2701,10 @@ func (o Network_SdkV2) Type(ctx context.Context) attr.Type { "account_id": types.StringType, "creation_time": types.Int64Type, "error_messages": basetypes.ListType{ - ElemType: NetworkHealth{}.Type(ctx), + ElemType: NetworkHealth_SdkV2{}.Type(ctx), }, "gcp_network_info": basetypes.ListType{ - ElemType: GcpNetworkInfo{}.Type(ctx), + ElemType: GcpNetworkInfo_SdkV2{}.Type(ctx), }, "network_id": types.StringType, "network_name": types.StringType, @@ -2715,12 +2715,12 @@ func (o Network_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "vpc_endpoints": basetypes.ListType{ - ElemType: NetworkVpcEndpoints{}.Type(ctx), + ElemType: NetworkVpcEndpoints_SdkV2{}.Type(ctx), }, "vpc_id": types.StringType, "vpc_status": types.StringType, "warning_messages": basetypes.ListType{ - ElemType: NetworkWarning{}.Type(ctx), + ElemType: NetworkWarning_SdkV2{}.Type(ctx), }, "workspace_id": types.Int64Type, }, @@ -3327,7 +3327,7 @@ func (o StorageConfiguration_SdkV2) Type(ctx context.Context) attr.Type { "account_id": types.StringType, "creation_time": types.Int64Type, "root_bucket_info": basetypes.ListType{ - ElemType: RootBucketInfo{}.Type(ctx), + ElemType: RootBucketInfo_SdkV2{}.Type(ctx), }, "storage_configuration_id": types.StringType, "storage_configuration_name": types.StringType, @@ -3765,7 +3765,7 @@ func (o VpcEndpoint_SdkV2) Type(ctx context.Context) attr.Type { "aws_endpoint_service_id": types.StringType, "aws_vpc_endpoint_id": types.StringType, "gcp_vpc_endpoint_info": basetypes.ListType{ - ElemType: GcpVpcEndpointInfo{}.Type(ctx), + ElemType: GcpVpcEndpointInfo_SdkV2{}.Type(ctx), }, "region": types.StringType, "state": types.StringType, @@ -3967,11 +3967,11 @@ func (o Workspace_SdkV2) Type(ctx context.Context) attr.Type { "account_id": types.StringType, "aws_region": types.StringType, "azure_workspace_info": basetypes.ListType{ - ElemType: AzureWorkspaceInfo{}.Type(ctx), + ElemType: AzureWorkspaceInfo_SdkV2{}.Type(ctx), }, "cloud": types.StringType, "cloud_resource_container": basetypes.ListType{ - ElemType: CloudResourceContainer{}.Type(ctx), + ElemType: CloudResourceContainer_SdkV2{}.Type(ctx), }, "creation_time": types.Int64Type, "credentials_id": types.StringType, @@ -3980,13 +3980,13 @@ func (o Workspace_SdkV2) Type(ctx context.Context) attr.Type { }, "deployment_name": types.StringType, "external_customer_info": basetypes.ListType{ - ElemType: ExternalCustomerInfo{}.Type(ctx), + ElemType: ExternalCustomerInfo_SdkV2{}.Type(ctx), }, "gcp_managed_network_config": basetypes.ListType{ - ElemType: GcpManagedNetworkConfig{}.Type(ctx), + ElemType: GcpManagedNetworkConfig_SdkV2{}.Type(ctx), }, "gke_config": basetypes.ListType{ - ElemType: GkeConfig{}.Type(ctx), + ElemType: GkeConfig_SdkV2{}.Type(ctx), }, "is_no_public_ip_enabled": types.BoolType, "location": types.StringType, diff --git a/internal/service/serving_tf/legacy_model.go b/internal/service/serving_tf/legacy_model.go index df5bd8eb4..faa0dbe8e 100755 --- a/internal/service/serving_tf/legacy_model.go +++ b/internal/service/serving_tf/legacy_model.go @@ -131,16 +131,16 @@ func (o AiGatewayConfig_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), + ElemType: AiGatewayGuardrails_SdkV2{}.Type(ctx), }, "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + ElemType: AiGatewayInferenceTableConfig_SdkV2{}.Type(ctx), }, "rate_limits": basetypes.ListType{ - ElemType: AiGatewayRateLimit{}.Type(ctx), + ElemType: AiGatewayRateLimit_SdkV2{}.Type(ctx), }, "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + ElemType: AiGatewayUsageTrackingConfig_SdkV2{}.Type(ctx), }, }, } @@ -306,7 +306,7 @@ func (o AiGatewayGuardrailParameters_SdkV2) Type(ctx context.Context) attr.Type ElemType: types.StringType, }, "pii": basetypes.ListType{ - ElemType: AiGatewayGuardrailPiiBehavior{}.Type(ctx), + ElemType: AiGatewayGuardrailPiiBehavior_SdkV2{}.Type(ctx), }, "safety": types.BoolType, "valid_topics": basetypes.ListType{ @@ -485,10 +485,10 @@ func (o AiGatewayGuardrails_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "input": basetypes.ListType{ - ElemType: AiGatewayGuardrailParameters{}.Type(ctx), + ElemType: AiGatewayGuardrailParameters_SdkV2{}.Type(ctx), }, "output": basetypes.ListType{ - ElemType: AiGatewayGuardrailParameters{}.Type(ctx), + ElemType: AiGatewayGuardrailParameters_SdkV2{}.Type(ctx), }, }, } @@ -945,7 +945,7 @@ func (o AutoCaptureConfigOutput_SdkV2) Type(ctx context.Context) attr.Type { "enabled": types.BoolType, "schema_name": types.StringType, "state": basetypes.ListType{ - ElemType: AutoCaptureState{}.Type(ctx), + ElemType: AutoCaptureState_SdkV2{}.Type(ctx), }, "table_name_prefix": types.StringType, }, @@ -1017,7 +1017,7 @@ func (o AutoCaptureState_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "payload_table": basetypes.ListType{ - ElemType: PayloadTable{}.Type(ctx), + ElemType: PayloadTable_SdkV2{}.Type(ctx), }, }, } @@ -1306,18 +1306,18 @@ func (o CreateServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), + ElemType: AiGatewayConfig_SdkV2{}.Type(ctx), }, "config": basetypes.ListType{ - ElemType: EndpointCoreConfigInput{}.Type(ctx), + ElemType: EndpointCoreConfigInput_SdkV2{}.Type(ctx), }, "name": types.StringType, "rate_limits": basetypes.ListType{ - ElemType: RateLimit{}.Type(ctx), + ElemType: RateLimit_SdkV2{}.Type(ctx), }, "route_optimized": types.BoolType, "tags": basetypes.ListType{ - ElemType: EndpointTag{}.Type(ctx), + ElemType: EndpointTag_SdkV2{}.Type(ctx), }, }, } @@ -1842,17 +1842,17 @@ func (o EndpointCoreConfigInput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigInput{}.Type(ctx), + ElemType: AutoCaptureConfigInput_SdkV2{}.Type(ctx), }, "name": types.StringType, "served_entities": basetypes.ListType{ - ElemType: ServedEntityInput{}.Type(ctx), + ElemType: ServedEntityInput_SdkV2{}.Type(ctx), }, "served_models": basetypes.ListType{ - ElemType: ServedModelInput{}.Type(ctx), + ElemType: ServedModelInput_SdkV2{}.Type(ctx), }, "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), + ElemType: TrafficConfig_SdkV2{}.Type(ctx), }, }, } @@ -2019,17 +2019,17 @@ func (o EndpointCoreConfigOutput_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigOutput{}.Type(ctx), + ElemType: AutoCaptureConfigOutput_SdkV2{}.Type(ctx), }, "config_version": types.Int64Type, "served_entities": basetypes.ListType{ - ElemType: ServedEntityOutput{}.Type(ctx), + ElemType: ServedEntityOutput_SdkV2{}.Type(ctx), }, "served_models": basetypes.ListType{ - ElemType: ServedModelOutput{}.Type(ctx), + ElemType: ServedModelOutput_SdkV2{}.Type(ctx), }, "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), + ElemType: TrafficConfig_SdkV2{}.Type(ctx), }, }, } @@ -2184,10 +2184,10 @@ func (o EndpointCoreConfigSummary_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "served_entities": basetypes.ListType{ - ElemType: ServedEntitySpec{}.Type(ctx), + ElemType: ServedEntitySpec_SdkV2{}.Type(ctx), }, "served_models": basetypes.ListType{ - ElemType: ServedModelSpec{}.Type(ctx), + ElemType: ServedModelSpec_SdkV2{}.Type(ctx), }, }, } @@ -2307,18 +2307,18 @@ func (o EndpointPendingConfig_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "auto_capture_config": basetypes.ListType{ - ElemType: AutoCaptureConfigOutput{}.Type(ctx), + ElemType: AutoCaptureConfigOutput_SdkV2{}.Type(ctx), }, "config_version": types.Int64Type, "served_entities": basetypes.ListType{ - ElemType: ServedEntityOutput{}.Type(ctx), + ElemType: ServedEntityOutput_SdkV2{}.Type(ctx), }, "served_models": basetypes.ListType{ - ElemType: ServedModelOutput{}.Type(ctx), + ElemType: ServedModelOutput_SdkV2{}.Type(ctx), }, "start_time": types.Int64Type, "traffic_config": basetypes.ListType{ - ElemType: TrafficConfig{}.Type(ctx), + ElemType: TrafficConfig_SdkV2{}.Type(ctx), }, }, } @@ -2694,29 +2694,29 @@ func (o ExternalModel_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ai21labs_config": basetypes.ListType{ - ElemType: Ai21LabsConfig{}.Type(ctx), + ElemType: Ai21LabsConfig_SdkV2{}.Type(ctx), }, "amazon_bedrock_config": basetypes.ListType{ - ElemType: AmazonBedrockConfig{}.Type(ctx), + ElemType: AmazonBedrockConfig_SdkV2{}.Type(ctx), }, "anthropic_config": basetypes.ListType{ - ElemType: AnthropicConfig{}.Type(ctx), + ElemType: AnthropicConfig_SdkV2{}.Type(ctx), }, "cohere_config": basetypes.ListType{ - ElemType: CohereConfig{}.Type(ctx), + ElemType: CohereConfig_SdkV2{}.Type(ctx), }, "databricks_model_serving_config": basetypes.ListType{ - ElemType: DatabricksModelServingConfig{}.Type(ctx), + ElemType: DatabricksModelServingConfig_SdkV2{}.Type(ctx), }, "google_cloud_vertex_ai_config": basetypes.ListType{ - ElemType: GoogleCloudVertexAiConfig{}.Type(ctx), + ElemType: GoogleCloudVertexAiConfig_SdkV2{}.Type(ctx), }, "name": types.StringType, "openai_config": basetypes.ListType{ - ElemType: OpenAiConfig{}.Type(ctx), + ElemType: OpenAiConfig_SdkV2{}.Type(ctx), }, "palm_config": basetypes.ListType{ - ElemType: PaLmConfig{}.Type(ctx), + ElemType: PaLmConfig_SdkV2{}.Type(ctx), }, "provider": types.StringType, "task": types.StringType, @@ -3201,7 +3201,7 @@ func (o GetServingEndpointPermissionLevelsResponse_SdkV2) Type(ctx context.Conte return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: ServingEndpointPermissionsDescription{}.Type(ctx), + ElemType: ServingEndpointPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -3432,7 +3432,7 @@ func (o ListEndpointsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "endpoints": basetypes.ListType{ - ElemType: ServingEndpoint{}.Type(ctx), + ElemType: ServingEndpoint_SdkV2{}.Type(ctx), }, }, } @@ -3553,7 +3553,7 @@ func (o ModelDataPlaneInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "query_info": basetypes.ListType{ - ElemType: oauth2_tf.DataPlaneInfo{}.Type(ctx), + ElemType: oauth2_tf.DataPlaneInfo_SdkV2{}.Type(ctx), }, }, } @@ -3796,7 +3796,7 @@ func (o PatchServingEndpointTags_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "add_tags": basetypes.ListType{ - ElemType: EndpointTag{}.Type(ctx), + ElemType: EndpointTag_SdkV2{}.Type(ctx), }, "delete_tags": basetypes.ListType{ ElemType: types.StringType, @@ -3970,17 +3970,17 @@ func (o PutAiGatewayRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), + ElemType: AiGatewayGuardrails_SdkV2{}.Type(ctx), }, "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + ElemType: AiGatewayInferenceTableConfig_SdkV2{}.Type(ctx), }, "name": types.StringType, "rate_limits": basetypes.ListType{ - ElemType: AiGatewayRateLimit{}.Type(ctx), + ElemType: AiGatewayRateLimit_SdkV2{}.Type(ctx), }, "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + ElemType: AiGatewayUsageTrackingConfig_SdkV2{}.Type(ctx), }, }, } @@ -4147,16 +4147,16 @@ func (o PutAiGatewayResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "guardrails": basetypes.ListType{ - ElemType: AiGatewayGuardrails{}.Type(ctx), + ElemType: AiGatewayGuardrails_SdkV2{}.Type(ctx), }, "inference_table_config": basetypes.ListType{ - ElemType: AiGatewayInferenceTableConfig{}.Type(ctx), + ElemType: AiGatewayInferenceTableConfig_SdkV2{}.Type(ctx), }, "rate_limits": basetypes.ListType{ - ElemType: AiGatewayRateLimit{}.Type(ctx), + ElemType: AiGatewayRateLimit_SdkV2{}.Type(ctx), }, "usage_tracking_config": basetypes.ListType{ - ElemType: AiGatewayUsageTrackingConfig{}.Type(ctx), + ElemType: AiGatewayUsageTrackingConfig_SdkV2{}.Type(ctx), }, }, } @@ -4312,7 +4312,7 @@ func (o PutRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "name": types.StringType, "rate_limits": basetypes.ListType{ - ElemType: RateLimit{}.Type(ctx), + ElemType: RateLimit_SdkV2{}.Type(ctx), }, }, } @@ -4384,7 +4384,7 @@ func (o PutResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "rate_limits": basetypes.ListType{ - ElemType: RateLimit{}.Type(ctx), + ElemType: RateLimit_SdkV2{}.Type(ctx), }, }, } @@ -4524,7 +4524,7 @@ func (o QueryEndpointInput_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.ObjectType{}, }, "dataframe_split": basetypes.ListType{ - ElemType: DataframeSplitInput{}.Type(ctx), + ElemType: DataframeSplitInput_SdkV2{}.Type(ctx), }, "extra_params": basetypes.MapType{ ElemType: types.StringType, @@ -4536,7 +4536,7 @@ func (o QueryEndpointInput_SdkV2) Type(ctx context.Context) attr.Type { }, "max_tokens": types.Int64Type, "messages": basetypes.ListType{ - ElemType: ChatMessage{}.Type(ctx), + ElemType: ChatMessage_SdkV2{}.Type(ctx), }, "n": types.Int64Type, "name": types.StringType, @@ -4783,11 +4783,11 @@ func (o QueryEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "choices": basetypes.ListType{ - ElemType: V1ResponseChoiceElement{}.Type(ctx), + ElemType: V1ResponseChoiceElement_SdkV2{}.Type(ctx), }, "created": types.Int64Type, "data": basetypes.ListType{ - ElemType: EmbeddingsV1ResponseEmbeddingElement{}.Type(ctx), + ElemType: EmbeddingsV1ResponseEmbeddingElement_SdkV2{}.Type(ctx), }, "id": types.StringType, "model": types.StringType, @@ -4797,7 +4797,7 @@ func (o QueryEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { }, "served-model-name": types.StringType, "usage": basetypes.ListType{ - ElemType: ExternalModelUsageElement{}.Type(ctx), + ElemType: ExternalModelUsageElement_SdkV2{}.Type(ctx), }, }, } @@ -5120,7 +5120,7 @@ func (o ServedEntityInput_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), + ElemType: ExternalModel_SdkV2{}.Type(ctx), }, "instance_profile_arn": types.StringType, "max_provisioned_throughput": types.Int64Type, @@ -5307,10 +5307,10 @@ func (o ServedEntityOutput_SdkV2) Type(ctx context.Context) attr.Type { ElemType: types.StringType, }, "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), + ElemType: ExternalModel_SdkV2{}.Type(ctx), }, "foundation_model": basetypes.ListType{ - ElemType: FoundationModel{}.Type(ctx), + ElemType: FoundationModel_SdkV2{}.Type(ctx), }, "instance_profile_arn": types.StringType, "max_provisioned_throughput": types.Int64Type, @@ -5318,7 +5318,7 @@ func (o ServedEntityOutput_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "scale_to_zero_enabled": types.BoolType, "state": basetypes.ListType{ - ElemType: ServedModelState{}.Type(ctx), + ElemType: ServedModelState_SdkV2{}.Type(ctx), }, "workload_size": types.StringType, "workload_type": types.StringType, @@ -5494,10 +5494,10 @@ func (o ServedEntitySpec_SdkV2) Type(ctx context.Context) attr.Type { "entity_name": types.StringType, "entity_version": types.StringType, "external_model": basetypes.ListType{ - ElemType: ExternalModel{}.Type(ctx), + ElemType: ExternalModel_SdkV2{}.Type(ctx), }, "foundation_model": basetypes.ListType{ - ElemType: FoundationModel{}.Type(ctx), + ElemType: FoundationModel_SdkV2{}.Type(ctx), }, "name": types.StringType, }, @@ -5791,7 +5791,7 @@ func (o ServedModelOutput_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "scale_to_zero_enabled": types.BoolType, "state": basetypes.ListType{ - ElemType: ServedModelState{}.Type(ctx), + ElemType: ServedModelState_SdkV2{}.Type(ctx), }, "workload_size": types.StringType, "workload_type": types.StringType, @@ -6075,10 +6075,10 @@ func (o ServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), + ElemType: AiGatewayConfig_SdkV2{}.Type(ctx), }, "config": basetypes.ListType{ - ElemType: EndpointCoreConfigSummary{}.Type(ctx), + ElemType: EndpointCoreConfigSummary_SdkV2{}.Type(ctx), }, "creation_timestamp": types.Int64Type, "creator": types.StringType, @@ -6086,10 +6086,10 @@ func (o ServingEndpoint_SdkV2) Type(ctx context.Context) attr.Type { "last_updated_timestamp": types.Int64Type, "name": types.StringType, "state": basetypes.ListType{ - ElemType: EndpointState{}.Type(ctx), + ElemType: EndpointState_SdkV2{}.Type(ctx), }, "tags": basetypes.ListType{ - ElemType: EndpointTag{}.Type(ctx), + ElemType: EndpointTag_SdkV2{}.Type(ctx), }, "task": types.StringType, }, @@ -6306,7 +6306,7 @@ func (o ServingEndpointAccessControlResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: ServingEndpointPermission{}.Type(ctx), + ElemType: ServingEndpointPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -6432,30 +6432,30 @@ func (o ServingEndpointDetailed_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ai_gateway": basetypes.ListType{ - ElemType: AiGatewayConfig{}.Type(ctx), + ElemType: AiGatewayConfig_SdkV2{}.Type(ctx), }, "config": basetypes.ListType{ - ElemType: EndpointCoreConfigOutput{}.Type(ctx), + ElemType: EndpointCoreConfigOutput_SdkV2{}.Type(ctx), }, "creation_timestamp": types.Int64Type, "creator": types.StringType, "data_plane_info": basetypes.ListType{ - ElemType: ModelDataPlaneInfo{}.Type(ctx), + ElemType: ModelDataPlaneInfo_SdkV2{}.Type(ctx), }, "endpoint_url": types.StringType, "id": types.StringType, "last_updated_timestamp": types.Int64Type, "name": types.StringType, "pending_config": basetypes.ListType{ - ElemType: EndpointPendingConfig{}.Type(ctx), + ElemType: EndpointPendingConfig_SdkV2{}.Type(ctx), }, "permission_level": types.StringType, "route_optimized": types.BoolType, "state": basetypes.ListType{ - ElemType: EndpointState{}.Type(ctx), + ElemType: EndpointState_SdkV2{}.Type(ctx), }, "tags": basetypes.ListType{ - ElemType: EndpointTag{}.Type(ctx), + ElemType: EndpointTag_SdkV2{}.Type(ctx), }, "task": types.StringType, }, @@ -6742,7 +6742,7 @@ func (o ServingEndpointPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ServingEndpointAccessControlResponse{}.Type(ctx), + ElemType: ServingEndpointAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -6863,7 +6863,7 @@ func (o ServingEndpointPermissionsRequest_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: ServingEndpointAccessControlRequest{}.Type(ctx), + ElemType: ServingEndpointAccessControlRequest_SdkV2{}.Type(ctx), }, "serving_endpoint_id": types.StringType, }, @@ -6936,7 +6936,7 @@ func (o TrafficConfig_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "routes": basetypes.ListType{ - ElemType: Route{}.Type(ctx), + ElemType: Route_SdkV2{}.Type(ctx), }, }, } @@ -7023,7 +7023,7 @@ func (o V1ResponseChoiceElement_SdkV2) Type(ctx context.Context) attr.Type { "index": types.Int64Type, "logprobs": types.Int64Type, "message": basetypes.ListType{ - ElemType: ChatMessage{}.Type(ctx), + ElemType: ChatMessage_SdkV2{}.Type(ctx), }, "text": types.StringType, }, diff --git a/internal/service/settings_tf/legacy_model.go b/internal/service/settings_tf/legacy_model.go index d6349566c..15b2e7a38 100755 --- a/internal/service/settings_tf/legacy_model.go +++ b/internal/service/settings_tf/legacy_model.go @@ -117,7 +117,7 @@ func (o AibiDashboardEmbeddingAccessPolicySetting_SdkV2) Type(ctx context.Contex return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aibi_dashboard_embedding_access_policy": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingAccessPolicy{}.Type(ctx), + ElemType: AibiDashboardEmbeddingAccessPolicy_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -277,7 +277,7 @@ func (o AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2) Type(ctx context.Con return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aibi_dashboard_embedding_approved_domains": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingApprovedDomains{}.Type(ctx), + ElemType: AibiDashboardEmbeddingApprovedDomains_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -366,7 +366,7 @@ func (o AutomaticClusterUpdateSetting_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "automatic_cluster_update_workspace": basetypes.ListType{ - ElemType: ClusterAutoRestartMessage{}.Type(ctx), + ElemType: ClusterAutoRestartMessage_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -500,10 +500,10 @@ func (o ClusterAutoRestartMessage_SdkV2) Type(ctx context.Context) attr.Type { "can_toggle": types.BoolType, "enabled": types.BoolType, "enablement_details": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageEnablementDetails{}.Type(ctx), + ElemType: ClusterAutoRestartMessageEnablementDetails_SdkV2{}.Type(ctx), }, "maintenance_window": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindow{}.Type(ctx), + ElemType: ClusterAutoRestartMessageMaintenanceWindow_SdkV2{}.Type(ctx), }, "restart_even_if_no_updates_available": types.BoolType, }, @@ -658,7 +658,7 @@ func (o ClusterAutoRestartMessageMaintenanceWindow_SdkV2) Type(ctx context.Conte return types.ObjectType{ AttrTypes: map[string]attr.Type{ "week_day_based_schedule": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{}.Type(ctx), + ElemType: ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2{}.Type(ctx), }, }, } @@ -737,7 +737,7 @@ func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule_SdkV2) Ty "day_of_week": types.StringType, "frequency": types.StringType, "window_start_time": basetypes.ListType{ - ElemType: ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{}.Type(ctx), + ElemType: ClusterAutoRestartMessageMaintenanceWindowWindowStartTime_SdkV2{}.Type(ctx), }, }, } @@ -947,7 +947,7 @@ func (o ComplianceSecurityProfileSetting_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "compliance_security_profile_workspace": basetypes.ListType{ - ElemType: ComplianceSecurityProfile{}.Type(ctx), + ElemType: ComplianceSecurityProfile_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -1036,19 +1036,19 @@ func (o Config_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "email": basetypes.ListType{ - ElemType: EmailConfig{}.Type(ctx), + ElemType: EmailConfig_SdkV2{}.Type(ctx), }, "generic_webhook": basetypes.ListType{ - ElemType: GenericWebhookConfig{}.Type(ctx), + ElemType: GenericWebhookConfig_SdkV2{}.Type(ctx), }, "microsoft_teams": basetypes.ListType{ - ElemType: MicrosoftTeamsConfig{}.Type(ctx), + ElemType: MicrosoftTeamsConfig_SdkV2{}.Type(ctx), }, "pagerduty": basetypes.ListType{ - ElemType: PagerdutyConfig{}.Type(ctx), + ElemType: PagerdutyConfig_SdkV2{}.Type(ctx), }, "slack": basetypes.ListType{ - ElemType: SlackConfig{}.Type(ctx), + ElemType: SlackConfig_SdkV2{}.Type(ctx), }, }, } @@ -1310,7 +1310,7 @@ func (o CreateIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), + ElemType: IpAccessListInfo_SdkV2{}.Type(ctx), }, }, } @@ -1437,7 +1437,7 @@ func (o CreateNotificationDestinationRequest_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), + ElemType: Config_SdkV2{}.Type(ctx), }, "display_name": types.StringType, }, @@ -1564,7 +1564,7 @@ func (o CreateOboTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "token_info": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), + ElemType: TokenInfo_SdkV2{}.Type(ctx), }, "token_value": types.StringType, }, @@ -1740,7 +1740,7 @@ func (o CreateTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "token_info": basetypes.ListType{ - ElemType: PublicTokenInfo{}.Type(ctx), + ElemType: PublicTokenInfo_SdkV2{}.Type(ctx), }, "token_value": types.StringType, }, @@ -1907,7 +1907,7 @@ func (o CspEnablementAccountSetting_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "csp_enablement_account": basetypes.ListType{ - ElemType: CspEnablementAccount{}.Type(ctx), + ElemType: CspEnablementAccount_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -2007,7 +2007,7 @@ func (o DefaultNamespaceSetting_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "etag": types.StringType, "namespace": basetypes.ListType{ - ElemType: StringMessage{}.Type(ctx), + ElemType: StringMessage_SdkV2{}.Type(ctx), }, "setting_name": types.StringType, }, @@ -3212,7 +3212,7 @@ func (o DisableLegacyAccess_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "disable_legacy_access": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), + ElemType: BooleanMessage_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -3301,7 +3301,7 @@ func (o DisableLegacyDbfs_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "disable_legacy_dbfs": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), + ElemType: BooleanMessage_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -3390,7 +3390,7 @@ func (o DisableLegacyFeatures_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "disable_legacy_features": basetypes.ListType{ - ElemType: BooleanMessage{}.Type(ctx), + ElemType: BooleanMessage_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -3468,7 +3468,7 @@ func (o EgressNetworkPolicy_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "internet_access": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicy{}.Type(ctx), + ElemType: EgressNetworkPolicyInternetAccessPolicy_SdkV2{}.Type(ctx), }, }, } @@ -3556,13 +3556,13 @@ func (o EgressNetworkPolicyInternetAccessPolicy_SdkV2) Type(ctx context.Context) return types.ObjectType{ AttrTypes: map[string]attr.Type{ "allowed_internet_destinations": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicyInternetDestination{}.Type(ctx), + ElemType: EgressNetworkPolicyInternetAccessPolicyInternetDestination_SdkV2{}.Type(ctx), }, "allowed_storage_destinations": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicyStorageDestination{}.Type(ctx), + ElemType: EgressNetworkPolicyInternetAccessPolicyStorageDestination_SdkV2{}.Type(ctx), }, "log_only_mode": basetypes.ListType{ - ElemType: EgressNetworkPolicyInternetAccessPolicyLogOnlyMode{}.Type(ctx), + ElemType: EgressNetworkPolicyInternetAccessPolicyLogOnlyMode_SdkV2{}.Type(ctx), }, "restriction_mode": types.StringType, }, @@ -4084,7 +4084,7 @@ func (o EnhancedSecurityMonitoringSetting_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "enhanced_security_monitoring_workspace": basetypes.ListType{ - ElemType: EnhancedSecurityMonitoring{}.Type(ctx), + ElemType: EnhancedSecurityMonitoring_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -4216,7 +4216,7 @@ func (o EsmEnablementAccountSetting_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "esm_enablement_account": basetypes.ListType{ - ElemType: EsmEnablementAccount{}.Type(ctx), + ElemType: EsmEnablementAccount_SdkV2{}.Type(ctx), }, "etag": types.StringType, "setting_name": types.StringType, @@ -4389,7 +4389,7 @@ func (o ExchangeTokenRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "partitionId": basetypes.ListType{ - ElemType: PartitionId{}.Type(ctx), + ElemType: PartitionId_SdkV2{}.Type(ctx), }, "scopes": basetypes.ListType{ ElemType: types.StringType, @@ -4519,7 +4519,7 @@ func (o ExchangeTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "values": basetypes.ListType{ - ElemType: ExchangeToken{}.Type(ctx), + ElemType: ExchangeToken_SdkV2{}.Type(ctx), }, }, } @@ -4592,7 +4592,7 @@ func (o FetchIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), + ElemType: IpAccessListInfo_SdkV2{}.Type(ctx), }, }, } @@ -5351,7 +5351,7 @@ func (o GetIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip_access_list": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), + ElemType: IpAccessListInfo_SdkV2{}.Type(ctx), }, }, } @@ -5423,7 +5423,7 @@ func (o GetIpAccessListsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip_access_lists": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), + ElemType: IpAccessListInfo_SdkV2{}.Type(ctx), }, }, } @@ -5810,7 +5810,7 @@ func (o GetTokenPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: TokenPermissionsDescription{}.Type(ctx), + ElemType: TokenPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -5882,7 +5882,7 @@ func (o GetTokenResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "token_info": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), + ElemType: TokenInfo_SdkV2{}.Type(ctx), }, }, } @@ -6068,7 +6068,7 @@ func (o ListIpAccessListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "ip_access_lists": basetypes.ListType{ - ElemType: IpAccessListInfo{}.Type(ctx), + ElemType: IpAccessListInfo_SdkV2{}.Type(ctx), }, }, } @@ -6143,7 +6143,7 @@ func (o ListNccAzurePrivateEndpointRulesResponse_SdkV2) Type(ctx context.Context return types.ObjectType{ AttrTypes: map[string]attr.Type{ "items": basetypes.ListType{ - ElemType: NccAzurePrivateEndpointRule{}.Type(ctx), + ElemType: NccAzurePrivateEndpointRule_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -6262,7 +6262,7 @@ func (o ListNetworkConnectivityConfigurationsResponse_SdkV2) Type(ctx context.Co return types.ObjectType{ AttrTypes: map[string]attr.Type{ "items": basetypes.ListType{ - ElemType: NetworkConnectivityConfiguration{}.Type(ctx), + ElemType: NetworkConnectivityConfiguration_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -6385,7 +6385,7 @@ func (o ListNotificationDestinationsResponse_SdkV2) Type(ctx context.Context) at AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "results": basetypes.ListType{ - ElemType: ListNotificationDestinationsResult{}.Type(ctx), + ElemType: ListNotificationDestinationsResult_SdkV2{}.Type(ctx), }, }, } @@ -6555,7 +6555,7 @@ func (o ListPublicTokensResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "token_infos": basetypes.ListType{ - ElemType: PublicTokenInfo{}.Type(ctx), + ElemType: PublicTokenInfo_SdkV2{}.Type(ctx), }, }, } @@ -6675,7 +6675,7 @@ func (o ListTokensResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "token_infos": basetypes.ListType{ - ElemType: TokenInfo{}.Type(ctx), + ElemType: TokenInfo_SdkV2{}.Type(ctx), }, }, } @@ -7083,10 +7083,10 @@ func (o NccEgressConfig_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "default_rules": basetypes.ListType{ - ElemType: NccEgressDefaultRules{}.Type(ctx), + ElemType: NccEgressDefaultRules_SdkV2{}.Type(ctx), }, "target_rules": basetypes.ListType{ - ElemType: NccEgressTargetRules{}.Type(ctx), + ElemType: NccEgressTargetRules_SdkV2{}.Type(ctx), }, }, } @@ -7195,10 +7195,10 @@ func (o NccEgressDefaultRules_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "aws_stable_ip_rule": basetypes.ListType{ - ElemType: NccAwsStableIpRule{}.Type(ctx), + ElemType: NccAwsStableIpRule_SdkV2{}.Type(ctx), }, "azure_service_endpoint_rule": basetypes.ListType{ - ElemType: NccAzureServiceEndpointRule{}.Type(ctx), + ElemType: NccAzureServiceEndpointRule_SdkV2{}.Type(ctx), }, }, } @@ -7297,7 +7297,7 @@ func (o NccEgressTargetRules_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "azure_private_endpoint_rules": basetypes.ListType{ - ElemType: NccAzurePrivateEndpointRule{}.Type(ctx), + ElemType: NccAzurePrivateEndpointRule_SdkV2{}.Type(ctx), }, }, } @@ -7395,7 +7395,7 @@ func (o NetworkConnectivityConfiguration_SdkV2) Type(ctx context.Context) attr.T "account_id": types.StringType, "creation_time": types.Int64Type, "egress_config": basetypes.ListType{ - ElemType: NccEgressConfig{}.Type(ctx), + ElemType: NccEgressConfig_SdkV2{}.Type(ctx), }, "name": types.StringType, "network_connectivity_config_id": types.StringType, @@ -7483,7 +7483,7 @@ func (o NotificationDestination_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), + ElemType: Config_SdkV2{}.Type(ctx), }, "destination_type": types.StringType, "display_name": types.StringType, @@ -7712,7 +7712,7 @@ func (o PersonalComputeSetting_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "etag": types.StringType, "personal_compute": basetypes.ListType{ - ElemType: PersonalComputeMessage{}.Type(ctx), + ElemType: PersonalComputeMessage_SdkV2{}.Type(ctx), }, "setting_name": types.StringType, }, @@ -8028,7 +8028,7 @@ func (o RestrictWorkspaceAdminsSetting_SdkV2) Type(ctx context.Context) attr.Typ AttrTypes: map[string]attr.Type{ "etag": types.StringType, "restrict_workspace_admins": basetypes.ListType{ - ElemType: RestrictWorkspaceAdminsMessage{}.Type(ctx), + ElemType: RestrictWorkspaceAdminsMessage_SdkV2{}.Type(ctx), }, "setting_name": types.StringType, }, @@ -8369,7 +8369,7 @@ func (o TokenAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: TokenPermission{}.Type(ctx), + ElemType: TokenPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -8605,7 +8605,7 @@ func (o TokenPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: TokenAccessControlResponse{}.Type(ctx), + ElemType: TokenAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -8723,7 +8723,7 @@ func (o TokenPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: TokenAccessControlRequest{}.Type(ctx), + ElemType: TokenAccessControlRequest_SdkV2{}.Type(ctx), }, }, } @@ -8808,7 +8808,7 @@ func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest_SdkV2) Type(ctx c "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingAccessPolicySetting{}.Type(ctx), + ElemType: AibiDashboardEmbeddingAccessPolicySetting_SdkV2{}.Type(ctx), }, }, } @@ -8893,7 +8893,7 @@ func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest_SdkV2) Type(ct "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: AibiDashboardEmbeddingApprovedDomainsSetting{}.Type(ctx), + ElemType: AibiDashboardEmbeddingApprovedDomainsSetting_SdkV2{}.Type(ctx), }, }, } @@ -8978,7 +8978,7 @@ func (o UpdateAutomaticClusterUpdateSettingRequest_SdkV2) Type(ctx context.Conte "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: AutomaticClusterUpdateSetting{}.Type(ctx), + ElemType: AutomaticClusterUpdateSetting_SdkV2{}.Type(ctx), }, }, } @@ -9063,7 +9063,7 @@ func (o UpdateComplianceSecurityProfileSettingRequest_SdkV2) Type(ctx context.Co "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: ComplianceSecurityProfileSetting{}.Type(ctx), + ElemType: ComplianceSecurityProfileSetting_SdkV2{}.Type(ctx), }, }, } @@ -9148,7 +9148,7 @@ func (o UpdateCspEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: CspEnablementAccountSetting{}.Type(ctx), + ElemType: CspEnablementAccountSetting_SdkV2{}.Type(ctx), }, }, } @@ -9241,7 +9241,7 @@ func (o UpdateDefaultNamespaceSettingRequest_SdkV2) Type(ctx context.Context) at "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: DefaultNamespaceSetting{}.Type(ctx), + ElemType: DefaultNamespaceSetting_SdkV2{}.Type(ctx), }, }, } @@ -9326,7 +9326,7 @@ func (o UpdateDisableLegacyAccessRequest_SdkV2) Type(ctx context.Context) attr.T "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: DisableLegacyAccess{}.Type(ctx), + ElemType: DisableLegacyAccess_SdkV2{}.Type(ctx), }, }, } @@ -9411,7 +9411,7 @@ func (o UpdateDisableLegacyDbfsRequest_SdkV2) Type(ctx context.Context) attr.Typ "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: DisableLegacyDbfs{}.Type(ctx), + ElemType: DisableLegacyDbfs_SdkV2{}.Type(ctx), }, }, } @@ -9496,7 +9496,7 @@ func (o UpdateDisableLegacyFeaturesRequest_SdkV2) Type(ctx context.Context) attr "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: DisableLegacyFeatures{}.Type(ctx), + ElemType: DisableLegacyFeatures_SdkV2{}.Type(ctx), }, }, } @@ -9581,7 +9581,7 @@ func (o UpdateEnhancedSecurityMonitoringSettingRequest_SdkV2) Type(ctx context.C "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: EnhancedSecurityMonitoringSetting{}.Type(ctx), + ElemType: EnhancedSecurityMonitoringSetting_SdkV2{}.Type(ctx), }, }, } @@ -9666,7 +9666,7 @@ func (o UpdateEsmEnablementAccountSettingRequest_SdkV2) Type(ctx context.Context "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: EsmEnablementAccountSetting{}.Type(ctx), + ElemType: EsmEnablementAccountSetting_SdkV2{}.Type(ctx), }, }, } @@ -9839,7 +9839,7 @@ func (o UpdateNotificationDestinationRequest_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "config": basetypes.ListType{ - ElemType: Config{}.Type(ctx), + ElemType: Config_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "id": types.StringType, @@ -9926,7 +9926,7 @@ func (o UpdatePersonalComputeSettingRequest_SdkV2) Type(ctx context.Context) att "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: PersonalComputeSetting{}.Type(ctx), + ElemType: PersonalComputeSetting_SdkV2{}.Type(ctx), }, }, } @@ -10047,7 +10047,7 @@ func (o UpdateRestrictWorkspaceAdminsSettingRequest_SdkV2) Type(ctx context.Cont "allow_missing": types.BoolType, "field_mask": types.StringType, "setting": basetypes.ListType{ - ElemType: RestrictWorkspaceAdminsSetting{}.Type(ctx), + ElemType: RestrictWorkspaceAdminsSetting_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/sharing_tf/legacy_model.go b/internal/service/sharing_tf/legacy_model.go index 42b91b4b0..6bbf36a8e 100755 --- a/internal/service/sharing_tf/legacy_model.go +++ b/internal/service/sharing_tf/legacy_model.go @@ -150,12 +150,12 @@ func (o CreateRecipient_SdkV2) Type(ctx context.Context) attr.Type { "data_recipient_global_metastore_id": types.StringType, "expiration_time": types.Int64Type, "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), + ElemType: IpAccessList_SdkV2{}.Type(ctx), }, "name": types.StringType, "owner": types.StringType, "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + ElemType: SecurablePropertiesKvPairs_SdkV2{}.Type(ctx), }, "sharing_code": types.StringType, }, @@ -640,7 +640,7 @@ func (o GetRecipientSharePermissionsResponse_SdkV2) Type(ctx context.Context) at AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "permissions_out": basetypes.ListType{ - ElemType: ShareToPrivilegeAssignment{}.Type(ctx), + ElemType: ShareToPrivilegeAssignment_SdkV2{}.Type(ctx), }, }, } @@ -837,7 +837,7 @@ func (o ListProviderSharesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "shares": basetypes.ListType{ - ElemType: ProviderShare{}.Type(ctx), + ElemType: ProviderShare_SdkV2{}.Type(ctx), }, }, } @@ -975,7 +975,7 @@ func (o ListProvidersResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "providers": basetypes.ListType{ - ElemType: ProviderInfo{}.Type(ctx), + ElemType: ProviderInfo_SdkV2{}.Type(ctx), }, }, } @@ -1113,7 +1113,7 @@ func (o ListRecipientsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "recipients": basetypes.ListType{ - ElemType: RecipientInfo{}.Type(ctx), + ElemType: RecipientInfo_SdkV2{}.Type(ctx), }, }, } @@ -1250,7 +1250,7 @@ func (o ListSharesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "shares": basetypes.ListType{ - ElemType: ShareInfo{}.Type(ctx), + ElemType: ShareInfo_SdkV2{}.Type(ctx), }, }, } @@ -1322,7 +1322,7 @@ func (o Partition_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "value": basetypes.ListType{ - ElemType: PartitionValue{}.Type(ctx), + ElemType: PartitionValue_SdkV2{}.Type(ctx), }, }, } @@ -1394,7 +1394,7 @@ func (o PartitionSpecificationPartition_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "value": basetypes.ListType{ - ElemType: PartitionValue{}.Type(ctx), + ElemType: PartitionValue_SdkV2{}.Type(ctx), }, }, } @@ -1655,7 +1655,7 @@ func (o ProviderInfo_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "owner": types.StringType, "recipient_profile": basetypes.ListType{ - ElemType: RecipientProfile{}.Type(ctx), + ElemType: RecipientProfile_SdkV2{}.Type(ctx), }, "recipient_profile_str": types.StringType, "region": types.StringType, @@ -1843,18 +1843,18 @@ func (o RecipientInfo_SdkV2) Type(ctx context.Context) attr.Type { "created_by": types.StringType, "data_recipient_global_metastore_id": types.StringType, "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), + ElemType: IpAccessList_SdkV2{}.Type(ctx), }, "metastore_id": types.StringType, "name": types.StringType, "owner": types.StringType, "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + ElemType: SecurablePropertiesKvPairs_SdkV2{}.Type(ctx), }, "region": types.StringType, "sharing_code": types.StringType, "tokens": basetypes.ListType{ - ElemType: RecipientTokenInfo{}.Type(ctx), + ElemType: RecipientTokenInfo_SdkV2{}.Type(ctx), }, "updated_at": types.Int64Type, "updated_by": types.StringType, @@ -2348,7 +2348,7 @@ func (o ShareInfo_SdkV2) Type(ctx context.Context) attr.Type { "created_by": types.StringType, "name": types.StringType, "object": basetypes.ListType{ - ElemType: SharedDataObject{}.Type(ctx), + ElemType: SharedDataObject_SdkV2{}.Type(ctx), }, "owner": types.StringType, "storage_location": types.StringType, @@ -2487,7 +2487,7 @@ func (o ShareToPrivilegeAssignment_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "privilege_assignments": basetypes.ListType{ - ElemType: PrivilegeAssignment{}.Type(ctx), + ElemType: PrivilegeAssignment_SdkV2{}.Type(ctx), }, "share_name": types.StringType, }, @@ -2659,7 +2659,7 @@ func (o SharedDataObject_SdkV2) Type(ctx context.Context) attr.Type { "effective_history_data_sharing_status": types.StringType, "name": types.StringType, "partition": basetypes.ListType{ - ElemType: Partition{}.Type(ctx), + ElemType: Partition_SdkV2{}.Type(ctx), }, "shared_as": types.StringType, "effective_shared_as": types.StringType, @@ -2741,7 +2741,7 @@ func (o SharedDataObjectUpdate_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "action": types.StringType, "data_object": basetypes.ListType{ - ElemType: SharedDataObject{}.Type(ctx), + ElemType: SharedDataObject_SdkV2{}.Type(ctx), }, }, } @@ -2932,13 +2932,13 @@ func (o UpdateRecipient_SdkV2) Type(ctx context.Context) attr.Type { "comment": types.StringType, "expiration_time": types.Int64Type, "ip_access_list": basetypes.ListType{ - ElemType: IpAccessList{}.Type(ctx), + ElemType: IpAccessList_SdkV2{}.Type(ctx), }, "name": types.StringType, "new_name": types.StringType, "owner": types.StringType, "properties_kvpairs": basetypes.ListType{ - ElemType: SecurablePropertiesKvPairs{}.Type(ctx), + ElemType: SecurablePropertiesKvPairs_SdkV2{}.Type(ctx), }, }, } @@ -3092,7 +3092,7 @@ func (o UpdateShare_SdkV2) Type(ctx context.Context) attr.Type { "owner": types.StringType, "storage_root": types.StringType, "updates": basetypes.ListType{ - ElemType: SharedDataObjectUpdate{}.Type(ctx), + ElemType: SharedDataObjectUpdate_SdkV2{}.Type(ctx), }, }, } @@ -3181,7 +3181,7 @@ func (o UpdateSharePermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "changes": basetypes.ListType{ - ElemType: catalog_tf.PermissionsChange{}.Type(ctx), + ElemType: catalog_tf.PermissionsChange_SdkV2{}.Type(ctx), }, "max_results": types.Int64Type, "name": types.StringType, diff --git a/internal/service/sql_tf/legacy_model.go b/internal/service/sql_tf/legacy_model.go index 5931259c4..38e1e401f 100755 --- a/internal/service/sql_tf/legacy_model.go +++ b/internal/service/sql_tf/legacy_model.go @@ -166,7 +166,7 @@ func (o Alert_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), + ElemType: AlertCondition_SdkV2{}.Type(ctx), }, "create_time": types.StringType, "custom_body": types.StringType, @@ -265,10 +265,10 @@ func (o AlertCondition_SdkV2) Type(ctx context.Context) attr.Type { "empty_result_state": types.StringType, "op": types.StringType, "operand": basetypes.ListType{ - ElemType: AlertConditionOperand{}.Type(ctx), + ElemType: AlertConditionOperand_SdkV2{}.Type(ctx), }, "threshold": basetypes.ListType{ - ElemType: AlertConditionThreshold{}.Type(ctx), + ElemType: AlertConditionThreshold_SdkV2{}.Type(ctx), }, }, } @@ -365,7 +365,7 @@ func (o AlertConditionOperand_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "column": basetypes.ListType{ - ElemType: AlertOperandColumn{}.Type(ctx), + ElemType: AlertOperandColumn_SdkV2{}.Type(ctx), }, }, } @@ -436,7 +436,7 @@ func (o AlertConditionThreshold_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "value": basetypes.ListType{ - ElemType: AlertOperandValue{}.Type(ctx), + ElemType: AlertOperandValue_SdkV2{}.Type(ctx), }, }, } @@ -733,7 +733,7 @@ func (o AlertQuery_SdkV2) Type(ctx context.Context) attr.Type { "is_safe": types.BoolType, "name": types.StringType, "options": basetypes.ListType{ - ElemType: QueryOptions{}.Type(ctx), + ElemType: QueryOptions_SdkV2{}.Type(ctx), }, "query": types.StringType, "tags": basetypes.ListType{ @@ -1153,7 +1153,7 @@ func (o CreateAlert_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "name": types.StringType, "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), + ElemType: AlertOptions_SdkV2{}.Type(ctx), }, "parent": types.StringType, "query_id": types.StringType, @@ -1227,7 +1227,7 @@ func (o CreateAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "alert": basetypes.ListType{ - ElemType: CreateAlertRequestAlert{}.Type(ctx), + ElemType: CreateAlertRequestAlert_SdkV2{}.Type(ctx), }, }, } @@ -1329,7 +1329,7 @@ func (o CreateAlertRequestAlert_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), + ElemType: AlertCondition_SdkV2{}.Type(ctx), }, "custom_body": types.StringType, "custom_subject": types.StringType, @@ -1407,7 +1407,7 @@ func (o CreateQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "query": basetypes.ListType{ - ElemType: CreateQueryRequestQuery{}.Type(ctx), + ElemType: CreateQueryRequestQuery_SdkV2{}.Type(ctx), }, }, } @@ -1516,7 +1516,7 @@ func (o CreateQueryRequestQuery_SdkV2) Type(ctx context.Context) attr.Type { "description": types.StringType, "display_name": types.StringType, "parameters": basetypes.ListType{ - ElemType: QueryParameter{}.Type(ctx), + ElemType: QueryParameter_SdkV2{}.Type(ctx), }, "parent_path": types.StringType, "query_text": types.StringType, @@ -1684,7 +1684,7 @@ func (o CreateVisualizationRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "visualization": basetypes.ListType{ - ElemType: CreateVisualizationRequestVisualization{}.Type(ctx), + ElemType: CreateVisualizationRequestVisualization_SdkV2{}.Type(ctx), }, }, } @@ -1891,7 +1891,7 @@ func (o CreateWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "auto_stop_mins": types.Int64Type, "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "cluster_size": types.StringType, "creator_name": types.StringType, @@ -1903,7 +1903,7 @@ func (o CreateWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "spot_instance_policy": types.StringType, "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), + ElemType: EndpointTags_SdkV2{}.Type(ctx), }, "warehouse_type": types.StringType, }, @@ -2063,7 +2063,7 @@ func (o CreateWidget_SdkV2) Type(ctx context.Context) attr.Type { "dashboard_id": types.StringType, "id": types.StringType, "options": basetypes.ListType{ - ElemType: WidgetOptions{}.Type(ctx), + ElemType: WidgetOptions_SdkV2{}.Type(ctx), }, "text": types.StringType, "visualization_id": types.StringType, @@ -2209,7 +2209,7 @@ func (o Dashboard_SdkV2) Type(ctx context.Context) attr.Type { "is_favorite": types.BoolType, "name": types.StringType, "options": basetypes.ListType{ - ElemType: DashboardOptions{}.Type(ctx), + ElemType: DashboardOptions_SdkV2{}.Type(ctx), }, "parent": types.StringType, "permission_tier": types.StringType, @@ -2219,11 +2219,11 @@ func (o Dashboard_SdkV2) Type(ctx context.Context) attr.Type { }, "updated_at": types.StringType, "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), + ElemType: User_SdkV2{}.Type(ctx), }, "user_id": types.Int64Type, "widgets": basetypes.ListType{ - ElemType: Widget{}.Type(ctx), + ElemType: Widget_SdkV2{}.Type(ctx), }, }, } @@ -2735,7 +2735,7 @@ func (o DateRangeValue_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "date_range_value": basetypes.ListType{ - ElemType: DateRange{}.Type(ctx), + ElemType: DateRange_SdkV2{}.Type(ctx), }, "dynamic_date_range_value": types.StringType, "precision": types.StringType, @@ -3245,7 +3245,7 @@ func (o EditAlert_SdkV2) Type(ctx context.Context) attr.Type { "alert_id": types.StringType, "name": types.StringType, "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), + ElemType: AlertOptions_SdkV2{}.Type(ctx), }, "query_id": types.StringType, "rearm": types.Int64Type, @@ -3393,7 +3393,7 @@ func (o EditWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "auto_stop_mins": types.Int64Type, "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "cluster_size": types.StringType, "creator_name": types.StringType, @@ -3406,7 +3406,7 @@ func (o EditWarehouseRequest_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "spot_instance_policy": types.StringType, "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), + ElemType: EndpointTags_SdkV2{}.Type(ctx), }, "warehouse_type": types.StringType, }, @@ -3639,7 +3639,7 @@ func (o EndpointHealth_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "details": types.StringType, "failure_reason": basetypes.ListType{ - ElemType: TerminationReason{}.Type(ctx), + ElemType: TerminationReason_SdkV2{}.Type(ctx), }, "message": types.StringType, "status": types.StringType, @@ -3809,14 +3809,14 @@ func (o EndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "auto_stop_mins": types.Int64Type, "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, "enable_serverless_compute": types.BoolType, "health": basetypes.ListType{ - ElemType: EndpointHealth{}.Type(ctx), + ElemType: EndpointHealth_SdkV2{}.Type(ctx), }, "id": types.StringType, "instance_profile_arn": types.StringType, @@ -3827,12 +3827,12 @@ func (o EndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { "num_active_sessions": types.Int64Type, "num_clusters": types.Int64Type, "odbc_params": basetypes.ListType{ - ElemType: OdbcParams{}.Type(ctx), + ElemType: OdbcParams_SdkV2{}.Type(ctx), }, "spot_instance_policy": types.StringType, "state": types.StringType, "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), + ElemType: EndpointTags_SdkV2{}.Type(ctx), }, "warehouse_type": types.StringType, }, @@ -4027,7 +4027,7 @@ func (o EndpointTags_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "custom_tags": basetypes.ListType{ - ElemType: EndpointTagPair{}.Type(ctx), + ElemType: EndpointTagPair_SdkV2{}.Type(ctx), }, }, } @@ -4107,7 +4107,7 @@ func (o EnumValue_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "enum_options": types.StringType, "multi_values_options": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), + ElemType: MultiValuesOptions_SdkV2{}.Type(ctx), }, "values": basetypes.ListType{ ElemType: types.StringType, @@ -4344,7 +4344,7 @@ func (o ExecuteStatementRequest_SdkV2) Type(ctx context.Context) attr.Type { "format": types.StringType, "on_wait_timeout": types.StringType, "parameters": basetypes.ListType{ - ElemType: StatementParameterListItem{}.Type(ctx), + ElemType: StatementParameterListItem_SdkV2{}.Type(ctx), }, "row_limit": types.Int64Type, "schema": types.StringType, @@ -4799,7 +4799,7 @@ func (o GetResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AccessControl{}.Type(ctx), + ElemType: AccessControl_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -5007,7 +5007,7 @@ func (o GetWarehousePermissionLevelsResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: WarehousePermissionsDescription{}.Type(ctx), + ElemType: WarehousePermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -5260,14 +5260,14 @@ func (o GetWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "auto_stop_mins": types.Int64Type, "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "cluster_size": types.StringType, "creator_name": types.StringType, "enable_photon": types.BoolType, "enable_serverless_compute": types.BoolType, "health": basetypes.ListType{ - ElemType: EndpointHealth{}.Type(ctx), + ElemType: EndpointHealth_SdkV2{}.Type(ctx), }, "id": types.StringType, "instance_profile_arn": types.StringType, @@ -5278,12 +5278,12 @@ func (o GetWarehouseResponse_SdkV2) Type(ctx context.Context) attr.Type { "num_active_sessions": types.Int64Type, "num_clusters": types.Int64Type, "odbc_params": basetypes.ListType{ - ElemType: OdbcParams{}.Type(ctx), + ElemType: OdbcParams_SdkV2{}.Type(ctx), }, "spot_instance_policy": types.StringType, "state": types.StringType, "tags": basetypes.ListType{ - ElemType: EndpointTags{}.Type(ctx), + ElemType: EndpointTags_SdkV2{}.Type(ctx), }, "warehouse_type": types.StringType, }, @@ -5470,25 +5470,25 @@ func (o GetWorkspaceWarehouseConfigResponse_SdkV2) Type(ctx context.Context) att return types.ObjectType{ AttrTypes: map[string]attr.Type{ "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "config_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, "data_access_config": basetypes.ListType{ - ElemType: EndpointConfPair{}.Type(ctx), + ElemType: EndpointConfPair_SdkV2{}.Type(ctx), }, "enabled_warehouse_types": basetypes.ListType{ - ElemType: WarehouseTypePair{}.Type(ctx), + ElemType: WarehouseTypePair_SdkV2{}.Type(ctx), }, "global_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, "google_service_account": types.StringType, "instance_profile_arn": types.StringType, "security_policy": types.StringType, "sql_configuration_parameters": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, }, } @@ -5730,17 +5730,17 @@ func (o LegacyAlert_SdkV2) Type(ctx context.Context) attr.Type { "last_triggered_at": types.StringType, "name": types.StringType, "options": basetypes.ListType{ - ElemType: AlertOptions{}.Type(ctx), + ElemType: AlertOptions_SdkV2{}.Type(ctx), }, "parent": types.StringType, "query": basetypes.ListType{ - ElemType: AlertQuery{}.Type(ctx), + ElemType: AlertQuery_SdkV2{}.Type(ctx), }, "rearm": types.Int64Type, "state": types.StringType, "updated_at": types.StringType, "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), + ElemType: User_SdkV2{}.Type(ctx), }, }, } @@ -5966,13 +5966,13 @@ func (o LegacyQuery_SdkV2) Type(ctx context.Context) attr.Type { "is_favorite": types.BoolType, "is_safe": types.BoolType, "last_modified_by": basetypes.ListType{ - ElemType: User{}.Type(ctx), + ElemType: User_SdkV2{}.Type(ctx), }, "last_modified_by_id": types.Int64Type, "latest_query_data_id": types.StringType, "name": types.StringType, "options": basetypes.ListType{ - ElemType: QueryOptions{}.Type(ctx), + ElemType: QueryOptions_SdkV2{}.Type(ctx), }, "parent": types.StringType, "permission_tier": types.StringType, @@ -5984,11 +5984,11 @@ func (o LegacyQuery_SdkV2) Type(ctx context.Context) attr.Type { }, "updated_at": types.StringType, "user": basetypes.ListType{ - ElemType: User{}.Type(ctx), + ElemType: User_SdkV2{}.Type(ctx), }, "user_id": types.Int64Type, "visualizations": basetypes.ListType{ - ElemType: LegacyVisualization{}.Type(ctx), + ElemType: LegacyVisualization_SdkV2{}.Type(ctx), }, }, } @@ -6198,7 +6198,7 @@ func (o LegacyVisualization_SdkV2) Type(ctx context.Context) attr.Type { "name": types.StringType, "options": types.ObjectType{}, "query": basetypes.ListType{ - ElemType: LegacyQuery{}.Type(ctx), + ElemType: LegacyQuery_SdkV2{}.Type(ctx), }, "type": types.StringType, "updated_at": types.StringType, @@ -6321,7 +6321,7 @@ func (o ListAlertsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "results": basetypes.ListType{ - ElemType: ListAlertsResponseAlert{}.Type(ctx), + ElemType: ListAlertsResponseAlert_SdkV2{}.Type(ctx), }, }, } @@ -6445,7 +6445,7 @@ func (o ListAlertsResponseAlert_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), + ElemType: AlertCondition_SdkV2{}.Type(ctx), }, "create_time": types.StringType, "custom_body": types.StringType, @@ -6707,7 +6707,7 @@ func (o ListQueriesResponse_SdkV2) Type(ctx context.Context) attr.Type { "has_next_page": types.BoolType, "next_page_token": types.StringType, "res": basetypes.ListType{ - ElemType: QueryInfo{}.Type(ctx), + ElemType: QueryInfo_SdkV2{}.Type(ctx), }, }, } @@ -6794,7 +6794,7 @@ func (o ListQueryHistoryRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "filter_by": basetypes.ListType{ - ElemType: QueryFilter{}.Type(ctx), + ElemType: QueryFilter_SdkV2{}.Type(ctx), }, "include_metrics": types.BoolType, "max_results": types.Int64Type, @@ -6872,7 +6872,7 @@ func (o ListQueryObjectsResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "results": basetypes.ListType{ - ElemType: ListQueryObjectsResponseQuery{}.Type(ctx), + ElemType: ListQueryObjectsResponseQuery_SdkV2{}.Type(ctx), }, }, } @@ -7001,7 +7001,7 @@ func (o ListQueryObjectsResponseQuery_SdkV2) Type(ctx context.Context) attr.Type "lifecycle_state": types.StringType, "owner_user_name": types.StringType, "parameters": basetypes.ListType{ - ElemType: QueryParameter{}.Type(ctx), + ElemType: QueryParameter_SdkV2{}.Type(ctx), }, "query_text": types.StringType, "run_as_mode": types.StringType, @@ -7119,7 +7119,7 @@ func (o ListResponse_SdkV2) Type(ctx context.Context) attr.Type { "page": types.Int64Type, "page_size": types.Int64Type, "results": basetypes.ListType{ - ElemType: Dashboard{}.Type(ctx), + ElemType: Dashboard_SdkV2{}.Type(ctx), }, }, } @@ -7244,7 +7244,7 @@ func (o ListVisualizationsForQueryResponse_SdkV2) Type(ctx context.Context) attr AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "results": basetypes.ListType{ - ElemType: Visualization{}.Type(ctx), + ElemType: Visualization_SdkV2{}.Type(ctx), }, }, } @@ -7360,7 +7360,7 @@ func (o ListWarehousesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "warehouses": basetypes.ListType{ - ElemType: EndpointInfo{}.Type(ctx), + ElemType: EndpointInfo_SdkV2{}.Type(ctx), }, }, } @@ -7600,7 +7600,7 @@ func (o Parameter_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "enumOptions": types.StringType, "multiValuesOptions": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), + ElemType: MultiValuesOptions_SdkV2{}.Type(ctx), }, "name": types.StringType, "queryId": types.StringType, @@ -7737,7 +7737,7 @@ func (o Query_SdkV2) Type(ctx context.Context) attr.Type { "lifecycle_state": types.StringType, "owner_user_name": types.StringType, "parameters": basetypes.ListType{ - ElemType: QueryParameter{}.Type(ctx), + ElemType: QueryParameter_SdkV2{}.Type(ctx), }, "parent_path": types.StringType, "query_text": types.StringType, @@ -7851,7 +7851,7 @@ func (o QueryBackedValue_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "multi_values_options": basetypes.ListType{ - ElemType: MultiValuesOptions{}.Type(ctx), + ElemType: MultiValuesOptions_SdkV2{}.Type(ctx), }, "query_id": types.StringType, "values": basetypes.ListType{ @@ -8079,7 +8079,7 @@ func (o QueryFilter_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "query_start_time_range": basetypes.ListType{ - ElemType: TimeRange{}.Type(ctx), + ElemType: TimeRange_SdkV2{}.Type(ctx), }, "statement_ids": basetypes.ListType{ ElemType: types.StringType, @@ -8336,7 +8336,7 @@ func (o QueryInfo_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "channel_used": basetypes.ListType{ - ElemType: ChannelInfo{}.Type(ctx), + ElemType: ChannelInfo_SdkV2{}.Type(ctx), }, "duration": types.Int64Type, "endpoint_id": types.StringType, @@ -8347,7 +8347,7 @@ func (o QueryInfo_SdkV2) Type(ctx context.Context) attr.Type { "is_final": types.BoolType, "lookup_key": types.StringType, "metrics": basetypes.ListType{ - ElemType: QueryMetrics{}.Type(ctx), + ElemType: QueryMetrics_SdkV2{}.Type(ctx), }, "plans_state": types.StringType, "query_end_time_ms": types.Int64Type, @@ -8469,7 +8469,7 @@ func (o QueryList_SdkV2) Type(ctx context.Context) attr.Type { "page": types.Int64Type, "page_size": types.Int64Type, "results": basetypes.ListType{ - ElemType: LegacyQuery{}.Type(ctx), + ElemType: LegacyQuery_SdkV2{}.Type(ctx), }, }, } @@ -8694,7 +8694,7 @@ func (o QueryOptions_SdkV2) Type(ctx context.Context) attr.Type { "catalog": types.StringType, "moved_to_trash_at": types.StringType, "parameters": basetypes.ListType{ - ElemType: Parameter{}.Type(ctx), + ElemType: Parameter_SdkV2{}.Type(ctx), }, "schema": types.StringType, }, @@ -8796,23 +8796,23 @@ func (o QueryParameter_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "date_range_value": basetypes.ListType{ - ElemType: DateRangeValue{}.Type(ctx), + ElemType: DateRangeValue_SdkV2{}.Type(ctx), }, "date_value": basetypes.ListType{ - ElemType: DateValue{}.Type(ctx), + ElemType: DateValue_SdkV2{}.Type(ctx), }, "enum_value": basetypes.ListType{ - ElemType: EnumValue{}.Type(ctx), + ElemType: EnumValue_SdkV2{}.Type(ctx), }, "name": types.StringType, "numeric_value": basetypes.ListType{ - ElemType: NumericValue{}.Type(ctx), + ElemType: NumericValue_SdkV2{}.Type(ctx), }, "query_backed_value": basetypes.ListType{ - ElemType: QueryBackedValue{}.Type(ctx), + ElemType: QueryBackedValue_SdkV2{}.Type(ctx), }, "text_value": basetypes.ListType{ - ElemType: TextValue{}.Type(ctx), + ElemType: TextValue_SdkV2{}.Type(ctx), }, "title": types.StringType, }, @@ -9128,10 +9128,10 @@ func (o RepeatedEndpointConfPairs_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "config_pair": basetypes.ListType{ - ElemType: EndpointConfPair{}.Type(ctx), + ElemType: EndpointConfPair_SdkV2{}.Type(ctx), }, "configuration_pairs": basetypes.ListType{ - ElemType: EndpointConfPair{}.Type(ctx), + ElemType: EndpointConfPair_SdkV2{}.Type(ctx), }, }, } @@ -9386,7 +9386,7 @@ func (o ResultData_SdkV2) Type(ctx context.Context) attr.Type { }, }, "external_links": basetypes.ListType{ - ElemType: ExternalLink{}.Type(ctx), + ElemType: ExternalLink_SdkV2{}.Type(ctx), }, "next_chunk_index": types.Int64Type, "next_chunk_internal_link": types.StringType, @@ -9510,11 +9510,11 @@ func (o ResultManifest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "chunks": basetypes.ListType{ - ElemType: BaseChunkInfo{}.Type(ctx), + ElemType: BaseChunkInfo_SdkV2{}.Type(ctx), }, "format": types.StringType, "schema": basetypes.ListType{ - ElemType: ResultSchema{}.Type(ctx), + ElemType: ResultSchema_SdkV2{}.Type(ctx), }, "total_byte_count": types.Int64Type, "total_chunk_count": types.Int64Type, @@ -9620,7 +9620,7 @@ func (o ResultSchema_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "column_count": types.Int64Type, "columns": basetypes.ListType{ - ElemType: ColumnInfo{}.Type(ctx), + ElemType: ColumnInfo_SdkV2{}.Type(ctx), }, }, } @@ -9744,7 +9744,7 @@ func (o SetRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AccessControl{}.Type(ctx), + ElemType: AccessControl_SdkV2{}.Type(ctx), }, "objectId": types.StringType, "objectType": types.StringType, @@ -9823,7 +9823,7 @@ func (o SetResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: AccessControl{}.Type(ctx), + ElemType: AccessControl_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -9933,25 +9933,25 @@ func (o SetWorkspaceWarehouseConfigRequest_SdkV2) Type(ctx context.Context) attr return types.ObjectType{ AttrTypes: map[string]attr.Type{ "channel": basetypes.ListType{ - ElemType: Channel{}.Type(ctx), + ElemType: Channel_SdkV2{}.Type(ctx), }, "config_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, "data_access_config": basetypes.ListType{ - ElemType: EndpointConfPair{}.Type(ctx), + ElemType: EndpointConfPair_SdkV2{}.Type(ctx), }, "enabled_warehouse_types": basetypes.ListType{ - ElemType: WarehouseTypePair{}.Type(ctx), + ElemType: WarehouseTypePair_SdkV2{}.Type(ctx), }, "global_param": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, "google_service_account": types.StringType, "instance_profile_arn": types.StringType, "security_policy": types.StringType, "sql_configuration_parameters": basetypes.ListType{ - ElemType: RepeatedEndpointConfPairs{}.Type(ctx), + ElemType: RepeatedEndpointConfPairs_SdkV2{}.Type(ctx), }, }, } @@ -10338,14 +10338,14 @@ func (o StatementResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "manifest": basetypes.ListType{ - ElemType: ResultManifest{}.Type(ctx), + ElemType: ResultManifest_SdkV2{}.Type(ctx), }, "result": basetypes.ListType{ - ElemType: ResultData{}.Type(ctx), + ElemType: ResultData_SdkV2{}.Type(ctx), }, "statement_id": types.StringType, "status": basetypes.ListType{ - ElemType: StatementStatus{}.Type(ctx), + ElemType: StatementStatus_SdkV2{}.Type(ctx), }, }, } @@ -10479,7 +10479,7 @@ func (o StatementStatus_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "error": basetypes.ListType{ - ElemType: ServiceError{}.Type(ctx), + ElemType: ServiceError_SdkV2{}.Type(ctx), }, "state": types.StringType, }, @@ -10890,7 +10890,7 @@ func (o TransferOwnershipRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "new_owner": types.StringType, "objectId": basetypes.ListType{ - ElemType: TransferOwnershipObjectId{}.Type(ctx), + ElemType: TransferOwnershipObjectId_SdkV2{}.Type(ctx), }, "objectType": types.StringType, }, @@ -11055,7 +11055,7 @@ func (o UpdateAlertRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "alert": basetypes.ListType{ - ElemType: UpdateAlertRequestAlert{}.Type(ctx), + ElemType: UpdateAlertRequestAlert_SdkV2{}.Type(ctx), }, "id": types.StringType, "update_mask": types.StringType, @@ -11160,7 +11160,7 @@ func (o UpdateAlertRequestAlert_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "condition": basetypes.ListType{ - ElemType: AlertCondition{}.Type(ctx), + ElemType: AlertCondition_SdkV2{}.Type(ctx), }, "custom_body": types.StringType, "custom_subject": types.StringType, @@ -11248,7 +11248,7 @@ func (o UpdateQueryRequest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "query": basetypes.ListType{ - ElemType: UpdateQueryRequestQuery{}.Type(ctx), + ElemType: UpdateQueryRequestQuery_SdkV2{}.Type(ctx), }, "update_mask": types.StringType, }, @@ -11359,7 +11359,7 @@ func (o UpdateQueryRequestQuery_SdkV2) Type(ctx context.Context) attr.Type { "display_name": types.StringType, "owner_user_name": types.StringType, "parameters": basetypes.ListType{ - ElemType: QueryParameter{}.Type(ctx), + ElemType: QueryParameter_SdkV2{}.Type(ctx), }, "query_text": types.StringType, "run_as_mode": types.StringType, @@ -11510,7 +11510,7 @@ func (o UpdateVisualizationRequest_SdkV2) Type(ctx context.Context) attr.Type { "id": types.StringType, "update_mask": types.StringType, "visualization": basetypes.ListType{ - ElemType: UpdateVisualizationRequestVisualization{}.Type(ctx), + ElemType: UpdateVisualizationRequestVisualization_SdkV2{}.Type(ctx), }, }, } @@ -11829,7 +11829,7 @@ func (o WarehouseAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Typ return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: WarehousePermission{}.Type(ctx), + ElemType: WarehousePermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -11989,7 +11989,7 @@ func (o WarehousePermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: WarehouseAccessControlResponse{}.Type(ctx), + ElemType: WarehouseAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -12110,7 +12110,7 @@ func (o WarehousePermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: WarehouseAccessControlRequest{}.Type(ctx), + ElemType: WarehouseAccessControlRequest_SdkV2{}.Type(ctx), }, "warehouse_id": types.StringType, }, @@ -12245,10 +12245,10 @@ func (o Widget_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "id": types.StringType, "options": basetypes.ListType{ - ElemType: WidgetOptions{}.Type(ctx), + ElemType: WidgetOptions_SdkV2{}.Type(ctx), }, "visualization": basetypes.ListType{ - ElemType: LegacyVisualization{}.Type(ctx), + ElemType: LegacyVisualization_SdkV2{}.Type(ctx), }, "width": types.Int64Type, }, @@ -12372,7 +12372,7 @@ func (o WidgetOptions_SdkV2) Type(ctx context.Context) attr.Type { "isHidden": types.BoolType, "parameterMappings": types.ObjectType{}, "position": basetypes.ListType{ - ElemType: WidgetPosition{}.Type(ctx), + ElemType: WidgetPosition_SdkV2{}.Type(ctx), }, "title": types.StringType, "updated_at": types.StringType, diff --git a/internal/service/vectorsearch_tf/legacy_model.go b/internal/service/vectorsearch_tf/legacy_model.go index 8b2d35979..27e70adf8 100755 --- a/internal/service/vectorsearch_tf/legacy_model.go +++ b/internal/service/vectorsearch_tf/legacy_model.go @@ -173,10 +173,10 @@ func (o CreateVectorIndexRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "delta_sync_index_spec": basetypes.ListType{ - ElemType: DeltaSyncVectorIndexSpecRequest{}.Type(ctx), + ElemType: DeltaSyncVectorIndexSpecRequest_SdkV2{}.Type(ctx), }, "direct_access_index_spec": basetypes.ListType{ - ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), + ElemType: DirectAccessVectorIndexSpec_SdkV2{}.Type(ctx), }, "endpoint_name": types.StringType, "index_type": types.StringType, @@ -277,7 +277,7 @@ func (o CreateVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "vector_index": basetypes.ListType{ - ElemType: VectorIndex{}.Type(ctx), + ElemType: VectorIndex_SdkV2{}.Type(ctx), }, }, } @@ -508,7 +508,7 @@ func (o DeleteDataVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "result": basetypes.ListType{ - ElemType: DeleteDataResult{}.Type(ctx), + ElemType: DeleteDataResult_SdkV2{}.Type(ctx), }, "status": types.StringType, }, @@ -772,10 +772,10 @@ func (o DeltaSyncVectorIndexSpecRequest_SdkV2) Type(ctx context.Context) attr.Ty ElemType: types.StringType, }, "embedding_source_columns": basetypes.ListType{ - ElemType: EmbeddingSourceColumn{}.Type(ctx), + ElemType: EmbeddingSourceColumn_SdkV2{}.Type(ctx), }, "embedding_vector_columns": basetypes.ListType{ - ElemType: EmbeddingVectorColumn{}.Type(ctx), + ElemType: EmbeddingVectorColumn_SdkV2{}.Type(ctx), }, "embedding_writeback_table": types.StringType, "pipeline_type": types.StringType, @@ -926,10 +926,10 @@ func (o DeltaSyncVectorIndexSpecResponse_SdkV2) Type(ctx context.Context) attr.T return types.ObjectType{ AttrTypes: map[string]attr.Type{ "embedding_source_columns": basetypes.ListType{ - ElemType: EmbeddingSourceColumn{}.Type(ctx), + ElemType: EmbeddingSourceColumn_SdkV2{}.Type(ctx), }, "embedding_vector_columns": basetypes.ListType{ - ElemType: EmbeddingVectorColumn{}.Type(ctx), + ElemType: EmbeddingVectorColumn_SdkV2{}.Type(ctx), }, "embedding_writeback_table": types.StringType, "pipeline_id": types.StringType, @@ -1043,10 +1043,10 @@ func (o DirectAccessVectorIndexSpec_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "embedding_source_columns": basetypes.ListType{ - ElemType: EmbeddingSourceColumn{}.Type(ctx), + ElemType: EmbeddingSourceColumn_SdkV2{}.Type(ctx), }, "embedding_vector_columns": basetypes.ListType{ - ElemType: EmbeddingVectorColumn{}.Type(ctx), + ElemType: EmbeddingVectorColumn_SdkV2{}.Type(ctx), }, "schema_json": types.StringType, }, @@ -1263,7 +1263,7 @@ func (o EndpointInfo_SdkV2) Type(ctx context.Context) attr.Type { "creation_timestamp": types.Int64Type, "creator": types.StringType, "endpoint_status": basetypes.ListType{ - ElemType: EndpointStatus{}.Type(ctx), + ElemType: EndpointStatus_SdkV2{}.Type(ctx), }, "endpoint_type": types.StringType, "id": types.StringType, @@ -1478,7 +1478,7 @@ func (o ListEndpointResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "endpoints": basetypes.ListType{ - ElemType: EndpointInfo{}.Type(ctx), + ElemType: EndpointInfo_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, }, @@ -1640,7 +1640,7 @@ func (o ListValue_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "values": basetypes.ListType{ - ElemType: Value{}.Type(ctx), + ElemType: Value_SdkV2{}.Type(ctx), }, }, } @@ -1717,7 +1717,7 @@ func (o ListVectorIndexesResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "vector_indexes": basetypes.ListType{ - ElemType: MiniVectorIndex{}.Type(ctx), + ElemType: MiniVectorIndex_SdkV2{}.Type(ctx), }, }, } @@ -1794,7 +1794,7 @@ func (o MapStringValueEntry_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "key": types.StringType, "value": basetypes.ListType{ - ElemType: Value{}.Type(ctx), + ElemType: Value_SdkV2{}.Type(ctx), }, }, } @@ -2126,11 +2126,11 @@ func (o QueryVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "manifest": basetypes.ListType{ - ElemType: ResultManifest{}.Type(ctx), + ElemType: ResultManifest_SdkV2{}.Type(ctx), }, "next_page_token": types.StringType, "result": basetypes.ListType{ - ElemType: ResultData{}.Type(ctx), + ElemType: ResultData_SdkV2{}.Type(ctx), }, }, } @@ -2312,7 +2312,7 @@ func (o ResultManifest_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "column_count": types.Int64Type, "columns": basetypes.ListType{ - ElemType: ColumnInfo{}.Type(ctx), + ElemType: ColumnInfo_SdkV2{}.Type(ctx), }, }, } @@ -2439,7 +2439,7 @@ func (o ScanVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "data": basetypes.ListType{ - ElemType: Struct{}.Type(ctx), + ElemType: Struct_SdkV2{}.Type(ctx), }, "last_primary_key": types.StringType, }, @@ -2512,7 +2512,7 @@ func (o Struct_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "fields": basetypes.ListType{ - ElemType: MapStringValueEntry{}.Type(ctx), + ElemType: MapStringValueEntry_SdkV2{}.Type(ctx), }, }, } @@ -2792,7 +2792,7 @@ func (o UpsertDataVectorIndexResponse_SdkV2) Type(ctx context.Context) attr.Type return types.ObjectType{ AttrTypes: map[string]attr.Type{ "result": basetypes.ListType{ - ElemType: UpsertDataResult{}.Type(ctx), + ElemType: UpsertDataResult_SdkV2{}.Type(ctx), }, "status": types.StringType, }, @@ -2881,13 +2881,13 @@ func (o Value_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "bool_value": types.BoolType, "list_value": basetypes.ListType{ - ElemType: ListValue{}.Type(ctx), + ElemType: ListValue_SdkV2{}.Type(ctx), }, "null_value": types.StringType, "number_value": types.Float64Type, "string_value": types.StringType, "struct_value": basetypes.ListType{ - ElemType: Struct{}.Type(ctx), + ElemType: Struct_SdkV2{}.Type(ctx), }, }, } @@ -3015,17 +3015,17 @@ func (o VectorIndex_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "creator": types.StringType, "delta_sync_index_spec": basetypes.ListType{ - ElemType: DeltaSyncVectorIndexSpecResponse{}.Type(ctx), + ElemType: DeltaSyncVectorIndexSpecResponse_SdkV2{}.Type(ctx), }, "direct_access_index_spec": basetypes.ListType{ - ElemType: DirectAccessVectorIndexSpec{}.Type(ctx), + ElemType: DirectAccessVectorIndexSpec_SdkV2{}.Type(ctx), }, "endpoint_name": types.StringType, "index_type": types.StringType, "name": types.StringType, "primary_key": types.StringType, "status": basetypes.ListType{ - ElemType: VectorIndexStatus{}.Type(ctx), + ElemType: VectorIndexStatus_SdkV2{}.Type(ctx), }, }, } diff --git a/internal/service/workspace_tf/legacy_model.go b/internal/service/workspace_tf/legacy_model.go index 5f1ca09c1..676ad91b7 100755 --- a/internal/service/workspace_tf/legacy_model.go +++ b/internal/service/workspace_tf/legacy_model.go @@ -285,7 +285,7 @@ func (o CreateRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { "path": types.StringType, "provider": types.StringType, "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), + ElemType: SparseCheckout_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -382,7 +382,7 @@ func (o CreateRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { "path": types.StringType, "provider": types.StringType, "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), + ElemType: SparseCheckout_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -466,7 +466,7 @@ func (o CreateScope_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "backend_azure_keyvault": basetypes.ListType{ - ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), + ElemType: AzureKeyVaultSecretScopeMetadata_SdkV2{}.Type(ctx), }, "initial_manage_principal": types.StringType, "scope": types.StringType, @@ -1405,7 +1405,7 @@ func (o GetRepoPermissionLevelsResponse_SdkV2) Type(ctx context.Context) attr.Ty return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: RepoPermissionsDescription{}.Type(ctx), + ElemType: RepoPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -1586,7 +1586,7 @@ func (o GetRepoResponse_SdkV2) Type(ctx context.Context) attr.Type { "path": types.StringType, "provider": types.StringType, "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), + ElemType: SparseCheckout_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -1842,7 +1842,7 @@ func (o GetWorkspaceObjectPermissionLevelsResponse_SdkV2) Type(ctx context.Conte return types.ObjectType{ AttrTypes: map[string]attr.Type{ "permission_levels": basetypes.ListType{ - ElemType: WorkspaceObjectPermissionsDescription{}.Type(ctx), + ElemType: WorkspaceObjectPermissionsDescription_SdkV2{}.Type(ctx), }, }, } @@ -2118,7 +2118,7 @@ func (o ListAclsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "items": basetypes.ListType{ - ElemType: AclItem{}.Type(ctx), + ElemType: AclItem_SdkV2{}.Type(ctx), }, }, } @@ -2190,7 +2190,7 @@ func (o ListCredentialsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "credentials": basetypes.ListType{ - ElemType: CredentialInfo{}.Type(ctx), + ElemType: CredentialInfo_SdkV2{}.Type(ctx), }, }, } @@ -2318,7 +2318,7 @@ func (o ListReposResponse_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "next_page_token": types.StringType, "repos": basetypes.ListType{ - ElemType: RepoInfo{}.Type(ctx), + ElemType: RepoInfo_SdkV2{}.Type(ctx), }, }, } @@ -2390,7 +2390,7 @@ func (o ListResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "objects": basetypes.ListType{ - ElemType: ObjectInfo{}.Type(ctx), + ElemType: ObjectInfo_SdkV2{}.Type(ctx), }, }, } @@ -2462,7 +2462,7 @@ func (o ListScopesResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "scopes": basetypes.ListType{ - ElemType: SecretScope{}.Type(ctx), + ElemType: SecretScope_SdkV2{}.Type(ctx), }, }, } @@ -2577,7 +2577,7 @@ func (o ListSecretsResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "secrets": basetypes.ListType{ - ElemType: SecretMetadata{}.Type(ctx), + ElemType: SecretMetadata_SdkV2{}.Type(ctx), }, }, } @@ -3094,7 +3094,7 @@ func (o RepoAccessControlResponse_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: RepoPermission{}.Type(ctx), + ElemType: RepoPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -3194,7 +3194,7 @@ func (o RepoInfo_SdkV2) Type(ctx context.Context) attr.Type { "path": types.StringType, "provider": types.StringType, "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckout{}.Type(ctx), + ElemType: SparseCheckout_SdkV2{}.Type(ctx), }, "url": types.StringType, }, @@ -3351,7 +3351,7 @@ func (o RepoPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: RepoAccessControlResponse{}.Type(ctx), + ElemType: RepoAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -3472,7 +3472,7 @@ func (o RepoPermissionsRequest_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: RepoAccessControlRequest{}.Type(ctx), + ElemType: RepoAccessControlRequest_SdkV2{}.Type(ctx), }, "repo_id": types.StringType, }, @@ -3598,7 +3598,7 @@ func (o SecretScope_SdkV2) Type(ctx context.Context) attr.Type { AttrTypes: map[string]attr.Type{ "backend_type": types.StringType, "keyvault_metadata": basetypes.ListType{ - ElemType: AzureKeyVaultSecretScopeMetadata{}.Type(ctx), + ElemType: AzureKeyVaultSecretScopeMetadata_SdkV2{}.Type(ctx), }, "name": types.StringType, }, @@ -3941,7 +3941,7 @@ func (o UpdateRepoRequest_SdkV2) Type(ctx context.Context) attr.Type { "branch": types.StringType, "repo_id": types.Int64Type, "sparse_checkout": basetypes.ListType{ - ElemType: SparseCheckoutUpdate{}.Type(ctx), + ElemType: SparseCheckoutUpdate_SdkV2{}.Type(ctx), }, "tag": types.StringType, }, @@ -4116,7 +4116,7 @@ func (o WorkspaceObjectAccessControlResponse_SdkV2) Type(ctx context.Context) at return types.ObjectType{ AttrTypes: map[string]attr.Type{ "all_permissions": basetypes.ListType{ - ElemType: WorkspaceObjectPermission{}.Type(ctx), + ElemType: WorkspaceObjectPermission_SdkV2{}.Type(ctx), }, "display_name": types.StringType, "group_name": types.StringType, @@ -4276,7 +4276,7 @@ func (o WorkspaceObjectPermissions_SdkV2) Type(ctx context.Context) attr.Type { return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: WorkspaceObjectAccessControlResponse{}.Type(ctx), + ElemType: WorkspaceObjectAccessControlResponse_SdkV2{}.Type(ctx), }, "object_id": types.StringType, "object_type": types.StringType, @@ -4400,7 +4400,7 @@ func (o WorkspaceObjectPermissionsRequest_SdkV2) Type(ctx context.Context) attr. return types.ObjectType{ AttrTypes: map[string]attr.Type{ "access_control_list": basetypes.ListType{ - ElemType: WorkspaceObjectAccessControlRequest{}.Type(ctx), + ElemType: WorkspaceObjectAccessControlRequest_SdkV2{}.Type(ctx), }, "workspace_object_id": types.StringType, "workspace_object_type": types.StringType, From 6290691a719f8b30e94f27df7ccd3484535d83d7 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 16:53:47 +0100 Subject: [PATCH 6/7] another fix --- .../pluginfw/products/serving/data_serving_endpoints.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go index d1eaab1a0..d695bc93e 100644 --- a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go +++ b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go @@ -77,13 +77,13 @@ func (d *ServingEndpointsDataSource) Read(ctx context.Context, req datasource.Re } tfEndpoints := []attr.Value{} for _, endpoint := range endpointsInfoSdk { - var endpointsInfo serving_tf.ServingEndpoint + var endpointsInfo serving_tf.ServingEndpoint_SdkV2 resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, endpoint, &endpointsInfo)...) if resp.Diagnostics.HasError() { return } tfEndpoints = append(tfEndpoints, endpointsInfo.ToObjectValue(ctx)) } - endpoints.Endpoints = types.ListValueMust(serving_tf.ServingEndpoint{}.Type(ctx), tfEndpoints) + endpoints.Endpoints = types.ListValueMust(serving_tf.ServingEndpoint_SdkV2{}.Type(ctx), tfEndpoints) resp.Diagnostics.Append(resp.State.Set(ctx, endpoints)...) } From a1f3439183d5df280441f45d61b432dd1046174e Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Thu, 19 Dec 2024 17:35:05 +0100 Subject: [PATCH 7/7] fix --- .../products/registered_model/data_registered_model.go | 2 +- .../registered_model/data_registered_model_versions.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/providers/pluginfw/products/registered_model/data_registered_model.go b/internal/providers/pluginfw/products/registered_model/data_registered_model.go index 912f5b606..284d4df9f 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model.go @@ -42,7 +42,7 @@ type RegisteredModelData struct { func (RegisteredModelData) GetComplexFieldTypes(context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "model_info": reflect.TypeOf(catalog_tf.RegisteredModelInfo{}), + "model_info": reflect.TypeOf(catalog_tf.RegisteredModelInfo_SdkV2{}), } } diff --git a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go index 6cf39179c..95e863cd0 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model_versions.go @@ -76,13 +76,13 @@ func (d *RegisteredModelVersionsDataSource) Read(ctx context.Context, req dataso } var tfModelVersions []attr.Value for _, modelVersionSdk := range modelVersions.ModelVersions { - var modelVersion catalog_tf.ModelVersionInfo + var modelVersion catalog_tf.ModelVersionInfo_SdkV2 resp.Diagnostics.Append(converters.GoSdkToTfSdkStruct(ctx, modelVersionSdk, &modelVersion)...) if resp.Diagnostics.HasError() { return } tfModelVersions = append(tfModelVersions, modelVersion.ToObjectValue(ctx)) } - registeredModelVersions.ModelVersions = types.ListValueMust(catalog_tf.ModelVersionInfo{}.Type(ctx), tfModelVersions) + registeredModelVersions.ModelVersions = types.ListValueMust(catalog_tf.ModelVersionInfo_SdkV2{}.Type(ctx), tfModelVersions) resp.Diagnostics.Append(resp.State.Set(ctx, registeredModelVersions)...) }